[packages/libbytesize] - pl, python* bconds
qboosh
qboosh at pld-linux.org
Sat Jun 8 16:17:07 CEST 2019
commit f47aec23b6213f46091426c54fb0f1dc9146b194
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jun 8 16:18:02 2019 +0200
- pl, python* bconds
libbytesize.spec | 38 ++++++++++++++++++++++++++++++++++----
1 file changed, 34 insertions(+), 4 deletions(-)
---
diff --git a/libbytesize.spec b/libbytesize.spec
index 993401b..1a94df9 100644
--- a/libbytesize.spec
+++ b/libbytesize.spec
@@ -1,21 +1,30 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
Summary: A library for working with sizes in bytes
+Summary(pl.UTF-8): Biblioteka do pracy z rozmiarami w bajtach
Name: libbytesize
Version: 1.4
Release: 1
License: LGPL v2+
Group: Libraries
+#Source0Download: https://github.com/storaged-project/libbytesize/releases
Source0: https://github.com/storaged-project/libbytesize/releases/download/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: aa9bd5a04546873714da2adbaaa9f283
URL: https://github.com/storaged-project/libbytesize
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.50
BuildRequires: automake
+BuildRequires: gettext-tools
BuildRequires: gmp-devel
BuildRequires: gtk-doc
-BuildRequires: libtool
+BuildRequires: libtool >= 2:2
BuildRequires: mpfr-devel
BuildRequires: pcre-devel >= 8.32
BuildRequires: pkgconfig
-BuildRequires: python3-devel
+%{?with_python2:BuildRequires: python-devel >= 2}
+%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -25,6 +34,12 @@ readable representation of a size in bytes this library takes
localization into account. It also provides support for sizes bigger
than MAXUINT64.
+%description -l pl.UTF-8
+libbytesize to biblioteka C ułatwiająca pracę z rozmiarami w bajtach -
+np. analizy wejścia od użytkowników czy tworzenia ładnej, czytelnej
+dla człowieka reprezentacji rozmiaru w bajtach z uwzględnieniem
+lokalizacji. Zapewnia także obsługę rozmiarów większych niż MAXUINT64.
+
%package devel
Summary: Header files for libbytesize library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libbytesize
@@ -51,6 +66,7 @@ Dokumentacja API biblioteki libbytesize.
%package -n python-bytesize
Summary: Python 2 bindings for libbytesize
+Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki libbytesize.
Group: Libraries/Python
Requires: %{name} = %{version}-%{release}
Requires: python-six
@@ -58,8 +74,12 @@ Requires: python-six
%description -n python-bytesize
This package contains Python 2 bindings for libbytesize.
+%description -n python-bytesize -l pl.UTF-8
+Ten pakiet zawiera wiązania Pythona 2 do libbytesize.
+
%package -n python3-bytesize
Summary: Python 3 bindings for libbytesize
+Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki libbytesize.
Group: Libraries/Python
Requires: %{name} = %{version}-%{release}
Requires: python3-six
@@ -67,6 +87,9 @@ Requires: python3-six
%description -n python3-bytesize
This package contains Python 3 bindings for libbytesize.
+%description -n python3-bytesize -l pl.UTF-8
+Ten pakiet zawiera wiązania Pythona 3 do libbytesize.
+
%prep
%setup -q
@@ -75,7 +98,9 @@ This package contains Python 3 bindings for libbytesize.
%{__aclocal} -I m4
%{__autoconf}
%{__automake}
-%configure
+%configure \
+ %{!?with_python2:--without-python2} \
+ %{!?with_python3:--without-python3}
%{__make}
%install
@@ -94,6 +119,7 @@ install -d $RPM_BUILD_ROOT%{_gtkdocdir}
%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
+# no configure option to specify location
%{__mv} $RPM_BUILD_ROOT{%{_datadir}/gtk-doc/html/libbytesize,%{_gtkdocdir}}
%find_lang %{name}
@@ -120,13 +146,17 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%{_gtkdocdir}/libbytesize
+%if %{with python2}
%files -n python-bytesize
%defattr(644,root,root,755)
%dir %{py_sitedir}/bytesize
%{py_sitedir}/bytesize/*.py[co]
+%endif
+%if %{with python3}
%files -n python3-bytesize
%defattr(644,root,root,755)
%dir %{py3_sitedir}/bytesize
%{py3_sitedir}/bytesize/__pycache__
%{py3_sitedir}/bytesize/*.py
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libbytesize.git/commitdiff/f47aec23b6213f46091426c54fb0f1dc9146b194
More information about the pld-cvs-commit
mailing list