]> git.pld-linux.org Git - packages/beecrypt.git/blob - beecrypt.spec
d26efb41ed982c9c1ea5c9d46a2a21091db7a487
[packages/beecrypt.git] / beecrypt.spec
1 #
2 # WARNING: despite unchanged SONAME, the RSA ABI (and API) has changed since 3.x!
3 #
4 # Conditional build:
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
9 #
10 Summary:        The BeeCrypt Cryptography Library
11 Summary(pl.UTF-8):      Biblioteka kryptograficzna BeeCrypt
12 Name:           beecrypt
13 Version:        4.2.1
14 Release:        2
15 Epoch:          2
16 License:        LGPL v2.1+
17 Group:          Libraries
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}
27 BuildRequires:  jdk
28 %else
29 BuildRequires:  gcc-java
30 BuildRequires:  libgcj-devel
31 %endif
32 %endif
33 %if %{with java} && %{with javac}
34 BuildRequires:  jdk
35 %endif
36 BuildRequires:  libtool
37 %if %{with python}
38 BuildRequires:  python-devel
39 BuildRequires:  python-modules
40 BuildRequires:  rpm-pythonprov
41 %endif
42 BuildRequires:  libgomp-devel
43 BuildRequires:  rpmbuild(macros) >= 1.213
44 Obsoletes:      beecrypt-doc
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
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
52
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
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
62 szyfrowania m.in.: Blowfish, MD5, SHA-1, Diffie-Hellman oraz ElGamal.
63
64 %package devel
65 Summary:        The BeeCrypt Cryptography Library - development files
66 Summary(pl.UTF-8):      Pliki dla programistów używających biblioteki BeeCrypt
67 Group:          Development/Libraries
68 Requires:       %{name} = %{epoch}:%{version}-%{release}
69
70 %description devel
71 The BeeCrypt Cryptography Library - development files.
72
73 %description devel -l pl.UTF-8
74 Biblioteka kryptograficzna BeeCrypt - pliki dla programistów.
75
76 %package static
77 Summary:        The BeeCrypt Cryptography Library - static library
78 Summary(pl.UTF-8):      Biblioteka statyczna BeeCrypt
79 Group:          Development/Libraries
80 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
81
82 %description static
83 The BeeCrypt Cryptography Library - static library.
84
85 %description static -l pl.UTF-8
86 Biblioteka statyczna BeeCrypt.
87
88 %package java
89 Summary:        BeeCrypt Java glue library
90 Summary(pl.UTF-8):      Biblioteka łącząca BeeCrypt z Javą
91 Group:          Libraries
92 Requires:       %{name} = %{epoch}:%{version}-%{release}
93
94 %description java
95 BeeCrypt Java glue library.
96
97 %description java -l pl.UTF-8
98 Biblioteka łącząca BeeCrypt z Javą.
99
100 %package java-devel
101 Summary:        Development files for BeeCrypt Java glue library
102 Summary(pl.UTF-8):      Pliki programistyczne biblioteki łączącej Beecrypt z Javą
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
110 %description java-devel -l pl.UTF-8
111 Pliki programistyczne biblioteki łączącej Beecrypt z Javą.
112
113 %package java-static
114 Summary:        BeeCrypt Java glue static library
115 Summary(pl.UTF-8):      Statyczna biblioteka łącząca BeeCrypt z Javą
116 Group:          Development/Libraries
117 Requires:       %{name}-java-devel = %{epoch}:%{version}-%{release}
118
119 %description java-static
120 BeeCrypt Java glue static library.
121
122 %description java-static -l pl.UTF-8
123 Statyczna biblioteka łącząca BeeCrypt z Javą.
124
125 %package -n python-beecrypt
126 Summary:        Python interface to BeeCrypt library
127 Summary(pl.UTF-8):      Pythonowy interfejs do biblioteki BeeCrypt
128 Group:          Development/Languages/Python
129 Requires:       %{name} = %{epoch}:%{version}-%{release}
130 %pyrequires_eq  python-libs
131
132 %description -n python-beecrypt
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.
136
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.
141
142 %prep
143 %setup -q
144 %patch0 -p1
145 %patch1 -p1
146
147 # --with-cplusplus or building (even empty) *.cxx into libbeecrypt
148 # makes it (and thus rpm) depending on libstdc++ which is unacceptable
149 %{__perl} -pi -e 's/ cppglue\.cxx$//' Makefile.am
150
151 %build
152 %{__libtoolize}
153 %{__aclocal}
154 %{__autoconf}
155 %{__autoheader}
156 %{__automake}
157 %configure \
158         --enable-openmp \
159         %{?with_javac:ac_cv_have_gcj=no} \
160         %{!?with_static_libs:--disable-static} \
161         --without-cplusplus \
162         --with%{!?with_java:out}-java \
163         %{!?with_python:--without-python}
164
165 %{__make} \
166         OPENMP_LIBS="-lgomp"
167
168 %install
169 rm -rf $RPM_BUILD_ROOT
170 install -d $RPM_BUILD_ROOT/%{_lib}
171
172 %{__make} install \
173         DESTDIR=$RPM_BUILD_ROOT
174
175 mv -f $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so.* $RPM_BUILD_ROOT/%{_lib}
176 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libbeecrypt.so.*.*.*) \
177         $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so
178
179 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}}
180
181 %clean
182 rm -rf $RPM_BUILD_ROOT
183
184 %post   -p /sbin/ldconfig
185 %postun -p /sbin/ldconfig
186
187 %post   java -p /sbin/ldconfig
188 %postun java -p /sbin/ldconfig
189
190 %files
191 %defattr(644,root,root,755)
192 %doc AUTHORS BENCHMARKS BUGS CONTRIBUTORS NEWS README
193 %attr(755,root,root) /%{_lib}/libbeecrypt.so.*.*.*
194 %attr(755,root,root) %ghost /%{_lib}/libbeecrypt.so.7
195
196 %files devel
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_libdir}/libbeecrypt.so
199 %{_libdir}/libbeecrypt.la
200 %{_includedir}/beecrypt
201
202 %if %{with static_libs}
203 %files static
204 %defattr(644,root,root,755)
205 %{_libdir}/libbeecrypt.a
206 %endif
207
208 %if %{with java}
209 %files java
210 %defattr(644,root,root,755)
211 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so.*.*.*
212 %attr(755,root,root) %ghost %{_libdir}/libbeecrypt_java.so.7
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
219 %if %{with static_libs}
220 %files java-static
221 %defattr(644,root,root,755)
222 %{_libdir}/libbeecrypt_java.a
223 %endif
224 %endif
225
226 %if %{with python}
227 %files -n python-beecrypt
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{py_sitedir}/_bc.so
230 %endif
This page took 0.04608 seconds and 2 git commands to generate.