]> git.pld-linux.org Git - packages/botan2.git/blame_incremental - botan.spec
noarch apidocs
[packages/botan2.git] / botan.spec
... / ...
CommitLineData
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
7Summary: Crypto library written in C++
8Name: botan
9Version: 1.8.14
10Release: 3
11License: BSD
12Group: Libraries
13URL: 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
16Source0: http://pkgs.fedoraproject.org/repo/pkgs/botan/Botan-%{version}.stripped.tbz/4b5ce78b1cfc0735eb7ec4f6903068ca/Botan-%{version}.stripped.tbz
17# Source0-md5: 4b5ce78b1cfc0735eb7ec4f6903068ca
18Source1: README.fedora
19# soname was changed unintentionally upstream, revert it.
20Patch0: soname.patch
21BuildRequires: bzip2-devel
22BuildRequires: gmp-devel
23BuildRequires: libstdc++-devel
24BuildRequires: openssl-devel
25BuildRequires: python
26BuildRequires: zlib-devel
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30Botan is a BSD-licensed crypto library written in C++. It provides a
31wide variety of basic cryptographic algorithms, X.509 certificates and
32CRLs, PKCS \#10 certificate requests, a filter/pipe message processing
33system, and a wide variety of other features, all written in portable
34C++. The API reference, tutorial, and examples may help impart the
35flavor of the library.
36
37%package devel
38Summary: Development files for botan
39Group: Development/Libraries
40Requires: %{name} = %{version}-%{release}
41Requires: bzip2-devel
42Requires: gmp-devel
43Requires: openssl-devel
44Requires: pkgconfig
45Requires: zlib-devel
46
47%description devel
48This package contains libraries and header files for developing
49applications that use botan.
50
51%package static
52Summary: Static botan library
53Summary(pl.UTF-8): Statyczna biblioteka botan
54Group: Development/Libraries
55Requires: %{name}-devel = %{version}-%{release}
56
57%description static
58Static botan library.
59
60%description static -l pl.UTF-8
61Statyczna biblioteka botan.
62
63%package apidocs
64Summary: botan API documentation
65Summary(pl.UTF-8): Dokumentacja API biblioteki botan
66Group: Documentation
67%if "%{_rpmversion}" >= "5"
68BuildArch: noarch
69%endif
70
71%description apidocs
72API and internal documentation for botan library.
73
74%description apidocs -l pl.UTF-8
75Dokumentacja API biblioteki botan.
76
77%prep
78%setup -q -n Botan-%{version}
79%patch0 -p0
80cp -p %{SOURCE1} .
81
82%build
83# we have the necessary prerequisites, so enable optional modules
84%define enable_modules gnump,bzip2,zlib,openssl
85
86# fixme: maybe disable unix_procs, very slow.
87%define disable_modules %{nil}
88
89./configure.py \
90 --prefix=%{_prefix} \
91 --libdir=%{_lib} \
92 --cc=gcc \
93 --os=linux \
94 --cpu=%{_arch} \
95 --enable-modules=%{enable_modules} \
96 --disable-modules=%{disable_modules}
97
98# (ab)using CXX as an easy way to inject our CXXFLAGS
99%{__make} \
100 CXX="%{__cxx} %{rpmcxxflags}"
101
102%if %{with tests}
103%{__make} \
104 CXX="%{__cxx} %{rpmcxxflags}" check
105
106# these checks would fail
107mv checks/validate.dat{,.orig}
108awk '/\[.*\]/{f=0} /\[(RC5.*|RC6|IDEA)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \
109 checks/validate.dat.orig > checks/validate.dat
110LD_LIBRARY_PATH=. ./check --validate
111%endif
112
113%install
114rm -rf $RPM_BUILD_ROOT
115%{__make} install \
116 INSTALL_CMD_EXEC="install -p -m 755" \
117 INSTALL_CMD_DATA="install -p -m 644" \
118 DOCDIR=_doc \
119 DESTDIR=$RPM_BUILD_ROOT%{_prefix}
120
121rm $RPM_BUILD_ROOT%{_bindir}/botan-config
122
123%clean
124rm -rf $RPM_BUILD_ROOT
125
126# NOTE: only update ld.so cache, there are no symlinks
127%post -p /sbin/postshell
128/sbin/ldconfig -X
129%postun -p /sbin/postshell
130/sbin/ldconfig -X
131
132%files
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
136%doc README.fedora
137%attr(755,root,root) %{_libdir}/libbotan-1.8.*.so
138
139%files devel
140%defattr(644,root,root,755)
141%{_includedir}/botan
142%{_libdir}/libbotan.so
143%{_pkgconfigdir}/botan-1.8.pc
144
145%if %{with static_libs}
146%files static
147%defattr(644,root,root,755)
148%{_libdir}/libbotan.a
149%endif
150
151%if %{with apidocs}
152%files apidocs
153%defattr(644,root,root,755)
154%doc doc/examples
155%doc _doc/api* _doc/tutorial*
156%endif
This page took 0.125773 seconds and 4 git commands to generate.