Name: nbdkit
Version: 1.0.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: NBD server
License: BSD
* Liberal license (BSD) allows nbdkit to be linked to proprietary
libraries or included in proprietary code.
-Several example plugins are included in the package.
+You probably want to install one of more plugins (%{name}-plugin-*).
To develop plugins, install the %{name}-devel package and start by
reading the nbdkit(1) and nbdkit-plugin(3) manual pages.
+%package plugin-examples
+Summary: Example plugins for %{name}
+License: BSD
+
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+
+%description plugin-examples
+This package contains example plugins for %{name}.
+
+
+%package plugin-file
+Summary: File serving plugin for %{name}
+License: BSD
+
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+
+%description plugin-file
+This package is a file serving plugin for %{name}.
+
+
+%package plugin-gzip
+Summary: GZip file serving plugin for %{name}
+License: BSD
+
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+
+%description plugin-gzip
+This package is a gzip file serving plugin for %{name}.
+
+
+%package plugin-libvirt
+Summary: Libvirt plugin for %{name}
+License: BSD
+
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+
+%description plugin-libvirt
+This package is a libvirt plugin for %{name}. It lets you access
+libvirt guest disks readonly. It is implemented using the libvirt
+virDomainBlockPeek API.
+
+
+%package plugin-xz
+Summary: XZ file serving plugin for %{name}
+License: BSD
+
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+
+%description plugin-xz
+This package is a xz file serving plugin for %{name}.
+
+
%package devel
Summary: Development files and documentation for %{name}
License: BSD
%build
+# Force immediate binding for hardened build for plugins.
+# https://bugzilla.redhat.com/show_bug.cgi?id=977446#c13
+export LDFLAGS="$LDFLAGS -Wl,-z,now"
%configure --disable-static
make %{?_smp_mflags}
%files
%doc LICENSE README
%{_sbindir}/nbdkit
-%{_libdir}/%{name}
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/plugins
%{_mandir}/man1/nbdkit.1*
-%{_mandir}/man1/nbdkit-*-plugin.1*
+
+
+%files plugin-examples
+%doc LICENSE README
+%{_libdir}/%{name}/plugins/nbdkit-example*-plugin.so
+%{_mandir}/man1/nbdkit-example*-plugin.1*
+
+
+%files plugin-file
+%doc LICENSE README
+%{_libdir}/%{name}/plugins/nbdkit-file-plugin.so
+%{_mandir}/man1/nbdkit-file-plugin.1*
+
+
+%files plugin-gzip
+%doc LICENSE README
+%{_libdir}/%{name}/plugins/nbdkit-gzip-plugin.so
+%{_mandir}/man1/nbdkit-gzip-plugin.1*
+
+
+%files plugin-libvirt
+%doc LICENSE README
+%{_libdir}/%{name}/plugins/nbdkit-libvirt-plugin.so
+%{_mandir}/man1/nbdkit-libvirt-plugin.1*
+
+
+%files plugin-xz
+%doc LICENSE README
+%{_libdir}/%{name}/plugins/nbdkit-xz-plugin.so
+%{_mandir}/man1/nbdkit-xz-plugin.1*
%files devel
%changelog
-* Mon Jun 24 2013 Richard W.M. Jones <rjones@redhat.com> - 1.0.0-3
+* Mon Jun 24 2013 Richard W.M. Jones <rjones@redhat.com> - 1.0.0-4
- Initial release.