1 %global _hardened_build 1
9 URL: https://github.com/libguestfs/nbdkit
10 Source0: http://libguestfs.org/download/nbdkit/%{name}-%{version}.tar.gz
12 BuildRequires: /usr/bin/pod2man
13 BuildRequires: libvirt-devel
14 BuildRequires: xz-devel
15 BuildRequires: zlib-devel
19 NBD is a protocol for accessing block devices (hard disks and
20 disk-like things) over the network.
22 'nbdkit' is a toolkit for creating NBD servers.
26 * Multithreaded NBD server written in C with good performance.
28 * Well-documented, simple plugin API with a stable ABI guarantee.
29 Let's you export "unconventional" block devices easily.
31 * Liberal license (BSD) allows nbdkit to be linked to proprietary
32 libraries or included in proprietary code.
34 You probably want to install one of more plugins (%{name}-plugin-*).
36 To develop plugins, install the %{name}-devel package and start by
37 reading the nbdkit(1) and nbdkit-plugin(3) manual pages.
40 %package plugin-examples
41 Summary: Example plugins for %{name}
44 Requires: %{name}%{?_isa} = %{version}-%{release}
47 %description plugin-examples
48 This package contains example plugins for %{name}.
52 Summary: File serving plugin for %{name}
55 Requires: %{name}%{?_isa} = %{version}-%{release}
58 %description plugin-file
59 This package is a file serving plugin for %{name}.
63 Summary: GZip file serving plugin for %{name}
66 Requires: %{name}%{?_isa} = %{version}-%{release}
69 %description plugin-gzip
70 This package is a gzip file serving plugin for %{name}.
73 %package plugin-libvirt
74 Summary: Libvirt plugin for %{name}
77 Requires: %{name}%{?_isa} = %{version}-%{release}
80 %description plugin-libvirt
81 This package is a libvirt plugin for %{name}. It lets you access
82 libvirt guest disks readonly. It is implemented using the libvirt
83 virDomainBlockPeek API.
87 Summary: XZ file serving plugin for %{name}
90 Requires: %{name}%{?_isa} = %{version}-%{release}
93 %description plugin-xz
94 This package is a xz file serving plugin for %{name}.
98 Summary: Development files and documentation for %{name}
101 Requires: %{name}%{?_isa} = %{version}-%{release}
105 This package contains development files and documentation
106 for %{name}. Install this package if you want to develop
115 # Force immediate binding for hardened build for plugins.
116 # https://bugzilla.redhat.com/show_bug.cgi?id=977446#c13
117 export LDFLAGS="$LDFLAGS -Wl,-z,now"
118 %configure --disable-static
125 # Delete libtool crap.
126 find $RPM_BUILD_ROOT -name '*.la' -delete
132 %dir %{_libdir}/%{name}
133 %dir %{_libdir}/%{name}/plugins
134 %{_mandir}/man1/nbdkit.1*
137 %files plugin-examples
139 %{_libdir}/%{name}/plugins/nbdkit-example*-plugin.so
140 %{_mandir}/man1/nbdkit-example*-plugin.1*
145 %{_libdir}/%{name}/plugins/nbdkit-file-plugin.so
146 %{_mandir}/man1/nbdkit-file-plugin.1*
151 %{_libdir}/%{name}/plugins/nbdkit-gzip-plugin.so
152 %{_mandir}/man1/nbdkit-gzip-plugin.1*
155 %files plugin-libvirt
157 %{_libdir}/%{name}/plugins/nbdkit-libvirt-plugin.so
158 %{_mandir}/man1/nbdkit-libvirt-plugin.1*
163 %{_libdir}/%{name}/plugins/nbdkit-xz-plugin.so
164 %{_mandir}/man1/nbdkit-xz-plugin.1*
168 %doc LICENSE README TODO
169 # Include the source of the example plugins in the documentation.
170 %doc plugins/example*/*.c
171 %{_includedir}/nbdkit-plugin.h
172 %{_mandir}/man3/nbdkit-plugin.3*
176 * Mon Jun 24 2013 Richard W.M. Jones <rjones@redhat.com> - 1.0.0-4