]> git.pld-linux.org Git - packages/botan2.git/blame - botan.spec
- updated to 1.10.17 (latests 1.x version; new soname)
[packages/botan2.git] / botan.spec
CommitLineData
7f5657d3
ER
1#
2# Conditional build:
ac90ec63
JB
3%bcond_without tests # unit tests
4%bcond_without apidocs # Sphinx based HTML documentation
5%bcond_without static_libs # static library
6%bcond_without python # Python bindings
7%bcond_without python2 # CPython 2.x binding
8%bcond_without python3 # CPython 3.x binding
7f5657d3 9
ac90ec63
JB
10%if %{without python}
11%undefine with_python2
12%undefine with_python3
13%endif
7f5657d3 14Summary: Crypto library written in C++
93e6aed8 15Summary(pl.UTF-8): Biblioteka kryptograficzna napisana w C++
7f5657d3 16Name: botan
ac90ec63
JB
17Version: 1.10.17
18Release: 1
7f5657d3
ER
19License: BSD
20Group: Libraries
ac90ec63
JB
21Source0: https://botan.randombit.net/releases/Botan-%{version}.tgz
22# Source0-md5: e5ed5dc70edd238c5a2116670b2cb3f3
23Patch0: %{name}-includes.patch
24Patch1: %{name}-python.patch
25URL: https://botan.randombit.net/
7f5657d3
ER
26BuildRequires: bzip2-devel
27BuildRequires: gmp-devel
28BuildRequires: libstdc++-devel
29BuildRequires: openssl-devel
ac90ec63
JB
30BuildRequires: python >= 1:2.6
31BuildRequires: rpm-pythonprov
32BuildRequires: rpmbuild(macros) >= 1.714
33%{?with_apidocs:BuildRequires: sphinx-pdg}
7f5657d3 34BuildRequires: zlib-devel
ac90ec63
JB
35%if %{with python2}
36BuildRequires: boost-python-devel
37BuildRequires: python-devel >= 1:2.6
38%endif
39%if %{with python3}
40BuildRequires: boost-python3-devel
41BuildRequires: python3-devel >= 1:3.2
42%endif
7f5657d3
ER
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%description
46Botan is a BSD-licensed crypto library written in C++. It provides a
47wide variety of basic cryptographic algorithms, X.509 certificates and
93e6aed8 48CRLs, PKCS#10 certificate requests, a filter/pipe message processing
7f5657d3
ER
49system, and a wide variety of other features, all written in portable
50C++. The API reference, tutorial, and examples may help impart the
51flavor of the library.
52
93e6aed8
JB
53%description -l pl.UTF-8
54Botan to biblioteka kryptograficzna na licencji BSD, napisana w C++.
55Zapewnia szeroki zakres algorytmów kryptograficznych, certyfikaty
56X.509 oraz CRL, żądania certyfikatów PKCS#10, system przetwarzania
57komunikatów z filtrowaniem/potokami i wiele innych funkcji, wszystko
58napisane w przenośnym C++. Dodatkowe udogodnienia to dokumentacja API,
59wprowadzenie oraz przykłady.
60
7f5657d3 61%package devel
ac90ec63
JB
62Summary: Header files for Botan library
63Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Botan
7f5657d3
ER
64Group: Development/Libraries
65Requires: %{name} = %{version}-%{release}
66Requires: bzip2-devel
67Requires: gmp-devel
68Requires: openssl-devel
7f5657d3
ER
69Requires: zlib-devel
70
71%description devel
93e6aed8 72This package contains the header files for developing applications
ac90ec63 73that use Botan.
93e6aed8
JB
74
75%description devel
76Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
ac90ec63 77wykorzystujących bibliotekę Botan.
7f5657d3
ER
78
79%package static
ac90ec63
JB
80Summary: Static Botan library
81Summary(pl.UTF-8): Statyczna biblioteka Botan
7f5657d3
ER
82Group: Development/Libraries
83Requires: %{name}-devel = %{version}-%{release}
84
85%description static
ac90ec63 86Static Botan library.
7f5657d3
ER
87
88%description static -l pl.UTF-8
ac90ec63 89Statyczna biblioteka Botan.
7f5657d3
ER
90
91%package apidocs
ac90ec63
JB
92Summary: Botan API documentation
93Summary(pl.UTF-8): Dokumentacja API biblioteki Botan
7f5657d3 94Group: Documentation
fed27784
ER
95%if "%{_rpmversion}" >= "5"
96BuildArch: noarch
97%endif
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}
ac90ec63
JB
131%patch0 -p1
132%patch1 -p1
7f5657d3
ER
133
134%build
135# we have the necessary prerequisites, so enable optional modules
136%define enable_modules gnump,bzip2,zlib,openssl
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
JB
148 --disable-modules=%{disable_modules} \
149%if %{with python}
150 --with-boost-python \
151 --with-python-version=x.y \
152%endif
153 %{?with_apidocs:--with-sphinx}
7f5657d3
ER
154
155# (ab)using CXX as an easy way to inject our CXXFLAGS
156%{__make} \
157 CXX="%{__cxx} %{rpmcxxflags}"
158
ac90ec63
JB
159%if %{with apidocs}
160%{__make} docs
161%endif
162
7f5657d3 163%if %{with tests}
ac90ec63
JB
164%{__make} check \
165 CXX="%{__cxx} %{rpmcxxflags}"
7f5657d3 166
7f5657d3
ER
167LD_LIBRARY_PATH=. ./check --validate
168%endif
169
ac90ec63
JB
170%if %{with python2}
171install -d build/python%{py_ver}
172%{__make} -f Makefile.python \
173 CXX="%{__cxx}" \
174 CFLAGS="%{rpmcxxflags}" \
175 LDFLAGS="%{rpmldflags}" \
176 PY_VER=%{py_ver} \
177 PYTHON_ROOT=%{py_libdir}/config \
178 PYTHON_INC=-I%{py_incdir}
179%endif
180
181%if %{with python3}
182install -d build/python%{py3_ver}
183%{__make} -f Makefile.python \
184 CXX="%{__cxx}" \
185 CFLAGS="%{rpmcxxflags}" \
186 LDFLAGS="%{rpmldflags}" \
187 BOOST_PYTHON=boost_python3 \
188 PY_VER=%{py3_ver} \
189 PYTHON_ROOT=%{py3_libdir}/config \
190 PYTHON_INC=-I%{py3_incdir}
191%endif
192
7f5657d3
ER
193%install
194rm -rf $RPM_BUILD_ROOT
ac90ec63 195
7f5657d3
ER
196%{__make} install \
197 INSTALL_CMD_EXEC="install -p -m 755" \
198 INSTALL_CMD_DATA="install -p -m 644" \
199 DOCDIR=_doc \
200 DESTDIR=$RPM_BUILD_ROOT%{_prefix}
201
ac90ec63
JB
202%if %{with python2}
203%{__make} -f Makefile.python install \
204 PY_VER=%{py_ver} \
205 PYTHON_SITE_PACKAGE_DIR=$RPM_BUILD_ROOT%{py_sitedir}
206
207%py_comp $RPM_BUILD_ROOT%{py_sitedir}
208%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
209%py_postclean
210%endif
211
212%if %{with python3}
213%{__make} -f Makefile.python install \
214 PY_VER=%{py3_ver} \
215 PYTHON_SITE_PACKAGE_DIR=$RPM_BUILD_ROOT%{py3_sitedir}
216
217%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
218%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
219%endif
220
221%if %{with apidocs}
222install -d $RPM_BUILD_ROOT%{_examplesdir}
223cp -pr doc/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
224%endif
f7749ed3 225
7f5657d3
ER
226%clean
227rm -rf $RPM_BUILD_ROOT
228
ac90ec63
JB
229%post -p /sbin/ldconfig
230%postun -p /sbin/ldconfig
7f5657d3
ER
231
232%files
233%defattr(644,root,root,755)
ac90ec63
JB
234%doc readme.txt doc/{algos,credits,faq,index,license,log,support,users}.txt
235%attr(755,root,root) %{_libdir}/libbotan-1.10.so.*.*
236%attr(755,root,root) %ghost %{_libdir}/libbotan-1.10.so.1
7f5657d3
ER
237
238%files devel
239%defattr(644,root,root,755)
ac90ec63
JB
240%attr(755,root,root) %{_bindir}/botan-config-1.10
241%attr(755,root,root) %{_libdir}/libbotan-1.10.so
242%{_includedir}/botan-1.10
243%{_pkgconfigdir}/botan-1.10.pc
7f5657d3
ER
244
245%if %{with static_libs}
246%files static
247%defattr(644,root,root,755)
ac90ec63 248%{_libdir}/libbotan-1.10.a
7f5657d3
ER
249%endif
250
251%if %{with apidocs}
252%files apidocs
253%defattr(644,root,root,755)
ac90ec63
JB
254%doc _doc/manual/{_static,*.html,*.js}
255%{_examplesdir}/%{name}-%{version}
256%endif
257
258%if %{with python2}
259%files -n python-botan
260%defattr(644,root,root,755)
261%dir %{py_sitedir}/botan
262%attr(755,root,root) %{py_sitedir}/botan/_botan.so
263%{py_sitedir}/botan/__init__.py[co]
264%endif
265
266%if %{with python3}
267%files -n python3-botan
268%defattr(644,root,root,755)
269%dir %{py3_sitedir}/botan
270%attr(755,root,root) %{py3_sitedir}/botan/_botan.so
271%{py3_sitedir}/botan/__init__.py
272%{py3_sitedir}/botan/__pycache__
7f5657d3 273%endif
This page took 0.258165 seconds and 4 git commands to generate.