]> git.pld-linux.org Git - packages/botan.git/blob - botan.spec
- pl, cleanup
[packages/botan.git] / botan.spec
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++
8 Summary(pl.UTF-8):      Biblioteka kryptograficzna napisana w C++
9 Name:           botan
10 Version:        1.8.14
11 Release:        3
12 License:        BSD
13 Group:          Libraries
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.
20 Patch0:         soname.patch
21 URL:            http://botan.randombit.net/
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
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.
37
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
46 %package devel
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}
51 Requires:       bzip2-devel
52 Requires:       gmp-devel
53 Requires:       openssl-devel
54 Requires:       zlib-devel
55
56 %description devel
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.
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
80 %if "%{_rpmversion}" >= "5"
81 BuildArch:      noarch
82 %endif
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
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
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
134 rm $RPM_BUILD_ROOT%{_bindir}/botan-config
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
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
144
145 %files
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
149
150 %files devel
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/libbotan.so
153 %{_includedir}/botan
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)
165 %doc doc/examples _doc/{api*,tutorial*}
166 %endif
This page took 0.386648 seconds and 3 git commands to generate.