3 %bcond_without tests # build without tests
4 %bcond_without apidocs # do not build and package API docs
5 %bcond_without static_libs # don't build static libraries
7 Summary: Crypto library written in C++
8 Summary(pl.UTF-8): Biblioteka kryptograficzna napisana w C++
14 # tarfile is stripped using repack.sh. original tarfile to be found
15 # here: http://files.randombit.net/botan/Botan-%%{version}.tbz
16 Source0: http://pkgs.fedoraproject.org/repo/pkgs/botan/Botan-%{version}.stripped.tbz/4b5ce78b1cfc0735eb7ec4f6903068ca/Botan-%{version}.stripped.tbz
17 # Source0-md5: 4b5ce78b1cfc0735eb7ec4f6903068ca
18 Source1: README.fedora
19 # soname was changed unintentionally upstream, revert it.
21 URL: http://botan.randombit.net/
22 BuildRequires: bzip2-devel
23 BuildRequires: gmp-devel
24 BuildRequires: libstdc++-devel
25 BuildRequires: openssl-devel
27 BuildRequires: zlib-devel
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Botan is a BSD-licensed crypto library written in C++. It provides a
32 wide variety of basic cryptographic algorithms, X.509 certificates and
33 CRLs, PKCS#10 certificate requests, a filter/pipe message processing
34 system, and a wide variety of other features, all written in portable
35 C++. The API reference, tutorial, and examples may help impart the
36 flavor of the library.
38 %description -l pl.UTF-8
39 Botan to biblioteka kryptograficzna na licencji BSD, napisana w C++.
40 Zapewnia szeroki zakres algorytmów kryptograficznych, certyfikaty
41 X.509 oraz CRL, żądania certyfikatów PKCS#10, system przetwarzania
42 komunikatów z filtrowaniem/potokami i wiele innych funkcji, wszystko
43 napisane w przenośnym C++. Dodatkowe udogodnienia to dokumentacja API,
44 wprowadzenie oraz przykłady.
47 Summary: Header files for botan library
48 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki botan
49 Group: Development/Libraries
50 Requires: %{name} = %{version}-%{release}
53 Requires: openssl-devel
57 This package contains the header files for developing applications
61 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
62 wykorzystujących bibliotekę botan.
65 Summary: Static botan library
66 Summary(pl.UTF-8): Statyczna biblioteka botan
67 Group: Development/Libraries
68 Requires: %{name}-devel = %{version}-%{release}
73 %description static -l pl.UTF-8
74 Statyczna biblioteka botan.
77 Summary: botan API documentation
78 Summary(pl.UTF-8): Dokumentacja API biblioteki botan
80 %if "%{_rpmversion}" >= "5"
85 API and internal documentation for botan library.
87 %description apidocs -l pl.UTF-8
88 Dokumentacja API biblioteki botan.
91 %setup -q -n Botan-%{version}
96 # we have the necessary prerequisites, so enable optional modules
97 %define enable_modules gnump,bzip2,zlib,openssl
99 # fixme: maybe disable unix_procs, very slow.
100 %define disable_modules %{nil}
103 --prefix=%{_prefix} \
108 --enable-modules=%{enable_modules} \
109 --disable-modules=%{disable_modules}
111 # (ab)using CXX as an easy way to inject our CXXFLAGS
113 CXX="%{__cxx} %{rpmcxxflags}"
117 CXX="%{__cxx} %{rpmcxxflags}" check
119 # these checks would fail
120 %{__mv} checks/validate.dat{,.orig}
121 awk '/\[.*\]/{f=0} /\[(RC5.*|RC6|IDEA)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \
122 checks/validate.dat.orig > checks/validate.dat
123 LD_LIBRARY_PATH=. ./check --validate
127 rm -rf $RPM_BUILD_ROOT
129 INSTALL_CMD_EXEC="install -p -m 755" \
130 INSTALL_CMD_DATA="install -p -m 644" \
132 DESTDIR=$RPM_BUILD_ROOT%{_prefix}
134 rm $RPM_BUILD_ROOT%{_bindir}/botan-config
137 rm -rf $RPM_BUILD_ROOT
139 # NOTE: only update ld.so cache, there are no symlinks
140 %post -p /sbin/postshell
142 %postun -p /sbin/postshell
146 %defattr(644,root,root,755)
147 %doc _doc/{credits,license,log,readme,thanks}.txt _doc/{fips140.tex,pgpkeys.asc} README.fedora
148 %attr(755,root,root) %{_libdir}/libbotan-1.8.*.so
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/libbotan.so
154 %{_pkgconfigdir}/botan-1.8.pc
156 %if %{with static_libs}
158 %defattr(644,root,root,755)
159 %{_libdir}/libbotan.a
164 %defattr(644,root,root,755)
165 %doc doc/examples _doc/{api*,tutorial*}