Update nbdkit:
[fedora-specs.git] / nbdkit.spec
1 %global _hardened_build 1
2
3 Name:           nbdkit
4 Version:        1.0.0
5 Release:        4%{?dist}
6 Summary:        NBD server
7
8 License:        BSD
9 URL:            https://github.com/libguestfs/nbdkit
10 Source0:        http://libguestfs.org/download/nbdkit/%{name}-%{version}.tar.gz
11
12 BuildRequires:  /usr/bin/pod2man
13 BuildRequires:  libvirt-devel
14 BuildRequires:  xz-devel
15 BuildRequires:  zlib-devel
16
17
18 %description
19 NBD is a protocol for accessing block devices (hard disks and
20 disk-like things) over the network.
21
22 'nbdkit' is a toolkit for creating NBD servers.
23
24 The key features are:
25
26 * Multithreaded NBD server written in C with good performance.
27
28 * Well-documented, simple plugin API with a stable ABI guarantee.
29   Let's you export "unconventional" block devices easily.
30
31 * Liberal license (BSD) allows nbdkit to be linked to proprietary
32   libraries or included in proprietary code.
33
34 You probably want to install one of more plugins (%{name}-plugin-*).
35
36 To develop plugins, install the %{name}-devel package and start by
37 reading the nbdkit(1) and nbdkit-plugin(3) manual pages.
38
39
40 %package plugin-examples
41 Summary:        Example plugins for %{name}
42 License:        BSD
43
44 Requires:       %{name}%{?_isa} = %{version}-%{release}
45
46
47 %description plugin-examples
48 This package contains example plugins for %{name}.
49
50
51 %package plugin-file
52 Summary:        File serving plugin for %{name}
53 License:        BSD
54
55 Requires:       %{name}%{?_isa} = %{version}-%{release}
56
57
58 %description plugin-file
59 This package is a file serving plugin for %{name}.
60
61
62 %package plugin-gzip
63 Summary:        GZip file serving plugin for %{name}
64 License:        BSD
65
66 Requires:       %{name}%{?_isa} = %{version}-%{release}
67
68
69 %description plugin-gzip
70 This package is a gzip file serving plugin for %{name}.
71
72
73 %package plugin-libvirt
74 Summary:        Libvirt plugin for %{name}
75 License:        BSD
76
77 Requires:       %{name}%{?_isa} = %{version}-%{release}
78
79
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.
84
85
86 %package plugin-xz
87 Summary:        XZ file serving plugin for %{name}
88 License:        BSD
89
90 Requires:       %{name}%{?_isa} = %{version}-%{release}
91
92
93 %description plugin-xz
94 This package is a xz file serving plugin for %{name}.
95
96
97 %package devel
98 Summary:        Development files and documentation for %{name}
99 License:        BSD
100
101 Requires:       %{name}%{?_isa} = %{version}-%{release}
102
103
104 %description devel
105 This package contains development files and documentation
106 for %{name}.  Install this package if you want to develop
107 plugins for %{name}.
108
109
110 %prep
111 %setup -q
112
113
114 %build
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
119 make %{?_smp_mflags}
120
121
122 %install
123 %make_install
124
125 # Delete libtool crap.
126 find $RPM_BUILD_ROOT -name '*.la' -delete
127
128
129 %files
130 %doc LICENSE README
131 %{_sbindir}/nbdkit
132 %dir %{_libdir}/%{name}
133 %dir %{_libdir}/%{name}/plugins
134 %{_mandir}/man1/nbdkit.1*
135
136
137 %files plugin-examples
138 %doc LICENSE README
139 %{_libdir}/%{name}/plugins/nbdkit-example*-plugin.so
140 %{_mandir}/man1/nbdkit-example*-plugin.1*
141
142
143 %files plugin-file
144 %doc LICENSE README
145 %{_libdir}/%{name}/plugins/nbdkit-file-plugin.so
146 %{_mandir}/man1/nbdkit-file-plugin.1*
147
148
149 %files plugin-gzip
150 %doc LICENSE README
151 %{_libdir}/%{name}/plugins/nbdkit-gzip-plugin.so
152 %{_mandir}/man1/nbdkit-gzip-plugin.1*
153
154
155 %files plugin-libvirt
156 %doc LICENSE README
157 %{_libdir}/%{name}/plugins/nbdkit-libvirt-plugin.so
158 %{_mandir}/man1/nbdkit-libvirt-plugin.1*
159
160
161 %files plugin-xz
162 %doc LICENSE README
163 %{_libdir}/%{name}/plugins/nbdkit-xz-plugin.so
164 %{_mandir}/man1/nbdkit-xz-plugin.1*
165
166
167 %files devel
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*
173
174
175 %changelog
176 * Mon Jun 24 2013 Richard W.M. Jones <rjones@redhat.com> - 1.0.0-4
177 - Initial release.