[packages/libnbd] - updated to 1.6.2, PLDified more

qboosh qboosh at pld-linux.org
Sat Mar 6 22:15:12 CET 2021


commit 08c044b9c43d653cf3aabff9af265615f978e28e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Mar 6 22:16:05 2021 +0100

    - updated to 1.6.2, PLDified more

 libnbd.spec | 182 ++++++++++++++++++++++++++++++++++++++----------------------
 1 file changed, 117 insertions(+), 65 deletions(-)
---
diff --git a/libnbd.spec b/libnbd.spec
index 8a19c42..2c878d3 100644
--- a/libnbd.spec
+++ b/libnbd.spec
@@ -1,29 +1,34 @@
+# TODO: golang
 Summary:	NBD client library in userspace
+Summary(pl.UTF-8):	Biblioteka klienta NBD w przestrzeni użytkownika
 Name:		libnbd
-Version:	1.6.1
+Version:	1.6.2
 Release:	0.1
 License:	LGPL v2+
+Group:		Libraries
+Source0:	https://download.libguestfs.org/libnbd/1.6-stable/%{name}-%{version}.tar.gz
+# Source0-md5:	dee634a684171133110432186b738853
 URL:		https://github.com/libguestfs/libnbd
-Source0:	http://libguestfs.org/download/libnbd/1.6-stable/%{name}-%{version}.tar.gz
-# Source0-md5:	e90ca15020d9b8f3f72a0e4b9788146a
-BuildRequires:	/usr/bin/pod2man
-BuildRequires:	bash-completion
-BuildRequires:	coreutils
-BuildRequires:	glib2-devel
-BuildRequires:	gnutls-devel
+BuildRequires:	bash-completion >= 2.0
+BuildRequires:	glib2-devel >= 2.0
+BuildRequires:	gnutls-devel >= 3.3.0
 BuildRequires:	jq
 BuildRequires:	libfuse-devel
 BuildRequires:	libstdc++-devel
-BuildRequires:	libxml2-devel
+BuildRequires:	libxml2-devel >= 2.0
 BuildRequires:	ocaml
 BuildRequires:	ocaml-findlib
 BuildRequires:	ocaml-ocamldoc
-BuildRequires:	python3-devel
+BuildRequires:	perl-tools-pod
+BuildRequires:	pkgconfig
+BuildRequires:	python3-devel >= 1:3.2
+BuildRequires:	rpm-build >= 4.6
 BuildRequires:	util-linux
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # The Python module happens to be called lib*.so.  Don't scan it and
 # have a bogus "Provides: libnbdmod.*".
-%global __provides_exclude_from ^%{py3_sitedir}/lib.*\\.so
+%define		_noautoprovfiles	%{py3_sitedir}/libnbdmod.*
 
 %description
 NBD - Network Block Device - is a protocol for accessing Block Devices
@@ -33,66 +38,109 @@ This is the NBD client library in userspace, a simple library for
 writing NBD clients.
 
 The key features are:
-
  - Synchronous and asynchronous APIs, both for ease of use and for
    writing non-blocking, multithreaded clients.
-
  - High performance.
-
  - Minimal dependencies for the basic library.
-
  - Well-documented, stable API.
-
  - Bindings in several programming languages.
 
+%description -l pl.UTF-8
+NBD - Network Block Device - to protokół pozwalający na dostęp do
+urządzeń blokowych (dysków twardych i rzeczy dyskopodobnych) po sieci.
+
+Ten pakiet zawiera bibliotekę klienta NBD w przestrzeni użytkownika -
+prostą bibliotekę do pisania klientów NBD.
+
+Główne cechy to:
+- API synchroniczne i asynchroniczne, zarówno w celu ułatwienia
+  użycia, jak i pisania nieblokujących, wielowątkowych klientów
+- wysoka wydajność
+- minimalne zależności dla podstawowej biblioteki
+- dobrze udokumentowane, stabilne API
+- wiązania do kilku języków programowania
+
 %package devel
-Summary:	Development headers for %{name}
-License:	LGPLv2+ and BSD
+Summary:	Development headers for NBD library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki NBD
+License:	LGPL v2+ and BSD
+Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
 
 %description devel
-This package contains development headers for %{name}.
+This package contains development headers for NBD library.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe biblioteki NBD.
 
 %package -n ocaml-%{name}
-Summary:	OCaml language bindings for %{name}
+Summary:	OCaml language bindings for NBD library
+Summary(pl.UTF-8):	Wiązania OCamla do biblioteki NBD
+Group:		Libraries
 Requires:	%{name} = %{version}-%{release}
 
 %description -n ocaml-%{name}
-This package contains OCaml language bindings for %{name}.
+This package contains OCaml language bindings for NBD library.
+
+%description -n ocaml-%{name} -l pl.UTF-8
+Ten pakiet zawiera wiązania OCamla do biblioteki NBD.
 
 %package -n ocaml-%{name}-devel
-Summary:	OCaml language development package for %{name}
+Summary:	OCaml language development package for NBD library
+Summary(pl.UTF-8):	Pakiet programistyczny wiązań OCamla do biblioteki NBD
+Group:		Development/Libraries
 Requires:	ocaml-%{name} = %{version}-%{release}
 
 %description -n ocaml-%{name}-devel
-This package contains OCaml language development package for %{name}.
-Install this if you want to compile OCaml software which uses %{name}.
+This package contains OCaml language development package for NBD
+library. Install this if you want to compile OCaml software which uses
+NBD.
+
+%description -n ocaml-%{name}-devel -l pl.UTF-8
+Pakiet programistyczny wiązań OCamla do biblioteki NBD. Należy go
+zainstalować, aby móc kompilować programy w OCamlu wykorzystujące NBD.
 
 %package -n python3-%{name}
-Summary:	Python 3 bindings for %{name}
+Summary:	Python 3 bindings for NBD library
+Summary(pl.UTF-8):	Wiązania Pythona 3 do biblioteki NBD
+Group:		Libraries/Python
 Requires:	%{name} = %{version}-%{release}
-%{?python_provide:%python_provide python3-%{name}}
 
 %description -n python3-%{name}
-python3-%{name} contains Python 3 bindings for %{name}.
+This package contains Python 3 bindings for NBD library.
+
+%description -n python3-%{name} -l pl.UTF-8
+Ten pakiet zawiera wiązania Pythona do biblioteki NBD.
 
 %package -n nbdfuse
-Summary:	FUSE support for %{name}
-License:	LGPLv2+ and BSD
+Summary:	FUSE support for NBD library
+Summary(pl.UTF-8):	Obsługa FUSE do biblioteki NBD
+License:	LGPL v2+ and BSD
+Group:		Applications/System
 Requires:	%{name} = %{version}-%{release}
 
 %description -n nbdfuse
-This package contains FUSE support for %{name}.
+This package contains FUSE support for NBD library.
+
+%description -n nbdfuse -l pl.UTF-8
+Ten pakiet zawiera obsługę FUSE do biblioteki NBD.
 
-%package bash-completion
-Summary:	Bash tab-completion for %{name}
+%package -n bash-completion-%{name}
+Summary:	Bash tab-completion for NBD utilities
+Summary(pl.UTF-8):	Bashowe uzupełnianie parametrów dla narzędzi NBD
+Group:		Applications/Shells
 Requires:	%{name} = %{version}-%{release}
 Requires:	bash-completion >= 2.0
+Obsoletes:	libnbd-bash-completion < 1.6.2
 BuildArch:	noarch
 
-%description bash-completion
+%description -n bash-completion-%{name}
 Install this package if you want intelligent bash tab-completion for
-%{name}.
+NBD utilities (nbdcopy, nbdfuse, nbdinfo, nbdsh).
+
+%description -n bash-completion-%{name} -l pl.UTF
+Ten pakiet należy zainstalować, aby uzyskać inteligentne dopełnianie
+parametrów dla narzędzi NBD (nbdcopy, nbdfuse, nbdinfo, nbdsh).
 
 %prep
 %setup -q
@@ -100,13 +148,13 @@ Install this package if you want intelligent bash tab-completion for
 %build
 %configure \
 	PYTHON=%{__python3} \
-	--disable-static \
-	--with-tls-priority=@LIBNBD,SYSTEM \
-	--enable-python \
-	 --with-python-installdir=%{py3_sitedir} \
-	--enable-ocaml \
 	--enable-fuse \
-	--disable-golang
+	--disable-golang \
+	--enable-ocaml \
+	--enable-python \
+	--disable-static \
+	--with-python-installdir=%{py3_sitedir} \
+	--with-tls-priority=@LIBNBD,SYSTEM
 
 %{__make}
 
@@ -116,31 +164,38 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
+
 # Delete libtool crap.
 find $RPM_BUILD_ROOT -name '*.la' -delete
 
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.owner
+
 # Delete the golang man page since we're not distributing the bindings.
-rm $RPM_BUILD_ROOT%{_mandir}/man3/libnbd-golang.3*
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/libnbd-golang.3*
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
-%doc README
-%doc COPYING.LIB
+%doc COPYING.LIB README
 %attr(755,root,root) %{_bindir}/nbdcopy
 %attr(755,root,root) %{_bindir}/nbdinfo
-%{_libdir}/libnbd.so.*
+%attr(755,root,root) %{_libdir}/libnbd.so.*.*.*
+%ghost %{_libdir}/libnbd.so.0
 %{_mandir}/man1/nbdcopy.1*
 %{_mandir}/man1/nbdinfo.1*
 
 %files devel
 %defattr(644,root,root,755)
-%doc TODO examples/*.c
-%doc examples/LICENSE-FOR-EXAMPLES
-%{_includedir}/libnbd.h
+%doc TODO examples/*.c examples/LICENSE-FOR-EXAMPLES
 %{_libdir}/libnbd.so
+%{_includedir}/libnbd.h
 %{_pkgconfigdir}/libnbd.pc
 %{_mandir}/man3/libnbd.3*
 %{_mandir}/man1/libnbd-release-notes-1.*.1*
@@ -149,32 +204,31 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n ocaml-%{name}
 %defattr(644,root,root,755)
-%{_libdir}/ocaml/nbd
-%exclude %{_libdir}/ocaml/nbd/*.a
-%exclude %{_libdir}/ocaml/nbd/*.cmxa
-%exclude %{_libdir}/ocaml/nbd/*.cmx
-%exclude %{_libdir}/ocaml/nbd/*.mli
-%{_libdir}/ocaml/stublibs/dllmlnbd.so
-%{_libdir}/ocaml/stublibs/dllmlnbd.so.owner
+%dir %{_libdir}/ocaml/nbd
+%{_libdir}/ocaml/nbd/META
+%{_libdir}/ocaml/nbd/NBD.cmi
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllmlnbd.so
 
 %files -n ocaml-%{name}-devel
 %defattr(644,root,root,755)
-%doc ocaml/examples/*.ml
-%doc ocaml/examples/LICENSE-FOR-EXAMPLES
-%{_libdir}/ocaml/nbd/*.a
-%{_libdir}/ocaml/nbd/*.cmxa
-%{_libdir}/ocaml/nbd/*.cmx
-%{_libdir}/ocaml/nbd/*.mli
+%doc ocaml/examples/*.ml ocaml/examples/LICENSE-FOR-EXAMPLES
+%{_libdir}/ocaml/nbd/NBD.cmx
+%{_libdir}/ocaml/nbd/NBD.mli
+%{_libdir}/ocaml/nbd/libmlnbd.a
+%{_libdir}/ocaml/nbd/mlnbd.a
+%{_libdir}/ocaml/nbd/mlnbd.cmxa
 %{_mandir}/man3/libnbd-ocaml.3*
 %{_mandir}/man3/NBD.3*
 %{_mandir}/man3/NBD.*.3*
 
 %files -n python3-%{name}
 %defattr(644,root,root,755)
-%{py3_sitedir}/libnbdmod*.so
+%attr(755,root,root) %{_bindir}/nbdsh
+%attr(755,root,root) %{py3_sitedir}/libnbdmod.cpython-*.so
 %{py3_sitedir}/nbd.py
 %{py3_sitedir}/nbdsh.py
-%attr(755,root,root) %{_bindir}/nbdsh
+%{py3_sitedir}/__pycache__/nbd.cpython-*.py[co]
+%{py3_sitedir}/__pycache__/nbdsh.cpython-*.py[co]
 %{_mandir}/man1/nbdsh.1*
 
 %files -n nbdfuse
@@ -182,11 +236,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/nbdfuse
 %{_mandir}/man1/nbdfuse.1*
 
-%files bash-completion
+%files -n bash-completion-%{name}
 %defattr(644,root,root,755)
-%dir %{bash_compdir}
 %{bash_compdir}/nbdcopy
 %{bash_compdir}/nbdfuse
 %{bash_compdir}/nbdinfo
 %{bash_compdir}/nbdsh
-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libnbd.git/commitdiff/08c044b9c43d653cf3aabff9af265615f978e28e



More information about the pld-cvs-commit mailing list