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