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