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.UTF-8): 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
49 BuildRequires: rpm-pythonprov
51 BuildRequires: rpmbuild(macros) >= 1.213
53 BuildRequires: tetex-dvips
54 BuildRequires: tetex-format-latex
55 BuildRequires: tetex-latex-dstroke
56 # note: this is incorrect place, it should be somewhere in tetex packages
57 BuildRequires: tetex-metafont
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 %define specflags_alpha -mno-explicit-relocs
64 BeeCrypt is an open source cryptography library that contains highly
65 optimized C and assembler implementations of many well-known
66 algorithms including Blowfish, MD5, SHA-1, Diffie-Hellman, and
69 %description -l pl.UTF-8
70 BeeCrypt jest open sourcową biblioteką, która zawiera wysoko
71 zoptymailzowane funkcje w C oraz assemblerze wielu algorytmów
72 szyfrowania m.in.: Blowfish, MD5, SHA-1, Diffie-Hellman oraz ElGamal.
75 Summary: The BeeCrypt Cryptography Library - development files
76 Summary(pl.UTF-8): Pliki dla programistów używających biblioteki BeeCrypt
77 Group: Development/Libraries
78 Requires: %{name} = %{epoch}:%{version}-%{release}
81 The BeeCrypt Cryptography Library - development files.
83 %description devel -l pl.UTF-8
84 Biblioteka kryptograficzna BeeCrypt - pliki dla programistów.
87 Summary: The BeeCrypt Cryptography Library - static library
88 Summary(pl.UTF-8): Biblioteka statyczna BeeCrypt
89 Group: Development/Libraries
90 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
93 The BeeCrypt Cryptography Library - static library.
95 %description static -l pl.UTF-8
96 Biblioteka statyczna BeeCrypt.
99 Summary: Development documentation for BeeCrypt
100 Summary(pl.UTF-8): Dokumentacja programisty dla biblioteki BeeCrypt
104 Development documentation for BeeCrypt.
106 %description doc -l pl.UTF-8
107 Dokumentacja programisty dla biblioteki BeeCrypt.
110 Summary: BeeCrypt Java glue library
111 Summary(pl.UTF-8): Biblioteka łącząca BeeCrypt z Javą
113 Requires: %{name} = %{epoch}:%{version}-%{release}
116 BeeCrypt Java glue library.
118 %description java -l pl.UTF-8
119 Biblioteka łącząca BeeCrypt z Javą.
122 Summary: Development files for BeeCrypt Java glue library
123 Summary(pl.UTF-8): Pliki programistyczne biblioteki łączącej Beecrypt z Javą
124 Group: Development/Libraries
125 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
126 Requires: %{name}-java = %{epoch}:%{version}-%{release}
128 %description java-devel
129 Development files for BeeCrypt Java glue library.
131 %description java-devel -l pl.UTF-8
132 Pliki programistyczne biblioteki łączącej Beecrypt z Javą.
135 Summary: BeeCrypt Java glue static library
136 Summary(pl.UTF-8): Statyczna biblioteka łącząca BeeCrypt z Javą
137 Group: Development/Libraries
138 Requires: %{name}-java-devel = %{epoch}:%{version}-%{release}
140 %description java-static
141 BeeCrypt Java glue static library.
143 %description java-static -l pl.UTF-8
144 Statyczna biblioteka łącząca BeeCrypt z Javą.
146 %package -n python-beecrypt
147 Summary: Python interface to BeeCrypt library
148 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki BeeCrypt
149 Group: Development/Languages/Python
150 Requires: %{name} = %{epoch}:%{version}-%{release}
151 %pyrequires_eq python-libs
153 %description -n python-beecrypt
154 The python-beecrypt package contains a module which permits
155 applications written in the Python programming language to use the
156 interface supplied by BeeCrypt libraries.
158 %description -n python-beecrypt -l pl.UTF-8
159 Pakiet python-beecrypt zawiera moduł, który pozwala aplikacjom
160 napisanym w Pythonie na używanie interfejsu dostarczanego przez
169 # --with-cplusplus or building (even empty) *.cxx into libbeecrypt
170 # makes it (and thus rpm) depending on libstdc++ which is unacceptable
171 %{__perl} -pi -e 's/ cppglue\.cxx$//' Makefile.am
173 %{__perl} -pi -e 's/^GENERATE_LATEX .*/GENERATE_LATEX = NO/' Doxyfile.in
182 %{?with_javac:ac_cv_have_gcj=no} \
183 --without-cplusplus \
184 --with%{!?with_java:out}-java \
185 --with-cpu=%{_target_cpu} \
186 %{!?with_static_libs:--enable-static=no} \
190 --with-arch=%{_target_cpu} \
193 --with%{!?with_python:out}-python
205 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT/%{_lib}
209 DESTDIR=$RPM_BUILD_ROOT
212 %{__make} install -C python \
213 DESTDIR=$RPM_BUILD_ROOT
216 mv -f $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so.*.*.* $RPM_BUILD_ROOT/%{_lib}
217 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libbeecrypt.so.*.*.*) \
218 $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so
220 rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
223 rm -rf $RPM_BUILD_ROOT
225 %post -p /sbin/ldconfig
226 %postun -p /sbin/ldconfig
228 %post java -p /sbin/ldconfig
229 %postun java -p /sbin/ldconfig
232 %defattr(644,root,root,755)
233 %doc AUTHORS BENCHMARKS BUGS CONTRIBUTORS NEWS README
234 %attr(755,root,root) /%{_lib}/libbeecrypt.so.*.*.*
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_libdir}/libbeecrypt.so
239 %{_libdir}/libbeecrypt.la
240 %{_includedir}/beecrypt
242 %if %{with static_libs}
244 %defattr(644,root,root,755)
245 %{_libdir}/libbeecrypt.a
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so.*.*.*
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so
256 %{_libdir}/libbeecrypt_java.la
258 %if %{with static_libs}
260 %defattr(644,root,root,755)
261 %{_libdir}/libbeecrypt_java.a
267 %defattr(644,root,root,755)
272 %files -n python-beecrypt
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{py_sitedir}/*.so