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