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++
13 URL: http://botan.randombit.net/
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 BuildRequires: bzip2-devel
22 BuildRequires: gmp-devel
23 BuildRequires: libstdc++-devel
24 BuildRequires: openssl-devel
26 BuildRequires: zlib-devel
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Botan is a BSD-licensed crypto library written in C++. It provides a
31 wide variety of basic cryptographic algorithms, X.509 certificates and
32 CRLs, PKCS \#10 certificate requests, a filter/pipe message processing
33 system, and a wide variety of other features, all written in portable
34 C++. The API reference, tutorial, and examples may help impart the
35 flavor of the library.
38 Summary: Development files for botan
39 Group: Development/Libraries
40 Requires: %{name} = %{version}-%{release}
43 Requires: openssl-devel
48 This package contains libraries and header files for developing
49 applications that use botan.
52 Summary: Static botan library
53 Summary(pl.UTF-8): Statyczna biblioteka botan
54 Group: Development/Libraries
55 Requires: %{name}-devel = %{version}-%{release}
60 %description static -l pl.UTF-8
61 Statyczna biblioteka botan.
64 Summary: botan API documentation
65 Summary(pl.UTF-8): Dokumentacja API biblioteki botan
67 %if "%{_rpmversion}" >= "5"
72 API and internal documentation for botan library.
74 %description apidocs -l pl.UTF-8
75 Dokumentacja API biblioteki botan.
78 %setup -q -n Botan-%{version}
83 # we have the necessary prerequisites, so enable optional modules
84 %define enable_modules gnump,bzip2,zlib,openssl
86 # fixme: maybe disable unix_procs, very slow.
87 %define disable_modules %{nil}
95 --enable-modules=%{enable_modules} \
96 --disable-modules=%{disable_modules}
98 # (ab)using CXX as an easy way to inject our CXXFLAGS
100 CXX="%{__cxx} %{rpmcxxflags}"
104 CXX="%{__cxx} %{rpmcxxflags}" check
106 # these checks would fail
107 mv checks/validate.dat{,.orig}
108 awk '/\[.*\]/{f=0} /\[(RC5.*|RC6|IDEA)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \
109 checks/validate.dat.orig > checks/validate.dat
110 LD_LIBRARY_PATH=. ./check --validate
114 rm -rf $RPM_BUILD_ROOT
116 INSTALL_CMD_EXEC="install -p -m 755" \
117 INSTALL_CMD_DATA="install -p -m 644" \
119 DESTDIR=$RPM_BUILD_ROOT%{_prefix}
121 rm $RPM_BUILD_ROOT%{_bindir}/botan-config
124 rm -rf $RPM_BUILD_ROOT
126 # NOTE: only update ld.so cache, there are no symlinks
127 %post -p /sbin/postshell
129 %postun -p /sbin/postshell
133 %defattr(644,root,root,755)
134 %doc _doc/readme.txt _doc/log.txt _doc/thanks.txt _doc/credits.txt
135 %doc _doc/license.txt _doc/fips140.tex _doc/pgpkeys.asc
137 %attr(755,root,root) %{_libdir}/libbotan-1.8.*.so
140 %defattr(644,root,root,755)
142 %{_libdir}/libbotan.so
143 %{_pkgconfigdir}/botan-1.8.pc
145 %if %{with static_libs}
147 %defattr(644,root,root,755)
148 %{_libdir}/libbotan.a
153 %defattr(644,root,root,755)
155 %doc _doc/api* _doc/tutorial*