]>
Commit | Line | Data |
---|---|---|
7f5657d3 ER |
1 | # |
2 | # Conditional build: | |
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 | |
6 | ||
7 | Summary: Crypto library written in C++ | |
93e6aed8 | 8 | Summary(pl.UTF-8): Biblioteka kryptograficzna napisana w C++ |
7f5657d3 | 9 | Name: botan |
6f955439 | 10 | Version: 1.8.14 |
fed27784 | 11 | Release: 3 |
7f5657d3 ER |
12 | License: BSD |
13 | Group: Libraries | |
7f5657d3 ER |
14 | # tarfile is stripped using repack.sh. original tarfile to be found |
15 | # here: http://files.randombit.net/botan/Botan-%%{version}.tbz | |
6f955439 AM |
16 | Source0: http://pkgs.fedoraproject.org/repo/pkgs/botan/Botan-%{version}.stripped.tbz/4b5ce78b1cfc0735eb7ec4f6903068ca/Botan-%{version}.stripped.tbz |
17 | # Source0-md5: 4b5ce78b1cfc0735eb7ec4f6903068ca | |
7f5657d3 ER |
18 | Source1: README.fedora |
19 | # soname was changed unintentionally upstream, revert it. | |
20 | Patch0: soname.patch | |
93e6aed8 | 21 | URL: http://botan.randombit.net/ |
7f5657d3 ER |
22 | BuildRequires: bzip2-devel |
23 | BuildRequires: gmp-devel | |
24 | BuildRequires: libstdc++-devel | |
25 | BuildRequires: openssl-devel | |
26 | BuildRequires: python | |
27 | BuildRequires: zlib-devel | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
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 | |
93e6aed8 | 33 | CRLs, PKCS#10 certificate requests, a filter/pipe message processing |
7f5657d3 ER |
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. | |
37 | ||
93e6aed8 JB |
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. | |
45 | ||
7f5657d3 | 46 | %package devel |
93e6aed8 JB |
47 | Summary: Header files for botan library |
48 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki botan | |
7f5657d3 ER |
49 | Group: Development/Libraries |
50 | Requires: %{name} = %{version}-%{release} | |
51 | Requires: bzip2-devel | |
52 | Requires: gmp-devel | |
53 | Requires: openssl-devel | |
7f5657d3 ER |
54 | Requires: zlib-devel |
55 | ||
56 | %description devel | |
93e6aed8 JB |
57 | This package contains the header files for developing applications |
58 | that use botan. | |
59 | ||
60 | %description devel | |
61 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
62 | wykorzystujących bibliotekę botan. | |
7f5657d3 ER |
63 | |
64 | %package static | |
65 | Summary: Static botan library | |
66 | Summary(pl.UTF-8): Statyczna biblioteka botan | |
67 | Group: Development/Libraries | |
68 | Requires: %{name}-devel = %{version}-%{release} | |
69 | ||
70 | %description static | |
71 | Static botan library. | |
72 | ||
73 | %description static -l pl.UTF-8 | |
74 | Statyczna biblioteka botan. | |
75 | ||
76 | %package apidocs | |
77 | Summary: botan API documentation | |
78 | Summary(pl.UTF-8): Dokumentacja API biblioteki botan | |
79 | Group: Documentation | |
fed27784 ER |
80 | %if "%{_rpmversion}" >= "5" |
81 | BuildArch: noarch | |
82 | %endif | |
7f5657d3 ER |
83 | |
84 | %description apidocs | |
85 | API and internal documentation for botan library. | |
86 | ||
87 | %description apidocs -l pl.UTF-8 | |
88 | Dokumentacja API biblioteki botan. | |
89 | ||
90 | %prep | |
91 | %setup -q -n Botan-%{version} | |
92 | %patch0 -p0 | |
93 | cp -p %{SOURCE1} . | |
94 | ||
95 | %build | |
96 | # we have the necessary prerequisites, so enable optional modules | |
97 | %define enable_modules gnump,bzip2,zlib,openssl | |
98 | ||
99 | # fixme: maybe disable unix_procs, very slow. | |
100 | %define disable_modules %{nil} | |
101 | ||
102 | ./configure.py \ | |
103 | --prefix=%{_prefix} \ | |
104 | --libdir=%{_lib} \ | |
105 | --cc=gcc \ | |
106 | --os=linux \ | |
107 | --cpu=%{_arch} \ | |
108 | --enable-modules=%{enable_modules} \ | |
109 | --disable-modules=%{disable_modules} | |
110 | ||
111 | # (ab)using CXX as an easy way to inject our CXXFLAGS | |
112 | %{__make} \ | |
113 | CXX="%{__cxx} %{rpmcxxflags}" | |
114 | ||
115 | %if %{with tests} | |
116 | %{__make} \ | |
117 | CXX="%{__cxx} %{rpmcxxflags}" check | |
118 | ||
119 | # these checks would fail | |
93e6aed8 | 120 | %{__mv} checks/validate.dat{,.orig} |
7f5657d3 ER |
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 | |
124 | %endif | |
125 | ||
126 | %install | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | %{__make} install \ | |
129 | INSTALL_CMD_EXEC="install -p -m 755" \ | |
130 | INSTALL_CMD_DATA="install -p -m 644" \ | |
131 | DOCDIR=_doc \ | |
132 | DESTDIR=$RPM_BUILD_ROOT%{_prefix} | |
133 | ||
f7749ed3 AM |
134 | rm $RPM_BUILD_ROOT%{_bindir}/botan-config |
135 | ||
7f5657d3 ER |
136 | %clean |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
923e0086 ER |
139 | # NOTE: only update ld.so cache, there are no symlinks |
140 | %post -p /sbin/postshell | |
141 | /sbin/ldconfig -X | |
142 | %postun -p /sbin/postshell | |
143 | /sbin/ldconfig -X | |
7f5657d3 ER |
144 | |
145 | %files | |
146 | %defattr(644,root,root,755) | |
93e6aed8 | 147 | %doc _doc/{credits,license,log,readme,thanks}.txt _doc/{fips140.tex,pgpkeys.asc} README.fedora |
7f5657d3 ER |
148 | %attr(755,root,root) %{_libdir}/libbotan-1.8.*.so |
149 | ||
150 | %files devel | |
151 | %defattr(644,root,root,755) | |
93e6aed8 | 152 | %attr(755,root,root) %{_libdir}/libbotan.so |
7f5657d3 | 153 | %{_includedir}/botan |
7f5657d3 ER |
154 | %{_pkgconfigdir}/botan-1.8.pc |
155 | ||
156 | %if %{with static_libs} | |
157 | %files static | |
158 | %defattr(644,root,root,755) | |
159 | %{_libdir}/libbotan.a | |
160 | %endif | |
161 | ||
162 | %if %{with apidocs} | |
163 | %files apidocs | |
164 | %defattr(644,root,root,755) | |
93e6aed8 | 165 | %doc doc/examples _doc/{api*,tutorial*} |
7f5657d3 | 166 | %endif |