]>
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 |
835aa488 | 14 | Release: 7 |
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 | |
7c9c66de | 22 | Patch2: %{name}-armv8.patch |
63fbc33d | 23 | URL: http://sourceforge.net/projects/beecrypt/ |
e7d47e5c | 24 | BuildRequires: autoconf >= 2.50 |
d97ff880 | 25 | BuildRequires: automake |
32db796d | 26 | %if %{with java} && !%{with javac} |
2f43e48b AM |
27 | %ifarch i586 i686 athlon pentium3 pentium4 %{x8664} |
28 | BuildRequires: jdk | |
29 | %else | |
9c12ea62 | 30 | BuildRequires: gcc-java |
710e653a | 31 | BuildRequires: libgcj-devel |
2f43e48b | 32 | %endif |
5bdc9e19 | 33 | %endif |
32db796d | 34 | %if %{with java} && %{with javac} |
5bdc9e19 JB |
35 | BuildRequires: jdk |
36 | %endif | |
d97ff880 | 37 | BuildRequires: libtool |
c0fd553b | 38 | %if %{with python} |
39 | BuildRequires: python-devel | |
40 | BuildRequires: python-modules | |
f06a4408 | 41 | BuildRequires: rpm-pythonprov |
c0fd553b | 42 | %endif |
442e4fde | 43 | BuildRequires: rpmbuild(macros) >= 1.213 |
d5678950 | 44 | Obsoletes: beecrypt-doc |
63fbc33d | 45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
91407a9e | 46 | |
d5678950 JB |
47 | %define specflags_alpha -mno-explicit-relocs |
48 | %define specflags_pentium2 -mmmx | |
49 | %define specflags_pentium3 -mmmx -msse | |
50 | %define specflags_pentium4 -mmmx -msse -msse2 | |
51 | %define specflags_athlon -mmmx | |
19d4c14b | 52 | |
91407a9e | 53 | %description |
54 | BeeCrypt is an open source cryptography library that contains highly | |
55 | optimized C and assembler implementations of many well-known | |
56 | algorithms including Blowfish, MD5, SHA-1, Diffie-Hellman, and | |
57 | ElGamal. | |
58 | ||
42d161bc JR |
59 | %description -l pl.UTF-8 |
60 | BeeCrypt jest open sourcową biblioteką, która zawiera wysoko | |
61 | zoptymailzowane funkcje w C oraz assemblerze wielu algorytmów | |
5293cd2f | 62 | szyfrowania m.in.: Blowfish, MD5, SHA-1, Diffie-Hellman oraz ElGamal. |
91407a9e | 63 | |
81aa497c | 64 | %package devel |
65 | Summary: The BeeCrypt Cryptography Library - development files | |
6da54b22 | 66 | Summary(pl.UTF-8): Pliki dla programistów używających biblioteki BeeCrypt |
81aa497c | 67 | Group: Development/Libraries |
82780c6a | 68 | Requires: %{name} = %{epoch}:%{version}-%{release} |
81aa497c | 69 | |
91407a9e | 70 | %description devel |
81aa497c | 71 | The BeeCrypt Cryptography Library - development files. |
72 | ||
42d161bc JR |
73 | %description devel -l pl.UTF-8 |
74 | Biblioteka kryptograficzna BeeCrypt - pliki dla programistów. | |
5293cd2f | 75 | |
81aa497c | 76 | %package static |
77 | Summary: The BeeCrypt Cryptography Library - static library | |
6da54b22 | 78 | Summary(pl.UTF-8): Biblioteka statyczna BeeCrypt |
81aa497c | 79 | Group: Development/Libraries |
82780c6a | 80 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
91407a9e | 81 | |
81aa497c | 82 | %description static |
83 | The BeeCrypt Cryptography Library - static library. | |
91407a9e | 84 | |
42d161bc | 85 | %description static -l pl.UTF-8 |
5293cd2f JB |
86 | Biblioteka statyczna BeeCrypt. |
87 | ||
5bdc9e19 JB |
88 | %package java |
89 | Summary: BeeCrypt Java glue library | |
6da54b22 | 90 | Summary(pl.UTF-8): Biblioteka łącząca BeeCrypt z Javą |
5bdc9e19 JB |
91 | Group: Libraries |
92 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
93 | ||
94 | %description java | |
95 | BeeCrypt Java glue library. | |
96 | ||
42d161bc JR |
97 | %description java -l pl.UTF-8 |
98 | Biblioteka łącząca BeeCrypt z Javą. | |
5bdc9e19 JB |
99 | |
100 | %package java-devel | |
101 | Summary: Development files for BeeCrypt Java glue library | |
6da54b22 | 102 | Summary(pl.UTF-8): Pliki programistyczne biblioteki łączącej Beecrypt z Javą |
5bdc9e19 JB |
103 | Group: Development/Libraries |
104 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
105 | Requires: %{name}-java = %{epoch}:%{version}-%{release} | |
106 | ||
107 | %description java-devel | |
108 | Development files for BeeCrypt Java glue library. | |
109 | ||
42d161bc JR |
110 | %description java-devel -l pl.UTF-8 |
111 | Pliki programistyczne biblioteki łączącej Beecrypt z Javą. | |
5bdc9e19 JB |
112 | |
113 | %package java-static | |
114 | Summary: BeeCrypt Java glue static library | |
6da54b22 | 115 | Summary(pl.UTF-8): Statyczna biblioteka łącząca BeeCrypt z Javą |
5bdc9e19 JB |
116 | Group: Development/Libraries |
117 | Requires: %{name}-java-devel = %{epoch}:%{version}-%{release} | |
118 | ||
119 | %description java-static | |
120 | BeeCrypt Java glue static library. | |
121 | ||
42d161bc JR |
122 | %description java-static -l pl.UTF-8 |
123 | Statyczna biblioteka łącząca BeeCrypt z Javą. | |
5bdc9e19 | 124 | |
6f800bf2 AF |
125 | %package -n python-beecrypt |
126 | Summary: Python interface to BeeCrypt library | |
6da54b22 | 127 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki BeeCrypt |
6f800bf2 | 128 | Group: Development/Languages/Python |
82780c6a | 129 | Requires: %{name} = %{epoch}:%{version}-%{release} |
5bdc9e19 | 130 | %pyrequires_eq python-libs |
6f800bf2 AF |
131 | |
132 | %description -n python-beecrypt | |
049b6d8b ER |
133 | The python-beecrypt package contains a module which permits |
134 | applications written in the Python programming language to use the | |
135 | interface supplied by BeeCrypt libraries. | |
6f800bf2 | 136 | |
42d161bc JR |
137 | %description -n python-beecrypt -l pl.UTF-8 |
138 | Pakiet python-beecrypt zawiera moduł, który pozwala aplikacjom | |
139 | napisanym w Pythonie na używanie interfejsu dostarczanego przez | |
140 | bibliotekę BeeCrytp. | |
6f800bf2 | 141 | |
91407a9e | 142 | %prep |
1b30549c | 143 | %setup -q |
63fbc33d | 144 | %patch0 -p1 |
d97ff880 | 145 | %patch1 -p1 |
7c9c66de | 146 | %patch2 -p1 |
1b30549c JB |
147 | |
148 | # --with-cplusplus or building (even empty) *.cxx into libbeecrypt | |
149 | # makes it (and thus rpm) depending on libstdc++ which is unacceptable | |
150 | %{__perl} -pi -e 's/ cppglue\.cxx$//' Makefile.am | |
91407a9e | 151 | |
152 | %build | |
63fbc33d AF |
153 | %{__libtoolize} |
154 | %{__aclocal} | |
155 | %{__autoconf} | |
156 | %{__autoheader} | |
157 | %{__automake} | |
158 | %configure \ | |
4fcd359d | 159 | --disable-openmp \ |
5bdc9e19 | 160 | %{?with_javac:ac_cv_have_gcj=no} \ |
d5678950 | 161 | %{!?with_static_libs:--disable-static} \ |
1b30549c | 162 | --without-cplusplus \ |
df503361 | 163 | --with%{!?with_java:out}-java \ |
d5678950 | 164 | %{!?with_python:--without-python} |
91407a9e | 165 | |
4fcd359d | 166 | %{__make} |
d48e1138 | 167 | |
91407a9e | 168 | %install |
169 | rm -rf $RPM_BUILD_ROOT | |
8db3b7b5 | 170 | install -d $RPM_BUILD_ROOT/%{_lib} |
81aa497c | 171 | |
e7d47e5c JB |
172 | %{__make} install \ |
173 | DESTDIR=$RPM_BUILD_ROOT | |
174 | ||
d5678950 JB |
175 | mv -f $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so.* $RPM_BUILD_ROOT/%{_lib} |
176 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libbeecrypt.so.*.*.*) \ | |
8db3b7b5 JB |
177 | $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so |
178 | ||
2b7c2f34 | 179 | %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}} |
1b30549c | 180 | |
91407a9e | 181 | %clean |
81aa497c | 182 | rm -rf $RPM_BUILD_ROOT |
183 | ||
d97ff880 | 184 | %post -p /sbin/ldconfig |
81aa497c | 185 | %postun -p /sbin/ldconfig |
91407a9e | 186 | |
5bdc9e19 JB |
187 | %post java -p /sbin/ldconfig |
188 | %postun java -p /sbin/ldconfig | |
189 | ||
91407a9e | 190 | %files |
191 | %defattr(644,root,root,755) | |
d97ff880 | 192 | %doc AUTHORS BENCHMARKS BUGS CONTRIBUTORS NEWS README |
8db3b7b5 | 193 | %attr(755,root,root) /%{_lib}/libbeecrypt.so.*.*.* |
d5678950 | 194 | %attr(755,root,root) %ghost /%{_lib}/libbeecrypt.so.7 |
91407a9e | 195 | |
196 | %files devel | |
197 | %defattr(644,root,root,755) | |
5bdc9e19 JB |
198 | %attr(755,root,root) %{_libdir}/libbeecrypt.so |
199 | %{_libdir}/libbeecrypt.la | |
200 | %{_includedir}/beecrypt | |
81aa497c | 201 | |
01129d60 | 202 | %if %{with static_libs} |
81aa497c | 203 | %files static |
204 | %defattr(644,root,root,755) | |
5bdc9e19 | 205 | %{_libdir}/libbeecrypt.a |
01129d60 | 206 | %endif |
5bdc9e19 | 207 | |
32db796d | 208 | %if %{with java} |
5bdc9e19 JB |
209 | %files java |
210 | %defattr(644,root,root,755) | |
211 | %attr(755,root,root) %{_libdir}/libbeecrypt_java.so.*.*.* | |
d5678950 | 212 | %attr(755,root,root) %ghost %{_libdir}/libbeecrypt_java.so.7 |
5bdc9e19 JB |
213 | |
214 | %files java-devel | |
215 | %defattr(644,root,root,755) | |
216 | %attr(755,root,root) %{_libdir}/libbeecrypt_java.so | |
217 | %{_libdir}/libbeecrypt_java.la | |
218 | ||
01129d60 | 219 | %if %{with static_libs} |
5bdc9e19 JB |
220 | %files java-static |
221 | %defattr(644,root,root,755) | |
222 | %{_libdir}/libbeecrypt_java.a | |
223 | %endif | |
01129d60 | 224 | %endif |
6f800bf2 | 225 | |
a927c96f | 226 | %if %{with python} |
6f800bf2 AF |
227 | %files -n python-beecrypt |
228 | %defattr(644,root,root,755) | |
d5678950 | 229 | %attr(755,root,root) %{py_sitedir}/_bc.so |
a927c96f | 230 | %endif |