]> git.pld-linux.org Git - packages/botan.git/blame - botan.spec
- release 4 (by relup.sh)
[packages/botan.git] / botan.spec
CommitLineData
ff65fdf7 1# NOTE: for botan 2.x see botan2.spec
7f5657d3
ER
2#
3# Conditional build:
ac90ec63
JB
4%bcond_without tests # unit tests
5%bcond_without apidocs # Sphinx based HTML documentation
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++
7f5657d3 17Name: botan
ac90ec63 18Version: 1.10.17
ec76faf7 19Release: 4
7f5657d3
ER
20License: BSD
21Group: Libraries
ac90ec63
JB
22Source0: https://botan.randombit.net/releases/Botan-%{version}.tgz
23# Source0-md5: e5ed5dc70edd238c5a2116670b2cb3f3
24Patch0: %{name}-includes.patch
25Patch1: %{name}-python.patch
26URL: https://botan.randombit.net/
7f5657d3
ER
27BuildRequires: bzip2-devel
28BuildRequires: gmp-devel
29BuildRequires: libstdc++-devel
30BuildRequires: openssl-devel
ac90ec63
JB
31BuildRequires: python >= 1:2.6
32BuildRequires: rpm-pythonprov
33BuildRequires: rpmbuild(macros) >= 1.714
34%{?with_apidocs:BuildRequires: sphinx-pdg}
7f5657d3 35BuildRequires: zlib-devel
ac90ec63
JB
36%if %{with python2}
37BuildRequires: boost-python-devel
38BuildRequires: python-devel >= 1:2.6
39%endif
40%if %{with python3}
41BuildRequires: boost-python3-devel
42BuildRequires: python3-devel >= 1:3.2
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
69Requires: 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
JB
75
76%description devel
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
ER
96%if "%{_rpmversion}" >= "5"
97BuildArch: noarch
98%endif
7f5657d3
ER
99
100%description apidocs
ac90ec63 101API and internal documentation for Botan library.
7f5657d3
ER
102
103%description apidocs -l pl.UTF-8
ac90ec63
JB
104Dokumentacja API biblioteki Botan.
105
106%package -n python-botan
107Summary: Python 2.x binding for Botan library
108Summary(pl.UTF-8): Wiązanie Pythona 2.x do biblioteki Botan
109Group: Libraries/Python
110Requires: %{name} = %{version}-%{release}
111
112%description -n python-botan
113Python 2.x binding for Botan library.
114
115%description -n python-botan -l pl.UTF-8
116Wiązanie Pythona 2.x do biblioteki Botan.
117
118%package -n python3-botan
119Summary: Python 3.x binding for Botan library
120Summary(pl.UTF-8): Wiązanie Pythona 3.x do biblioteki Botan
121Group: Libraries/Python
122Requires: %{name} = %{version}-%{release}
123
124%description -n python3-botan
125Python 3.x binding for Botan library.
126
127%description -n python3-botan -l pl.UTF-8
128Wiązanie Pythona 3.x do biblioteki Botan.
7f5657d3
ER
129
130%prep
131%setup -q -n Botan-%{version}
ac90ec63
JB
132%patch0 -p1
133%patch1 -p1
7f5657d3
ER
134
135%build
136# we have the necessary prerequisites, so enable optional modules
137%define enable_modules gnump,bzip2,zlib,openssl
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 \
3bd15bf0 147 --cpu=%{_target_base_arch} \
7f5657d3 148 --enable-modules=%{enable_modules} \
ac90ec63
JB
149 --disable-modules=%{disable_modules} \
150%if %{with python}
151 --with-boost-python \
152 --with-python-version=x.y \
153%endif
154 %{?with_apidocs:--with-sphinx}
7f5657d3
ER
155
156# (ab)using CXX as an easy way to inject our CXXFLAGS
157%{__make} \
158 CXX="%{__cxx} %{rpmcxxflags}"
159
ac90ec63
JB
160%if %{with apidocs}
161%{__make} docs
162%endif
163
7f5657d3 164%if %{with tests}
ac90ec63
JB
165%{__make} check \
166 CXX="%{__cxx} %{rpmcxxflags}"
7f5657d3 167
7f5657d3
ER
168LD_LIBRARY_PATH=. ./check --validate
169%endif
170
ac90ec63
JB
171%if %{with python2}
172install -d build/python%{py_ver}
173%{__make} -f Makefile.python \
174 CXX="%{__cxx}" \
175 CFLAGS="%{rpmcxxflags}" \
176 LDFLAGS="%{rpmldflags}" \
177 PY_VER=%{py_ver} \
178 PYTHON_ROOT=%{py_libdir}/config \
179 PYTHON_INC=-I%{py_incdir}
180%endif
181
182%if %{with python3}
183install -d build/python%{py3_ver}
184%{__make} -f Makefile.python \
185 CXX="%{__cxx}" \
186 CFLAGS="%{rpmcxxflags}" \
187 LDFLAGS="%{rpmldflags}" \
188 BOOST_PYTHON=boost_python3 \
189 PY_VER=%{py3_ver} \
190 PYTHON_ROOT=%{py3_libdir}/config \
191 PYTHON_INC=-I%{py3_incdir}
192%endif
193
7f5657d3
ER
194%install
195rm -rf $RPM_BUILD_ROOT
ac90ec63 196
7f5657d3
ER
197%{__make} install \
198 INSTALL_CMD_EXEC="install -p -m 755" \
199 INSTALL_CMD_DATA="install -p -m 644" \
200 DOCDIR=_doc \
201 DESTDIR=$RPM_BUILD_ROOT%{_prefix}
202
ac90ec63
JB
203%if %{with python2}
204%{__make} -f Makefile.python install \
205 PY_VER=%{py_ver} \
206 PYTHON_SITE_PACKAGE_DIR=$RPM_BUILD_ROOT%{py_sitedir}
207
208%py_comp $RPM_BUILD_ROOT%{py_sitedir}
209%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
210%py_postclean
211%endif
212
213%if %{with python3}
214%{__make} -f Makefile.python install \
215 PY_VER=%{py3_ver} \
216 PYTHON_SITE_PACKAGE_DIR=$RPM_BUILD_ROOT%{py3_sitedir}
217
218%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
219%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
220%endif
221
222%if %{with apidocs}
223install -d $RPM_BUILD_ROOT%{_examplesdir}
224cp -pr doc/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
225%endif
f7749ed3 226
7f5657d3
ER
227%clean
228rm -rf $RPM_BUILD_ROOT
229
ac90ec63
JB
230%post -p /sbin/ldconfig
231%postun -p /sbin/ldconfig
7f5657d3
ER
232
233%files
234%defattr(644,root,root,755)
ac90ec63
JB
235%doc readme.txt doc/{algos,credits,faq,index,license,log,support,users}.txt
236%attr(755,root,root) %{_libdir}/libbotan-1.10.so.*.*
237%attr(755,root,root) %ghost %{_libdir}/libbotan-1.10.so.1
7f5657d3
ER
238
239%files devel
240%defattr(644,root,root,755)
ac90ec63
JB
241%attr(755,root,root) %{_bindir}/botan-config-1.10
242%attr(755,root,root) %{_libdir}/libbotan-1.10.so
243%{_includedir}/botan-1.10
244%{_pkgconfigdir}/botan-1.10.pc
7f5657d3
ER
245
246%if %{with static_libs}
247%files static
248%defattr(644,root,root,755)
ac90ec63 249%{_libdir}/libbotan-1.10.a
7f5657d3
ER
250%endif
251
252%if %{with apidocs}
253%files apidocs
254%defattr(644,root,root,755)
ac90ec63
JB
255%doc _doc/manual/{_static,*.html,*.js}
256%{_examplesdir}/%{name}-%{version}
257%endif
258
259%if %{with python2}
260%files -n python-botan
261%defattr(644,root,root,755)
262%dir %{py_sitedir}/botan
263%attr(755,root,root) %{py_sitedir}/botan/_botan.so
264%{py_sitedir}/botan/__init__.py[co]
265%endif
266
267%if %{with python3}
268%files -n python3-botan
269%defattr(644,root,root,755)
270%dir %{py3_sitedir}/botan
271%attr(755,root,root) %{py3_sitedir}/botan/_botan.so
272%{py3_sitedir}/botan/__init__.py
273%{py3_sitedir}/botan/__pycache__
7f5657d3 274%endif
This page took 0.105364 seconds and 4 git commands to generate.