]> git.pld-linux.org Git - packages/botan2.git/blame - botan2.spec
- disable os_utils test, not a builder material
[packages/botan2.git] / botan2.spec
CommitLineData
189a518b 1# TODO: fix sphinx docs build (sphinx-build hangs?)
7f5657d3
ER
2#
3# Conditional build:
ac90ec63 4%bcond_without tests # unit tests
189a518b 5%bcond_with apidocs # Sphinx based HTML documentation [hangs, FIXME]
ac90ec63
JB
6%bcond_without static_libs # static library
7%bcond_without python # Python bindings
8%bcond_without python2 # CPython 2.x binding
9%bcond_without python3 # CPython 3.x binding
ec7c6d4b 10%bcond_with openssl # OpenSSL provider
7f5657d3 11
ac90ec63
JB
12%if %{without python}
13%undefine with_python2
14%undefine with_python3
15%endif
7f5657d3 16Summary: Crypto library written in C++
93e6aed8 17Summary(pl.UTF-8): Biblioteka kryptograficzna napisana w C++
189a518b 18Name: botan2
78c6e18a 19Version: 2.18.1
ec7c6d4b 20Release: 1
7f5657d3
ER
21License: BSD
22Group: Libraries
a888e6ef 23Source0: https://botan.randombit.net/releases/Botan-%{version}.tar.xz
78c6e18a 24# Source0-md5: 77c558179f276273e0bf39ef941d36c5
ac90ec63 25URL: https://botan.randombit.net/
7f5657d3 26BuildRequires: bzip2-devel
7f5657d3 27BuildRequires: libstdc++-devel
ec7c6d4b 28%{?with_openssl:BuildRequires: openssl-devel}
189a518b 29BuildRequires: python >= 1:2.7
ac90ec63
JB
30BuildRequires: rpm-pythonprov
31BuildRequires: rpmbuild(macros) >= 1.714
32%{?with_apidocs:BuildRequires: sphinx-pdg}
7f5657d3 33BuildRequires: zlib-devel
ac90ec63 34%if %{with python2}
189a518b 35BuildRequires: python-devel >= 1:2.7
ac90ec63
JB
36%endif
37%if %{with python3}
189a518b 38BuildRequires: python3-devel >= 1:3.4
ac90ec63 39%endif
7f5657d3
ER
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43Botan is a BSD-licensed crypto library written in C++. It provides a
44wide variety of basic cryptographic algorithms, X.509 certificates and
93e6aed8 45CRLs, PKCS#10 certificate requests, a filter/pipe message processing
7f5657d3
ER
46system, and a wide variety of other features, all written in portable
47C++. The API reference, tutorial, and examples may help impart the
48flavor of the library.
49
93e6aed8
JB
50%description -l pl.UTF-8
51Botan to biblioteka kryptograficzna na licencji BSD, napisana w C++.
52Zapewnia szeroki zakres algorytmów kryptograficznych, certyfikaty
53X.509 oraz CRL, żądania certyfikatów PKCS#10, system przetwarzania
54komunikatów z filtrowaniem/potokami i wiele innych funkcji, wszystko
55napisane w przenośnym C++. Dodatkowe udogodnienia to dokumentacja API,
56wprowadzenie oraz przykłady.
57
7f5657d3 58%package devel
ac90ec63
JB
59Summary: Header files for Botan library
60Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Botan
7f5657d3
ER
61Group: Development/Libraries
62Requires: %{name} = %{version}-%{release}
63Requires: bzip2-devel
64Requires: gmp-devel
ec7c6d4b 65%{?with_openssl:Requires: openssl-devel}
7f5657d3
ER
66Requires: zlib-devel
67
68%description devel
93e6aed8 69This package contains the header files for developing applications
ac90ec63 70that use Botan.
93e6aed8 71
a888e6ef 72%description devel -l pl.UTF-8
93e6aed8 73Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
ac90ec63 74wykorzystujących bibliotekę Botan.
7f5657d3
ER
75
76%package static
ac90ec63
JB
77Summary: Static Botan library
78Summary(pl.UTF-8): Statyczna biblioteka Botan
7f5657d3
ER
79Group: Development/Libraries
80Requires: %{name}-devel = %{version}-%{release}
81
82%description static
ac90ec63 83Static Botan library.
7f5657d3
ER
84
85%description static -l pl.UTF-8
ac90ec63 86Statyczna biblioteka Botan.
7f5657d3
ER
87
88%package apidocs
ac90ec63
JB
89Summary: Botan API documentation
90Summary(pl.UTF-8): Dokumentacja API biblioteki Botan
7f5657d3 91Group: Documentation
fed27784 92BuildArch: noarch
7f5657d3
ER
93
94%description apidocs
ac90ec63 95API and internal documentation for Botan library.
7f5657d3
ER
96
97%description apidocs -l pl.UTF-8
ac90ec63
JB
98Dokumentacja API biblioteki Botan.
99
100%package -n python-botan
101Summary: Python 2.x binding for Botan library
102Summary(pl.UTF-8): Wiązanie Pythona 2.x do biblioteki Botan
103Group: Libraries/Python
104Requires: %{name} = %{version}-%{release}
105
106%description -n python-botan
107Python 2.x binding for Botan library.
108
109%description -n python-botan -l pl.UTF-8
110Wiązanie Pythona 2.x do biblioteki Botan.
111
112%package -n python3-botan
113Summary: Python 3.x binding for Botan library
114Summary(pl.UTF-8): Wiązanie Pythona 3.x do biblioteki Botan
115Group: Libraries/Python
116Requires: %{name} = %{version}-%{release}
117
118%description -n python3-botan
119Python 3.x binding for Botan library.
120
121%description -n python3-botan -l pl.UTF-8
122Wiązanie Pythona 3.x do biblioteki Botan.
7f5657d3
ER
123
124%prep
125%setup -q -n Botan-%{version}
189a518b
JB
126
127# kill shebang, nothing to execute directly
128%{__sed} -i -e '1d' src/python/botan2.py
7f5657d3
ER
129
130%build
131# we have the necessary prerequisites, so enable optional modules
ec7c6d4b 132%define enable_modules bzip2,lzma,zlib,%{?with_openssl:openssl},sqlite3,tpm,pkcs11
7f5657d3
ER
133
134# fixme: maybe disable unix_procs, very slow.
135%define disable_modules %{nil}
136
137./configure.py \
138 --prefix=%{_prefix} \
139 --libdir=%{_lib} \
140 --cc=gcc \
141 --os=linux \
142 --cpu=%{_arch} \
143 --enable-modules=%{enable_modules} \
ac90ec63 144 --disable-modules=%{disable_modules} \
189a518b
JB
145%if %{with python2}
146 --with-python-version=%{py_ver} \
ac90ec63 147%endif
189a518b 148 %{!?with_apidocs:--without-sphinx}
7f5657d3
ER
149
150# (ab)using CXX as an easy way to inject our CXXFLAGS
151%{__make} \
189a518b
JB
152 CXX="%{__cxx} -pthread" \
153 CXXFLAGS="%{rpmcxxflags}"
7f5657d3 154
ac90ec63
JB
155%if %{with apidocs}
156%{__make} docs
157%endif
158
7f5657d3 159%if %{with tests}
ec7c6d4b 160# certstor_system test is trying tp look up expired certs
2773c974
JR
161# os_utils fail on builders
162LD_LIBRARY_PATH=. ./botan-test --skip-tests=certstor_system,os_utils
ac90ec63
JB
163%endif
164
7f5657d3
ER
165%install
166rm -rf $RPM_BUILD_ROOT
ac90ec63 167
7f5657d3
ER
168%{__make} install \
169 INSTALL_CMD_EXEC="install -p -m 755" \
170 INSTALL_CMD_DATA="install -p -m 644" \
189a518b 171 DESTDIR=$RPM_BUILD_ROOT
7f5657d3 172
ac90ec63 173%if %{with python2}
ac90ec63
JB
174%py_comp $RPM_BUILD_ROOT%{py_sitedir}
175%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
176%py_postclean
177%endif
178
179%if %{with python3}
189a518b
JB
180install -d $RPM_BUILD_ROOT%{py3_sitedir}
181cp -p src/python/botan2.py $RPM_BUILD_ROOT%{py3_sitedir}
ac90ec63
JB
182%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
183%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
184%endif
185
189a518b
JB
186# packaged as %doc
187%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/botan-%{version}
188
ac90ec63
JB
189%if %{with apidocs}
190install -d $RPM_BUILD_ROOT%{_examplesdir}
191cp -pr doc/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
192%endif
f7749ed3 193
7f5657d3
ER
194%clean
195rm -rf $RPM_BUILD_ROOT
196
ac90ec63
JB
197%post -p /sbin/ldconfig
198%postun -p /sbin/ldconfig
7f5657d3
ER
199
200%files
201%defattr(644,root,root,755)
a888e6ef 202%doc license.txt news.rst readme.rst doc/{authors.txt,credits.rst,security.rst}
189a518b
JB
203%attr(755,root,root) %{_bindir}/botan
204%attr(755,root,root) %{_libdir}/libbotan-2.so.*.*
ec7c6d4b 205%attr(755,root,root) %ghost %{_libdir}/libbotan-2.so.18
189a518b 206%{_mandir}/man1/botan.1*
7f5657d3
ER
207
208%files devel
209%defattr(644,root,root,755)
189a518b
JB
210%attr(755,root,root) %{_libdir}/libbotan-2.so
211%{_includedir}/botan-2
212%{_pkgconfigdir}/botan-2.pc
7f5657d3
ER
213
214%if %{with static_libs}
215%files static
216%defattr(644,root,root,755)
189a518b 217%{_libdir}/libbotan-2.a
7f5657d3
ER
218%endif
219
220%if %{with apidocs}
221%files apidocs
222%defattr(644,root,root,755)
189a518b 223# FIXME: update path after fixing sphinx build
ac90ec63
JB
224%doc _doc/manual/{_static,*.html,*.js}
225%{_examplesdir}/%{name}-%{version}
226%endif
227
228%if %{with python2}
229%files -n python-botan
230%defattr(644,root,root,755)
189a518b 231%{py_sitedir}/botan2.py[co]
ac90ec63
JB
232%endif
233
234%if %{with python3}
235%files -n python3-botan
236%defattr(644,root,root,755)
189a518b
JB
237%{py3_sitedir}/botan2.py
238%{py3_sitedir}/__pycache__/botan2.cpython-*.py[co]
7f5657d3 239%endif
This page took 0.087797 seconds and 4 git commands to generate.