]> git.pld-linux.org Git - packages/botan2.git/blame_incremental - botan.spec
- updated to 1.10.17 (latests 1.x version; new soname)
[packages/botan2.git] / botan.spec
... / ...
CommitLineData
1#
2# Conditional build:
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
9
10%if %{without python}
11%undefine with_python2
12%undefine with_python3
13%endif
14Summary: Crypto library written in C++
15Summary(pl.UTF-8): Biblioteka kryptograficzna napisana w C++
16Name: botan
17Version: 1.10.17
18Release: 1
19License: BSD
20Group: Libraries
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/
26BuildRequires: bzip2-devel
27BuildRequires: gmp-devel
28BuildRequires: libstdc++-devel
29BuildRequires: openssl-devel
30BuildRequires: python >= 1:2.6
31BuildRequires: rpm-pythonprov
32BuildRequires: rpmbuild(macros) >= 1.714
33%{?with_apidocs:BuildRequires: sphinx-pdg}
34BuildRequires: zlib-devel
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
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
48CRLs, PKCS#10 certificate requests, a filter/pipe message processing
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
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
61%package devel
62Summary: Header files for Botan library
63Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Botan
64Group: Development/Libraries
65Requires: %{name} = %{version}-%{release}
66Requires: bzip2-devel
67Requires: gmp-devel
68Requires: openssl-devel
69Requires: zlib-devel
70
71%description devel
72This package contains the header files for developing applications
73that use Botan.
74
75%description devel
76Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
77wykorzystujących bibliotekę Botan.
78
79%package static
80Summary: Static Botan library
81Summary(pl.UTF-8): Statyczna biblioteka Botan
82Group: Development/Libraries
83Requires: %{name}-devel = %{version}-%{release}
84
85%description static
86Static Botan library.
87
88%description static -l pl.UTF-8
89Statyczna biblioteka Botan.
90
91%package apidocs
92Summary: Botan API documentation
93Summary(pl.UTF-8): Dokumentacja API biblioteki Botan
94Group: Documentation
95%if "%{_rpmversion}" >= "5"
96BuildArch: noarch
97%endif
98
99%description apidocs
100API and internal documentation for Botan library.
101
102%description apidocs -l pl.UTF-8
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.
128
129%prep
130%setup -q -n Botan-%{version}
131%patch0 -p1
132%patch1 -p1
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} \
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}
154
155# (ab)using CXX as an easy way to inject our CXXFLAGS
156%{__make} \
157 CXX="%{__cxx} %{rpmcxxflags}"
158
159%if %{with apidocs}
160%{__make} docs
161%endif
162
163%if %{with tests}
164%{__make} check \
165 CXX="%{__cxx} %{rpmcxxflags}"
166
167LD_LIBRARY_PATH=. ./check --validate
168%endif
169
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
193%install
194rm -rf $RPM_BUILD_ROOT
195
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
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
225
226%clean
227rm -rf $RPM_BUILD_ROOT
228
229%post -p /sbin/ldconfig
230%postun -p /sbin/ldconfig
231
232%files
233%defattr(644,root,root,755)
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
237
238%files devel
239%defattr(644,root,root,755)
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
244
245%if %{with static_libs}
246%files static
247%defattr(644,root,root,755)
248%{_libdir}/libbotan-1.10.a
249%endif
250
251%if %{with apidocs}
252%files apidocs
253%defattr(644,root,root,755)
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__
273%endif
This page took 0.049561 seconds and 4 git commands to generate.