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