2 # WARNING: despite unchanged SONAME, the RSA ABI (and API) has changed since 3.x!
5 %bcond_without java # build with Java support
6 %bcond_with javac # use javac instead of gcj
7 %bcond_without python # don't build python module
8 %bcond_without doc # don't build documentation
9 %bcond_without static_libs # don't build static libraries
11 Summary: The BeeCrypt Cryptography Library
12 Summary(pl): Biblioteka kryptograficzna BeeCrypt
19 Source0: http://dl.sourceforge.net/beecrypt/%{name}-%{version}.tar.gz
20 # Source0-md5: 820d26437843ab0a6a8a5151a73a657c
21 Patch0: %{name}-opt.patch
22 Patch1: %{name}-lib64_fix.patch
23 Patch2: %{name}-ac_python.patch
24 URL: http://sourceforge.net/projects/beecrypt/
25 BuildRequires: autoconf >= 2.50
26 BuildRequires: automake
28 BuildRequires: doxygen
30 %if %{with java} && !%{with javac}
31 %ifarch i586 i686 athlon pentium3 pentium4 %{x8664}
34 BuildRequires: gcc-java
35 BuildRequires: libgcj-devel
39 BuildRequires: ghostscript
40 BuildRequires: graphviz
42 %if %{with java} && %{with javac}
45 BuildRequires: libtool
47 BuildRequires: python-devel
48 BuildRequires: python-modules
50 BuildRequires: rpmbuild(macros) >= 1.213
52 BuildRequires: tetex-dvips
53 BuildRequires: tetex-format-latex
54 BuildRequires: tetex-latex-dstroke
55 # note: this is incorrect place, it should be somewhere in tetex packages
56 BuildRequires: tetex-metafont
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60 %define specflags_alpha -mno-explicit-relocs
63 BeeCrypt is an open source cryptography library that contains highly
64 optimized C and assembler implementations of many well-known
65 algorithms including Blowfish, MD5, SHA-1, Diffie-Hellman, and
69 BeeCrypt jest open sourcow± bibliotek±, która zawiera wysoko
70 zoptymailzowane funkcje w C oraz assemblerze wielu algorytmów
71 szyfrowania m.in.: Blowfish, MD5, SHA-1, Diffie-Hellman oraz ElGamal.
74 Summary: The BeeCrypt Cryptography Library - development files
75 Summary(pl): Pliki dla programistów u¿ywaj±cych biblioteki BeeCrypt
76 Group: Development/Libraries
77 Requires: %{name} = %{epoch}:%{version}-%{release}
80 The BeeCrypt Cryptography Library - development files.
82 %description devel -l pl
83 Biblioteka kryptograficzna BeeCrypt - pliki dla programistów.
86 Summary: The BeeCrypt Cryptography Library - static library
87 Summary(pl): Biblioteka statyczna BeeCrypt
88 Group: Development/Libraries
89 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
92 The BeeCrypt Cryptography Library - static library.
94 %description static -l pl
95 Biblioteka statyczna BeeCrypt.
98 Summary: Development documentation for BeeCrypt
99 Summary(pl): Dokumentacja programisty dla biblioteki BeeCrypt
103 Development documentation for BeeCrypt.
105 %description doc -l pl
106 Dokumentacja programisty dla biblioteki BeeCrypt.
109 Summary: BeeCrypt Java glue library
110 Summary(pl): Biblioteka ³±cz±ca BeeCrypt z Jav±
112 Requires: %{name} = %{epoch}:%{version}-%{release}
115 BeeCrypt Java glue library.
117 %description java -l pl
118 Biblioteka ³±cz±ca BeeCrypt z Jav±.
121 Summary: Development files for BeeCrypt Java glue library
122 Summary(pl): Pliki programistyczne biblioteki ³±cz±cej Beecrypt z Jav±
123 Group: Development/Libraries
124 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
125 Requires: %{name}-java = %{epoch}:%{version}-%{release}
127 %description java-devel
128 Development files for BeeCrypt Java glue library.
130 %description java-devel -l pl
131 Pliki programistyczne biblioteki ³±cz±cej Beecrypt z Jav±.
134 Summary: BeeCrypt Java glue static library
135 Summary(pl): Statyczna biblioteka ³±cz±ca BeeCrypt z Jav±
136 Group: Development/Libraries
137 Requires: %{name}-java-devel = %{epoch}:%{version}-%{release}
139 %description java-static
140 BeeCrypt Java glue static library.
142 %description java-static -l pl
143 Statyczna biblioteka ³±cz±ca BeeCrypt z Jav±.
145 %package -n python-beecrypt
146 Summary: Python interface to BeeCrypt library
147 Summary(pl): Pythonowy interfejs do biblioteki BeeCrypt
148 Group: Development/Languages/Python
149 Requires: %{name} = %{epoch}:%{version}-%{release}
150 %pyrequires_eq python-libs
152 %description -n python-beecrypt
153 The python-beecrypt package contains a module which permits
154 applications written in the Python programming language to use the
155 interface supplied by BeeCrypt libraries.
157 %description -n python-beecrypt -l pl
158 Pakiet python-beecrypt zawiera modu³, który pozwala aplikacjom
159 napisanym w Pythonie na u¿ywanie interfejsu dostarczanego przez
168 # --with-cplusplus or building (even empty) *.cxx into libbeecrypt
169 # makes it (and thus rpm) depending on libstdc++ which is unacceptable
170 %{__perl} -pi -e 's/ cppglue\.cxx$//' Makefile.am
172 %{__perl} -pi -e 's/^GENERATE_LATEX .*/GENERATE_LATEX = NO/' Doxyfile.in
181 %{?with_javac:ac_cv_have_gcj=no} \
182 --without-cplusplus \
183 --with%{!?with_java:out}-java \
184 --with-cpu=%{_target_cpu} \
185 %{!?with_static_libs:--enable-static=no} \
189 --with-arch=%{_target_cpu} \
192 --with%{!?with_python:out}-python
204 rm -rf $RPM_BUILD_ROOT
205 install -d $RPM_BUILD_ROOT/%{_lib}
208 DESTDIR=$RPM_BUILD_ROOT
211 %{__make} install -C python \
212 DESTDIR=$RPM_BUILD_ROOT
215 mv -f $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so.*.*.* $RPM_BUILD_ROOT/%{_lib}
216 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libbeecrypt.so.*.*.*) \
217 $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so
219 rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
222 rm -rf $RPM_BUILD_ROOT
224 %post -p /sbin/ldconfig
225 %postun -p /sbin/ldconfig
227 %post java -p /sbin/ldconfig
228 %postun java -p /sbin/ldconfig
231 %defattr(644,root,root,755)
232 %doc AUTHORS BENCHMARKS BUGS CONTRIBUTORS NEWS README
233 %attr(755,root,root) /%{_lib}/libbeecrypt.so.*.*.*
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/libbeecrypt.so
238 %{_libdir}/libbeecrypt.la
239 %{_includedir}/beecrypt
241 %if %{with static_libs}
243 %defattr(644,root,root,755)
244 %{_libdir}/libbeecrypt.a
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so.*.*.*
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so
255 %{_libdir}/libbeecrypt_java.la
257 %if %{with static_libs}
259 %defattr(644,root,root,755)
260 %{_libdir}/libbeecrypt_java.a
266 %defattr(644,root,root,755)
271 %files -n python-beecrypt
272 %defattr(644,root,root,755)
273 %attr(755,root,root) %{py_sitedir}/*.so