]>
Commit | Line | Data |
---|---|---|
d97ff880 | 1 | # |
4d383701 | 2 | # WARNING: despite unchanged SONAME, the RSA ABI (and API) has changed since 3.x! |
5bdc9e19 | 3 | # |
d97ff880 | 4 | # Conditional build: |
d5678950 | 5 | %bcond_without java # build with Java support |
5bdc9e19 | 6 | %bcond_with javac # use javac instead of gcj |
9c971131 | 7 | %bcond_without python # don't build python module |
01129d60 | 8 | %bcond_without static_libs # don't build static libraries |
d97ff880 | 9 | # |
91407a9e | 10 | Summary: The BeeCrypt Cryptography Library |
6da54b22 | 11 | Summary(pl.UTF-8): Biblioteka kryptograficzna BeeCrypt |
91407a9e | 12 | Name: beecrypt |
d5678950 | 13 | Version: 4.2.1 |
4fcd359d | 14 | Release: 3 |
22964bea | 15 | Epoch: 2 |
d5678950 | 16 | License: LGPL v2.1+ |
d97ff880 | 17 | Group: Libraries |
d5678950 JB |
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 | |
63fbc33d | 22 | URL: http://sourceforge.net/projects/beecrypt/ |
e7d47e5c | 23 | BuildRequires: autoconf >= 2.50 |
d97ff880 | 24 | BuildRequires: automake |
32db796d | 25 | %if %{with java} && !%{with javac} |
2f43e48b AM |
26 | %ifarch i586 i686 athlon pentium3 pentium4 %{x8664} |
27 | BuildRequires: jdk | |
28 | %else | |
9c12ea62 | 29 | BuildRequires: gcc-java |
710e653a | 30 | BuildRequires: libgcj-devel |
2f43e48b | 31 | %endif |
5bdc9e19 | 32 | %endif |
32db796d | 33 | %if %{with java} && %{with javac} |
5bdc9e19 JB |
34 | BuildRequires: jdk |
35 | %endif | |
d97ff880 | 36 | BuildRequires: libtool |
c0fd553b | 37 | %if %{with python} |
38 | BuildRequires: python-devel | |
39 | BuildRequires: python-modules | |
f06a4408 | 40 | BuildRequires: rpm-pythonprov |
c0fd553b | 41 | %endif |
442e4fde | 42 | BuildRequires: rpmbuild(macros) >= 1.213 |
d5678950 | 43 | Obsoletes: beecrypt-doc |
63fbc33d | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
91407a9e | 45 | |
d5678950 JB |
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 | |
19d4c14b | 51 | |
91407a9e | 52 | %description |
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 | |
56 | ElGamal. | |
57 | ||
42d161bc JR |
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 | |
5293cd2f | 61 | szyfrowania m.in.: Blowfish, MD5, SHA-1, Diffie-Hellman oraz ElGamal. |
91407a9e | 62 | |
81aa497c | 63 | %package devel |
64 | Summary: The BeeCrypt Cryptography Library - development files | |
6da54b22 | 65 | Summary(pl.UTF-8): Pliki dla programistów używających biblioteki BeeCrypt |
81aa497c | 66 | Group: Development/Libraries |
82780c6a | 67 | Requires: %{name} = %{epoch}:%{version}-%{release} |
81aa497c | 68 | |
91407a9e | 69 | %description devel |
81aa497c | 70 | The BeeCrypt Cryptography Library - development files. |
71 | ||
42d161bc JR |
72 | %description devel -l pl.UTF-8 |
73 | Biblioteka kryptograficzna BeeCrypt - pliki dla programistów. | |
5293cd2f | 74 | |
81aa497c | 75 | %package static |
76 | Summary: The BeeCrypt Cryptography Library - static library | |
6da54b22 | 77 | Summary(pl.UTF-8): Biblioteka statyczna BeeCrypt |
81aa497c | 78 | Group: Development/Libraries |
82780c6a | 79 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
91407a9e | 80 | |
81aa497c | 81 | %description static |
82 | The BeeCrypt Cryptography Library - static library. | |
91407a9e | 83 | |
42d161bc | 84 | %description static -l pl.UTF-8 |
5293cd2f JB |
85 | Biblioteka statyczna BeeCrypt. |
86 | ||
5bdc9e19 JB |
87 | %package java |
88 | Summary: BeeCrypt Java glue library | |
6da54b22 | 89 | Summary(pl.UTF-8): Biblioteka łącząca BeeCrypt z Javą |
5bdc9e19 JB |
90 | Group: Libraries |
91 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
92 | ||
93 | %description java | |
94 | BeeCrypt Java glue library. | |
95 | ||
42d161bc JR |
96 | %description java -l pl.UTF-8 |
97 | Biblioteka łącząca BeeCrypt z Javą. | |
5bdc9e19 JB |
98 | |
99 | %package java-devel | |
100 | Summary: Development files for BeeCrypt Java glue library | |
6da54b22 | 101 | Summary(pl.UTF-8): Pliki programistyczne biblioteki łączącej Beecrypt z Javą |
5bdc9e19 JB |
102 | Group: Development/Libraries |
103 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
104 | Requires: %{name}-java = %{epoch}:%{version}-%{release} | |
105 | ||
106 | %description java-devel | |
107 | Development files for BeeCrypt Java glue library. | |
108 | ||
42d161bc JR |
109 | %description java-devel -l pl.UTF-8 |
110 | Pliki programistyczne biblioteki łączącej Beecrypt z Javą. | |
5bdc9e19 JB |
111 | |
112 | %package java-static | |
113 | Summary: BeeCrypt Java glue static library | |
6da54b22 | 114 | Summary(pl.UTF-8): Statyczna biblioteka łącząca BeeCrypt z Javą |
5bdc9e19 JB |
115 | Group: Development/Libraries |
116 | Requires: %{name}-java-devel = %{epoch}:%{version}-%{release} | |
117 | ||
118 | %description java-static | |
119 | BeeCrypt Java glue static library. | |
120 | ||
42d161bc JR |
121 | %description java-static -l pl.UTF-8 |
122 | Statyczna biblioteka łącząca BeeCrypt z Javą. | |
5bdc9e19 | 123 | |
6f800bf2 AF |
124 | %package -n python-beecrypt |
125 | Summary: Python interface to BeeCrypt library | |
6da54b22 | 126 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki BeeCrypt |
6f800bf2 | 127 | Group: Development/Languages/Python |
82780c6a | 128 | Requires: %{name} = %{epoch}:%{version}-%{release} |
5bdc9e19 | 129 | %pyrequires_eq python-libs |
6f800bf2 AF |
130 | |
131 | %description -n python-beecrypt | |
049b6d8b ER |
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. | |
6f800bf2 | 135 | |
42d161bc JR |
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 | |
139 | bibliotekę BeeCrytp. | |
6f800bf2 | 140 | |
91407a9e | 141 | %prep |
1b30549c | 142 | %setup -q |
63fbc33d | 143 | %patch0 -p1 |
d97ff880 | 144 | %patch1 -p1 |
1b30549c JB |
145 | |
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 | |
91407a9e | 149 | |
150 | %build | |
63fbc33d AF |
151 | %{__libtoolize} |
152 | %{__aclocal} | |
153 | %{__autoconf} | |
154 | %{__autoheader} | |
155 | %{__automake} | |
156 | %configure \ | |
4fcd359d | 157 | --disable-openmp \ |
5bdc9e19 | 158 | %{?with_javac:ac_cv_have_gcj=no} \ |
d5678950 | 159 | %{!?with_static_libs:--disable-static} \ |
1b30549c | 160 | --without-cplusplus \ |
df503361 | 161 | --with%{!?with_java:out}-java \ |
d5678950 | 162 | %{!?with_python:--without-python} |
91407a9e | 163 | |
4fcd359d | 164 | %{__make} |
d48e1138 | 165 | |
91407a9e | 166 | %install |
167 | rm -rf $RPM_BUILD_ROOT | |
8db3b7b5 | 168 | install -d $RPM_BUILD_ROOT/%{_lib} |
81aa497c | 169 | |
e7d47e5c JB |
170 | %{__make} install \ |
171 | DESTDIR=$RPM_BUILD_ROOT | |
172 | ||
d5678950 JB |
173 | mv -f $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so.* $RPM_BUILD_ROOT/%{_lib} |
174 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libbeecrypt.so.*.*.*) \ | |
8db3b7b5 JB |
175 | $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so |
176 | ||
2b7c2f34 | 177 | %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}} |
1b30549c | 178 | |
91407a9e | 179 | %clean |
81aa497c | 180 | rm -rf $RPM_BUILD_ROOT |
181 | ||
d97ff880 | 182 | %post -p /sbin/ldconfig |
81aa497c | 183 | %postun -p /sbin/ldconfig |
91407a9e | 184 | |
5bdc9e19 JB |
185 | %post java -p /sbin/ldconfig |
186 | %postun java -p /sbin/ldconfig | |
187 | ||
91407a9e | 188 | %files |
189 | %defattr(644,root,root,755) | |
d97ff880 | 190 | %doc AUTHORS BENCHMARKS BUGS CONTRIBUTORS NEWS README |
8db3b7b5 | 191 | %attr(755,root,root) /%{_lib}/libbeecrypt.so.*.*.* |
d5678950 | 192 | %attr(755,root,root) %ghost /%{_lib}/libbeecrypt.so.7 |
91407a9e | 193 | |
194 | %files devel | |
195 | %defattr(644,root,root,755) | |
5bdc9e19 JB |
196 | %attr(755,root,root) %{_libdir}/libbeecrypt.so |
197 | %{_libdir}/libbeecrypt.la | |
198 | %{_includedir}/beecrypt | |
81aa497c | 199 | |
01129d60 | 200 | %if %{with static_libs} |
81aa497c | 201 | %files static |
202 | %defattr(644,root,root,755) | |
5bdc9e19 | 203 | %{_libdir}/libbeecrypt.a |
01129d60 | 204 | %endif |
5bdc9e19 | 205 | |
32db796d | 206 | %if %{with java} |
5bdc9e19 JB |
207 | %files java |
208 | %defattr(644,root,root,755) | |
209 | %attr(755,root,root) %{_libdir}/libbeecrypt_java.so.*.*.* | |
d5678950 | 210 | %attr(755,root,root) %ghost %{_libdir}/libbeecrypt_java.so.7 |
5bdc9e19 JB |
211 | |
212 | %files java-devel | |
213 | %defattr(644,root,root,755) | |
214 | %attr(755,root,root) %{_libdir}/libbeecrypt_java.so | |
215 | %{_libdir}/libbeecrypt_java.la | |
216 | ||
01129d60 | 217 | %if %{with static_libs} |
5bdc9e19 JB |
218 | %files java-static |
219 | %defattr(644,root,root,755) | |
220 | %{_libdir}/libbeecrypt_java.a | |
221 | %endif | |
01129d60 | 222 | %endif |
6f800bf2 | 223 | |
a927c96f | 224 | %if %{with python} |
6f800bf2 AF |
225 | %files -n python-beecrypt |
226 | %defattr(644,root,root,755) | |
d5678950 | 227 | %attr(755,root,root) %{py_sitedir}/_bc.so |
a927c96f | 228 | %endif |