]>
Commit | Line | Data |
---|---|---|
08c044b9 | 1 | # TODO: golang |
ad92033b | 2 | Summary: NBD client library in userspace |
08c044b9 | 3 | Summary(pl.UTF-8): Biblioteka klienta NBD w przestrzeni użytkownika |
ad92033b | 4 | Name: libnbd |
08c044b9 | 5 | Version: 1.6.2 |
ad92033b AM |
6 | Release: 0.1 |
7 | License: LGPL v2+ | |
08c044b9 JB |
8 | Group: Libraries |
9 | Source0: https://download.libguestfs.org/libnbd/1.6-stable/%{name}-%{version}.tar.gz | |
10 | # Source0-md5: dee634a684171133110432186b738853 | |
ad92033b | 11 | URL: https://github.com/libguestfs/libnbd |
bac2f8d4 | 12 | BuildRequires: bash-completion-devel >= 2.0 |
08c044b9 JB |
13 | BuildRequires: glib2-devel >= 2.0 |
14 | BuildRequires: gnutls-devel >= 3.3.0 | |
ad92033b AM |
15 | BuildRequires: jq |
16 | BuildRequires: libfuse-devel | |
17 | BuildRequires: libstdc++-devel | |
08c044b9 | 18 | BuildRequires: libxml2-devel >= 2.0 |
ad92033b AM |
19 | BuildRequires: ocaml |
20 | BuildRequires: ocaml-findlib | |
21 | BuildRequires: ocaml-ocamldoc | |
08c044b9 JB |
22 | BuildRequires: perl-tools-pod |
23 | BuildRequires: pkgconfig | |
24 | BuildRequires: python3-devel >= 1:3.2 | |
25 | BuildRequires: rpm-build >= 4.6 | |
ad92033b | 26 | BuildRequires: util-linux |
08c044b9 | 27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
ad92033b AM |
28 | |
29 | # The Python module happens to be called lib*.so. Don't scan it and | |
30 | # have a bogus "Provides: libnbdmod.*". | |
08c044b9 | 31 | %define _noautoprovfiles %{py3_sitedir}/libnbdmod.* |
ad92033b AM |
32 | |
33 | %description | |
34 | NBD - Network Block Device - is a protocol for accessing Block Devices | |
35 | (hard disks and disk-like things) over a Network. | |
36 | ||
37 | This is the NBD client library in userspace, a simple library for | |
38 | writing NBD clients. | |
39 | ||
40 | The key features are: | |
ad92033b AM |
41 | - Synchronous and asynchronous APIs, both for ease of use and for |
42 | writing non-blocking, multithreaded clients. | |
ad92033b | 43 | - High performance. |
ad92033b | 44 | - Minimal dependencies for the basic library. |
ad92033b | 45 | - Well-documented, stable API. |
ad92033b AM |
46 | - Bindings in several programming languages. |
47 | ||
08c044b9 JB |
48 | %description -l pl.UTF-8 |
49 | NBD - Network Block Device - to protokół pozwalający na dostęp do | |
50 | urządzeń blokowych (dysków twardych i rzeczy dyskopodobnych) po sieci. | |
51 | ||
52 | Ten pakiet zawiera bibliotekę klienta NBD w przestrzeni użytkownika - | |
53 | prostą bibliotekę do pisania klientów NBD. | |
54 | ||
55 | Główne cechy to: | |
56 | - API synchroniczne i asynchroniczne, zarówno w celu ułatwienia | |
57 | użycia, jak i pisania nieblokujących, wielowątkowych klientów | |
58 | - wysoka wydajność | |
59 | - minimalne zależności dla podstawowej biblioteki | |
60 | - dobrze udokumentowane, stabilne API | |
61 | - wiązania do kilku języków programowania | |
62 | ||
ad92033b | 63 | %package devel |
08c044b9 JB |
64 | Summary: Development headers for NBD library |
65 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki NBD | |
66 | License: LGPL v2+ and BSD | |
67 | Group: Development/Libraries | |
ad92033b AM |
68 | Requires: %{name} = %{version}-%{release} |
69 | ||
70 | %description devel | |
08c044b9 JB |
71 | This package contains development headers for NBD library. |
72 | ||
73 | %description devel -l pl.UTF-8 | |
74 | Ten pakiet zawiera pliki nagłówkowe biblioteki NBD. | |
ad92033b AM |
75 | |
76 | %package -n ocaml-%{name} | |
08c044b9 JB |
77 | Summary: OCaml language bindings for NBD library |
78 | Summary(pl.UTF-8): Wiązania OCamla do biblioteki NBD | |
79 | Group: Libraries | |
ad92033b AM |
80 | Requires: %{name} = %{version}-%{release} |
81 | ||
82 | %description -n ocaml-%{name} | |
08c044b9 JB |
83 | This package contains OCaml language bindings for NBD library. |
84 | ||
85 | %description -n ocaml-%{name} -l pl.UTF-8 | |
86 | Ten pakiet zawiera wiązania OCamla do biblioteki NBD. | |
ad92033b AM |
87 | |
88 | %package -n ocaml-%{name}-devel | |
08c044b9 JB |
89 | Summary: OCaml language development package for NBD library |
90 | Summary(pl.UTF-8): Pakiet programistyczny wiązań OCamla do biblioteki NBD | |
91 | Group: Development/Libraries | |
ad92033b AM |
92 | Requires: ocaml-%{name} = %{version}-%{release} |
93 | ||
94 | %description -n ocaml-%{name}-devel | |
08c044b9 JB |
95 | This package contains OCaml language development package for NBD |
96 | library. Install this if you want to compile OCaml software which uses | |
97 | NBD. | |
98 | ||
99 | %description -n ocaml-%{name}-devel -l pl.UTF-8 | |
100 | Pakiet programistyczny wiązań OCamla do biblioteki NBD. Należy go | |
101 | zainstalować, aby móc kompilować programy w OCamlu wykorzystujące NBD. | |
ad92033b AM |
102 | |
103 | %package -n python3-%{name} | |
08c044b9 JB |
104 | Summary: Python 3 bindings for NBD library |
105 | Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki NBD | |
106 | Group: Libraries/Python | |
ad92033b | 107 | Requires: %{name} = %{version}-%{release} |
ad92033b AM |
108 | |
109 | %description -n python3-%{name} | |
08c044b9 JB |
110 | This package contains Python 3 bindings for NBD library. |
111 | ||
112 | %description -n python3-%{name} -l pl.UTF-8 | |
113 | Ten pakiet zawiera wiązania Pythona do biblioteki NBD. | |
ad92033b AM |
114 | |
115 | %package -n nbdfuse | |
08c044b9 JB |
116 | Summary: FUSE support for NBD library |
117 | Summary(pl.UTF-8): Obsługa FUSE do biblioteki NBD | |
118 | License: LGPL v2+ and BSD | |
119 | Group: Applications/System | |
ad92033b AM |
120 | Requires: %{name} = %{version}-%{release} |
121 | ||
122 | %description -n nbdfuse | |
08c044b9 JB |
123 | This package contains FUSE support for NBD library. |
124 | ||
125 | %description -n nbdfuse -l pl.UTF-8 | |
126 | Ten pakiet zawiera obsługę FUSE do biblioteki NBD. | |
ad92033b | 127 | |
08c044b9 JB |
128 | %package -n bash-completion-%{name} |
129 | Summary: Bash tab-completion for NBD utilities | |
130 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla narzędzi NBD | |
131 | Group: Applications/Shells | |
ad92033b AM |
132 | Requires: %{name} = %{version}-%{release} |
133 | Requires: bash-completion >= 2.0 | |
08c044b9 | 134 | Obsoletes: libnbd-bash-completion < 1.6.2 |
ad92033b AM |
135 | BuildArch: noarch |
136 | ||
08c044b9 | 137 | %description -n bash-completion-%{name} |
ad92033b | 138 | Install this package if you want intelligent bash tab-completion for |
08c044b9 JB |
139 | NBD utilities (nbdcopy, nbdfuse, nbdinfo, nbdsh). |
140 | ||
141 | %description -n bash-completion-%{name} -l pl.UTF | |
142 | Ten pakiet należy zainstalować, aby uzyskać inteligentne dopełnianie | |
143 | parametrów dla narzędzi NBD (nbdcopy, nbdfuse, nbdinfo, nbdsh). | |
ad92033b AM |
144 | |
145 | %prep | |
146 | %setup -q | |
147 | ||
148 | %build | |
149 | %configure \ | |
150 | PYTHON=%{__python3} \ | |
ad92033b | 151 | --enable-fuse \ |
08c044b9 JB |
152 | --disable-golang \ |
153 | --enable-ocaml \ | |
154 | --enable-python \ | |
155 | --disable-static \ | |
156 | --with-python-installdir=%{py3_sitedir} \ | |
157 | --with-tls-priority=@LIBNBD,SYSTEM | |
ad92033b AM |
158 | |
159 | %{__make} | |
160 | ||
161 | %install | |
162 | rm -rf $RPM_BUILD_ROOT | |
163 | ||
164 | %{__make} install \ | |
165 | DESTDIR=$RPM_BUILD_ROOT | |
166 | ||
08c044b9 JB |
167 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} |
168 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
169 | ||
ad92033b AM |
170 | # Delete libtool crap. |
171 | find $RPM_BUILD_ROOT -name '*.la' -delete | |
172 | ||
08c044b9 JB |
173 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.owner |
174 | ||
ad92033b | 175 | # Delete the golang man page since we're not distributing the bindings. |
08c044b9 | 176 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/libnbd-golang.3* |
ad92033b AM |
177 | |
178 | %clean | |
179 | rm -rf $RPM_BUILD_ROOT | |
180 | ||
08c044b9 JB |
181 | %post -p /sbin/ldconfig |
182 | %postun -p /sbin/ldconfig | |
183 | ||
ad92033b AM |
184 | %files |
185 | %defattr(644,root,root,755) | |
08c044b9 | 186 | %doc COPYING.LIB README |
ad92033b AM |
187 | %attr(755,root,root) %{_bindir}/nbdcopy |
188 | %attr(755,root,root) %{_bindir}/nbdinfo | |
08c044b9 JB |
189 | %attr(755,root,root) %{_libdir}/libnbd.so.*.*.* |
190 | %ghost %{_libdir}/libnbd.so.0 | |
ad92033b AM |
191 | %{_mandir}/man1/nbdcopy.1* |
192 | %{_mandir}/man1/nbdinfo.1* | |
193 | ||
194 | %files devel | |
195 | %defattr(644,root,root,755) | |
08c044b9 | 196 | %doc TODO examples/*.c examples/LICENSE-FOR-EXAMPLES |
ad92033b | 197 | %{_libdir}/libnbd.so |
08c044b9 | 198 | %{_includedir}/libnbd.h |
ad92033b AM |
199 | %{_pkgconfigdir}/libnbd.pc |
200 | %{_mandir}/man3/libnbd.3* | |
201 | %{_mandir}/man1/libnbd-release-notes-1.*.1* | |
202 | %{_mandir}/man3/libnbd-security.3* | |
203 | %{_mandir}/man3/nbd_*.3* | |
204 | ||
205 | %files -n ocaml-%{name} | |
206 | %defattr(644,root,root,755) | |
08c044b9 JB |
207 | %dir %{_libdir}/ocaml/nbd |
208 | %{_libdir}/ocaml/nbd/META | |
bac2f8d4 | 209 | %{_libdir}/ocaml/nbd/NBD.cma |
08c044b9 JB |
210 | %{_libdir}/ocaml/nbd/NBD.cmi |
211 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllmlnbd.so | |
ad92033b AM |
212 | |
213 | %files -n ocaml-%{name}-devel | |
214 | %defattr(644,root,root,755) | |
08c044b9 JB |
215 | %doc ocaml/examples/*.ml ocaml/examples/LICENSE-FOR-EXAMPLES |
216 | %{_libdir}/ocaml/nbd/NBD.cmx | |
217 | %{_libdir}/ocaml/nbd/NBD.mli | |
218 | %{_libdir}/ocaml/nbd/libmlnbd.a | |
219 | %{_libdir}/ocaml/nbd/mlnbd.a | |
220 | %{_libdir}/ocaml/nbd/mlnbd.cmxa | |
ad92033b AM |
221 | %{_mandir}/man3/libnbd-ocaml.3* |
222 | %{_mandir}/man3/NBD.3* | |
223 | %{_mandir}/man3/NBD.*.3* | |
224 | ||
225 | %files -n python3-%{name} | |
226 | %defattr(644,root,root,755) | |
08c044b9 JB |
227 | %attr(755,root,root) %{_bindir}/nbdsh |
228 | %attr(755,root,root) %{py3_sitedir}/libnbdmod.cpython-*.so | |
ad92033b AM |
229 | %{py3_sitedir}/nbd.py |
230 | %{py3_sitedir}/nbdsh.py | |
08c044b9 JB |
231 | %{py3_sitedir}/__pycache__/nbd.cpython-*.py[co] |
232 | %{py3_sitedir}/__pycache__/nbdsh.cpython-*.py[co] | |
ad92033b AM |
233 | %{_mandir}/man1/nbdsh.1* |
234 | ||
235 | %files -n nbdfuse | |
236 | %defattr(644,root,root,755) | |
237 | %attr(755,root,root) %{_bindir}/nbdfuse | |
238 | %{_mandir}/man1/nbdfuse.1* | |
239 | ||
08c044b9 | 240 | %files -n bash-completion-%{name} |
ad92033b | 241 | %defattr(644,root,root,755) |
ad92033b AM |
242 | %{bash_compdir}/nbdcopy |
243 | %{bash_compdir}/nbdfuse | |
244 | %{bash_compdir}/nbdinfo | |
245 | %{bash_compdir}/nbdsh |