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