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