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 static_libs # don't build static libraries
10 Summary: The BeeCrypt Cryptography Library
11 Summary(pl.UTF-8): Biblioteka kryptograficzna BeeCrypt
18 Source0: http://dl.sourceforge.net/project/beecrypt/beecrypt/%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: 8441c014170823f2dff97e33df55af1e
20 Patch0: %{name}-ac.patch
21 Patch1: %{name}-ac_python.patch
22 URL: http://sourceforge.net/projects/beecrypt/
23 BuildRequires: autoconf >= 2.50
24 BuildRequires: automake
25 %if %{with java} && !%{with javac}
26 %ifarch i586 i686 athlon pentium3 pentium4 %{x8664}
29 BuildRequires: gcc-java
30 BuildRequires: libgcj-devel
33 %if %{with java} && %{with javac}
36 BuildRequires: libtool
38 BuildRequires: python-devel
39 BuildRequires: python-modules
40 BuildRequires: rpm-pythonprov
42 BuildRequires: rpmbuild(macros) >= 1.213
43 Obsoletes: beecrypt-doc
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define specflags_alpha -mno-explicit-relocs
47 %define specflags_pentium2 -mmmx
48 %define specflags_pentium3 -mmmx -msse
49 %define specflags_pentium4 -mmmx -msse -msse2
50 %define specflags_athlon -mmmx
53 BeeCrypt is an open source cryptography library that contains highly
54 optimized C and assembler implementations of many well-known
55 algorithms including Blowfish, MD5, SHA-1, Diffie-Hellman, and
58 %description -l pl.UTF-8
59 BeeCrypt jest open sourcową biblioteką, która zawiera wysoko
60 zoptymailzowane funkcje w C oraz assemblerze wielu algorytmów
61 szyfrowania m.in.: Blowfish, MD5, SHA-1, Diffie-Hellman oraz ElGamal.
64 Summary: The BeeCrypt Cryptography Library - development files
65 Summary(pl.UTF-8): Pliki dla programistów używających biblioteki BeeCrypt
66 Group: Development/Libraries
67 Requires: %{name} = %{epoch}:%{version}-%{release}
70 The BeeCrypt Cryptography Library - development files.
72 %description devel -l pl.UTF-8
73 Biblioteka kryptograficzna BeeCrypt - pliki dla programistów.
76 Summary: The BeeCrypt Cryptography Library - static library
77 Summary(pl.UTF-8): Biblioteka statyczna BeeCrypt
78 Group: Development/Libraries
79 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
82 The BeeCrypt Cryptography Library - static library.
84 %description static -l pl.UTF-8
85 Biblioteka statyczna BeeCrypt.
88 Summary: BeeCrypt Java glue library
89 Summary(pl.UTF-8): Biblioteka łącząca BeeCrypt z Javą
91 Requires: %{name} = %{epoch}:%{version}-%{release}
94 BeeCrypt Java glue library.
96 %description java -l pl.UTF-8
97 Biblioteka łącząca BeeCrypt z Javą.
100 Summary: Development files for BeeCrypt Java glue library
101 Summary(pl.UTF-8): Pliki programistyczne biblioteki łączącej Beecrypt z Javą
102 Group: Development/Libraries
103 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
104 Requires: %{name}-java = %{epoch}:%{version}-%{release}
106 %description java-devel
107 Development files for BeeCrypt Java glue library.
109 %description java-devel -l pl.UTF-8
110 Pliki programistyczne biblioteki łączącej Beecrypt z Javą.
113 Summary: BeeCrypt Java glue static library
114 Summary(pl.UTF-8): Statyczna biblioteka łącząca BeeCrypt z Javą
115 Group: Development/Libraries
116 Requires: %{name}-java-devel = %{epoch}:%{version}-%{release}
118 %description java-static
119 BeeCrypt Java glue static library.
121 %description java-static -l pl.UTF-8
122 Statyczna biblioteka łącząca BeeCrypt z Javą.
124 %package -n python-beecrypt
125 Summary: Python interface to BeeCrypt library
126 Summary(pl.UTF-8): Pythonowy interfejs do biblioteki BeeCrypt
127 Group: Development/Languages/Python
128 Requires: %{name} = %{epoch}:%{version}-%{release}
129 %pyrequires_eq python-libs
131 %description -n python-beecrypt
132 The python-beecrypt package contains a module which permits
133 applications written in the Python programming language to use the
134 interface supplied by BeeCrypt libraries.
136 %description -n python-beecrypt -l pl.UTF-8
137 Pakiet python-beecrypt zawiera moduł, który pozwala aplikacjom
138 napisanym w Pythonie na używanie interfejsu dostarczanego przez
146 # --with-cplusplus or building (even empty) *.cxx into libbeecrypt
147 # makes it (and thus rpm) depending on libstdc++ which is unacceptable
148 %{__perl} -pi -e 's/ cppglue\.cxx$//' Makefile.am
158 %{?with_javac:ac_cv_have_gcj=no} \
159 %{!?with_static_libs:--disable-static} \
160 --without-cplusplus \
161 --with%{!?with_java:out}-java \
162 %{!?with_python:--without-python}
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT/%{_lib}
171 DESTDIR=$RPM_BUILD_ROOT
173 mv -f $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so.* $RPM_BUILD_ROOT/%{_lib}
174 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libbeecrypt.so.*.*.*) \
175 $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so
177 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}}
180 rm -rf $RPM_BUILD_ROOT
182 %post -p /sbin/ldconfig
183 %postun -p /sbin/ldconfig
185 %post java -p /sbin/ldconfig
186 %postun java -p /sbin/ldconfig
189 %defattr(644,root,root,755)
190 %doc AUTHORS BENCHMARKS BUGS CONTRIBUTORS NEWS README
191 %attr(755,root,root) /%{_lib}/libbeecrypt.so.*.*.*
192 %attr(755,root,root) %ghost /%{_lib}/libbeecrypt.so.7
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_libdir}/libbeecrypt.so
197 %{_libdir}/libbeecrypt.la
198 %{_includedir}/beecrypt
200 %if %{with static_libs}
202 %defattr(644,root,root,755)
203 %{_libdir}/libbeecrypt.a
208 %defattr(644,root,root,755)
209 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so.*.*.*
210 %attr(755,root,root) %ghost %{_libdir}/libbeecrypt_java.so.7
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so
215 %{_libdir}/libbeecrypt_java.la
217 %if %{with static_libs}
219 %defattr(644,root,root,755)
220 %{_libdir}/libbeecrypt_java.a
225 %files -n python-beecrypt
226 %defattr(644,root,root,755)
227 %attr(755,root,root) %{py_sitedir}/_bc.so