]> git.pld-linux.org Git - packages/libbytesize.git/blame - libbytesize.spec
- pl, python* bconds
[packages/libbytesize.git] / libbytesize.spec
CommitLineData
f47aec23
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
a0b490d4 6Summary: A library for working with sizes in bytes
f47aec23 7Summary(pl.UTF-8): Biblioteka do pracy z rozmiarami w bajtach
a0b490d4 8Name: libbytesize
713581f4
AG
9Version: 1.4
10Release: 1
a0b490d4
MB
11License: LGPL v2+
12Group: Libraries
f47aec23 13#Source0Download: https://github.com/storaged-project/libbytesize/releases
a0b490d4 14Source0: https://github.com/storaged-project/libbytesize/releases/download/%{version}/%{name}-%{version}.tar.gz
713581f4 15# Source0-md5: aa9bd5a04546873714da2adbaaa9f283
a0b490d4 16URL: https://github.com/storaged-project/libbytesize
f47aec23 17BuildRequires: autoconf >= 2.50
a0b490d4 18BuildRequires: automake
f47aec23 19BuildRequires: gettext-tools
a0b490d4
MB
20BuildRequires: gmp-devel
21BuildRequires: gtk-doc
f47aec23 22BuildRequires: libtool >= 2:2
a0b490d4
MB
23BuildRequires: mpfr-devel
24BuildRequires: pcre-devel >= 8.32
25BuildRequires: pkgconfig
f47aec23
JB
26%{?with_python2:BuildRequires: python-devel >= 2}
27%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
a0b490d4
MB
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31The libbytesize is a C library that facilitates work with sizes in
32bytes. Be it parsing the input from users or producing a nice human
33readable representation of a size in bytes this library takes
34localization into account. It also provides support for sizes bigger
35than MAXUINT64.
36
f47aec23
JB
37%description -l pl.UTF-8
38libbytesize to biblioteka C ułatwiająca pracę z rozmiarami w bajtach -
39np. analizy wejścia od użytkowników czy tworzenia ładnej, czytelnej
40dla człowieka reprezentacji rozmiaru w bajtach z uwzględnieniem
41lokalizacji. Zapewnia także obsługę rozmiarów większych niż MAXUINT64.
42
a0b490d4
MB
43%package devel
44Summary: Header files for libbytesize library
45Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libbytesize
46Group: Development/Libraries
47Requires: %{name} = %{version}-%{release}
48
49%description devel
50Header files for libbytesize library.
51
52%description devel -l pl.UTF-8
53Pliki nagłówkowe biblioteki libbytesize.
54
55%package apidocs
56Summary: libbytesize library API documentation
57Summary(pl.UTF-8): Dokumentacja API biblioteki libbytesize
58Group: Documentation
59Requires: gtk-doc-common
60
61%description apidocs
62API documentation for libbytesize library.
63
64%description apidocs -l pl.UTF-8
65Dokumentacja API biblioteki libbytesize.
66
67%package -n python-bytesize
68Summary: Python 2 bindings for libbytesize
f47aec23 69Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki libbytesize.
a0b490d4
MB
70Group: Libraries/Python
71Requires: %{name} = %{version}-%{release}
72Requires: python-six
73
74%description -n python-bytesize
75This package contains Python 2 bindings for libbytesize.
76
f47aec23
JB
77%description -n python-bytesize -l pl.UTF-8
78Ten pakiet zawiera wiązania Pythona 2 do libbytesize.
79
a0b490d4
MB
80%package -n python3-bytesize
81Summary: Python 3 bindings for libbytesize
f47aec23 82Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki libbytesize.
a0b490d4
MB
83Group: Libraries/Python
84Requires: %{name} = %{version}-%{release}
85Requires: python3-six
86
87%description -n python3-bytesize
88This package contains Python 3 bindings for libbytesize.
89
f47aec23
JB
90%description -n python3-bytesize -l pl.UTF-8
91Ten pakiet zawiera wiązania Pythona 3 do libbytesize.
92
a0b490d4
MB
93%prep
94%setup -q
95
96%build
97%{__libtoolize}
98%{__aclocal} -I m4
99%{__autoconf}
100%{__automake}
f47aec23
JB
101%configure \
102 %{!?with_python2:--without-python2} \
103 %{!?with_python3:--without-python3}
a0b490d4
MB
104%{__make}
105
106%install
107rm -rf $RPM_BUILD_ROOT
108install -d $RPM_BUILD_ROOT%{_gtkdocdir}
109
110%{__make} install \
111 DESTDIR=$RPM_BUILD_ROOT
112
113%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
114%py_comp $RPM_BUILD_ROOT%{py_sitedir}
115%py_postclean
116
117%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
118%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
119
120%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
121
f47aec23 122# no configure option to specify location
a0b490d4
MB
123%{__mv} $RPM_BUILD_ROOT{%{_datadir}/gtk-doc/html/libbytesize,%{_gtkdocdir}}
124
125%find_lang %{name}
126
127%clean
128rm -rf $RPM_BUILD_ROOT
129
130%post -p /sbin/ldconfig
131%postun -p /sbin/ldconfig
132
133%files -f %{name}.lang
134%defattr(644,root,root,755)
135%doc README.md
136%attr(755,root,root) %{_libdir}/libbytesize.so.*.*.*
137%attr(755,root,root) %ghost %{_libdir}/libbytesize.so.1
138
139%files devel
140%defattr(644,root,root,755)
141%attr(755,root,root) %{_libdir}/libbytesize.so
142%{_includedir}/bytesize
143%{_pkgconfigdir}/bytesize.pc
144
145%files apidocs
146%defattr(644,root,root,755)
147%{_gtkdocdir}/libbytesize
148
f47aec23 149%if %{with python2}
a0b490d4
MB
150%files -n python-bytesize
151%defattr(644,root,root,755)
152%dir %{py_sitedir}/bytesize
153%{py_sitedir}/bytesize/*.py[co]
f47aec23 154%endif
a0b490d4 155
f47aec23 156%if %{with python3}
a0b490d4
MB
157%files -n python3-bytesize
158%defattr(644,root,root,755)
159%dir %{py3_sitedir}/bytesize
160%{py3_sitedir}/bytesize/__pycache__
161%{py3_sitedir}/bytesize/*.py
f47aec23 162%endif
This page took 0.114772 seconds and 4 git commands to generate.