]> git.pld-linux.org Git - packages/beecrypt.git/blob - beecrypt.spec
fe7c7b5f7ffc943957379db49814d3de4ff08f17
[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  doc             # don't build documentation
9 %bcond_without  static_libs     # don't build static libraries
10 #
11 Summary:        The BeeCrypt Cryptography Library
12 Summary(pl):    Biblioteka kryptograficzna BeeCrypt
13 Name:           beecrypt
14 Version:        4.1.2
15 Release:        6
16 Epoch:          2
17 License:        LGPL
18 Group:          Libraries
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
27 %if %{with doc}
28 BuildRequires:  doxygen
29 %endif
30 %if %{with java} && !%{with javac}
31 %ifarch i586 i686 athlon pentium3 pentium4 %{x8664}
32 BuildRequires:  jdk
33 %else
34 BuildRequires:  gcc-java
35 BuildRequires:  libgcj-devel
36 %endif
37 %endif
38 %if %{with doc}
39 BuildRequires:  ghostscript
40 BuildRequires:  graphviz
41 %endif
42 %if %{with java} && %{with javac}
43 BuildRequires:  jdk
44 %endif
45 BuildRequires:  libtool
46 %if %{with python}
47 BuildRequires:  python-devel
48 BuildRequires:  python-modules
49 %endif
50 BuildRequires:  rpmbuild(macros) >= 1.213
51 %if %{with doc}
52 BuildRequires:  tetex-dvips
53 BuildRequires:  tetex-format-latex
54 BuildRequires:  tetex-latex-dstroke
55 # note: this is incorrect place, it should be somewhere in tetex packages
56 BuildRequires:  tetex-metafont
57 %endif
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %define         specflags_alpha          -mno-explicit-relocs
61
62 %description
63 BeeCrypt is an open source cryptography library that contains highly
64 optimized C and assembler implementations of many well-known
65 algorithms including Blowfish, MD5, SHA-1, Diffie-Hellman, and
66 ElGamal.
67
68 %description -l pl
69 BeeCrypt jest open sourcow± bibliotek±, która zawiera wysoko
70 zoptymailzowane funkcje w C oraz assemblerze wielu algorytmów
71 szyfrowania m.in.: Blowfish, MD5, SHA-1, Diffie-Hellman oraz ElGamal.
72
73 %package devel
74 Summary:        The BeeCrypt Cryptography Library - development files
75 Summary(pl):    Pliki dla programistów u¿ywaj±cych biblioteki BeeCrypt
76 Group:          Development/Libraries
77 Requires:       %{name} = %{epoch}:%{version}-%{release}
78
79 %description devel
80 The BeeCrypt Cryptography Library - development files.
81
82 %description devel -l pl
83 Biblioteka kryptograficzna BeeCrypt - pliki dla programistów.
84
85 %package static
86 Summary:        The BeeCrypt Cryptography Library - static library
87 Summary(pl):    Biblioteka statyczna BeeCrypt
88 Group:          Development/Libraries
89 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
90
91 %description static
92 The BeeCrypt Cryptography Library - static library.
93
94 %description static -l pl
95 Biblioteka statyczna BeeCrypt.
96
97 %package doc
98 Summary:        Development documentation for BeeCrypt
99 Summary(pl):    Dokumentacja programisty dla biblioteki BeeCrypt
100 Group:          Documentation
101
102 %description doc
103 Development documentation for BeeCrypt.
104
105 %description doc -l pl
106 Dokumentacja programisty dla biblioteki BeeCrypt.
107
108 %package java
109 Summary:        BeeCrypt Java glue library
110 Summary(pl):    Biblioteka ³±cz±ca BeeCrypt z Jav±
111 Group:          Libraries
112 Requires:       %{name} = %{epoch}:%{version}-%{release}
113
114 %description java
115 BeeCrypt Java glue library.
116
117 %description java -l pl
118 Biblioteka ³±cz±ca BeeCrypt z Jav±.
119
120 %package java-devel
121 Summary:        Development files for BeeCrypt Java glue library
122 Summary(pl):    Pliki programistyczne biblioteki ³±cz±cej Beecrypt z Jav±
123 Group:          Development/Libraries
124 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
125 Requires:       %{name}-java = %{epoch}:%{version}-%{release}
126
127 %description java-devel
128 Development files for BeeCrypt Java glue library.
129
130 %description java-devel -l pl
131 Pliki programistyczne biblioteki ³±cz±cej Beecrypt z Jav±.
132
133 %package java-static
134 Summary:        BeeCrypt Java glue static library
135 Summary(pl):    Statyczna biblioteka ³±cz±ca BeeCrypt z Jav±
136 Group:          Development/Libraries
137 Requires:       %{name}-java-devel = %{epoch}:%{version}-%{release}
138
139 %description java-static
140 BeeCrypt Java glue static library.
141
142 %description java-static -l pl
143 Statyczna biblioteka ³±cz±ca BeeCrypt z Jav±.
144
145 %package -n python-beecrypt
146 Summary:        Python interface to BeeCrypt library
147 Summary(pl):    Pythonowy interfejs do biblioteki BeeCrypt
148 Group:          Development/Languages/Python
149 Requires:       %{name} = %{epoch}:%{version}-%{release}
150 %pyrequires_eq  python-libs
151
152 %description -n python-beecrypt
153 The python-beecrypt package contains a module which permits
154 applications written in the Python programming language to use the
155 interface supplied by BeeCrypt libraries.
156
157 %description -n python-beecrypt -l pl
158 Pakiet python-beecrypt zawiera modu³, który pozwala aplikacjom
159 napisanym w Pythonie na u¿ywanie interfejsu dostarczanego przez
160 bibliotekê BeeCrytp.
161
162 %prep
163 %setup -q
164 %patch0 -p1
165 %patch1 -p1
166 %patch2 -p1
167
168 # --with-cplusplus or building (even empty) *.cxx into libbeecrypt
169 # makes it (and thus rpm) depending on libstdc++ which is unacceptable
170 %{__perl} -pi -e 's/ cppglue\.cxx$//' Makefile.am
171 # only html docs
172 %{__perl} -pi -e 's/^GENERATE_LATEX .*/GENERATE_LATEX = NO/' Doxyfile.in
173
174 %build
175 %{__libtoolize}
176 %{__aclocal}
177 %{__autoconf}
178 %{__autoheader}
179 %{__automake}
180 %configure \
181         %{?with_javac:ac_cv_have_gcj=no} \
182         --without-cplusplus \
183         --with%{!?with_java:out}-java \
184         --with-cpu=%{_target_cpu} \
185         %{!?with_static_libs:--enable-static=no} \
186 %ifarch %{x8664}
187         --with-arch=x86_64 \
188 %else
189         --with-arch=%{_target_cpu} \
190 %endif
191         --with-pic \
192         --with%{!?with_python:out}-python
193 %{__make}
194
195 %if %{with python}
196 %{__make} -C python
197 %endif
198
199 %if %{with doc}
200 doxygen
201 %endif
202
203 %install
204 rm -rf $RPM_BUILD_ROOT
205 install -d $RPM_BUILD_ROOT/%{_lib}
206
207 %{__make} install \
208         DESTDIR=$RPM_BUILD_ROOT
209
210 %if %{with python}
211 %{__make} install -C python \
212         DESTDIR=$RPM_BUILD_ROOT
213 %endif
214
215 mv -f $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so.*.*.* $RPM_BUILD_ROOT/%{_lib}
216 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libbeecrypt.so.*.*.*) \
217         $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so
218
219 rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
220
221 %clean
222 rm -rf $RPM_BUILD_ROOT
223
224 %post   -p /sbin/ldconfig
225 %postun -p /sbin/ldconfig
226
227 %post   java -p /sbin/ldconfig
228 %postun java -p /sbin/ldconfig
229
230 %files
231 %defattr(644,root,root,755)
232 %doc AUTHORS BENCHMARKS BUGS CONTRIBUTORS NEWS README
233 %attr(755,root,root) /%{_lib}/libbeecrypt.so.*.*.*
234
235 %files devel
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/libbeecrypt.so
238 %{_libdir}/libbeecrypt.la
239 %{_includedir}/beecrypt
240
241 %if %{with static_libs}
242 %files static
243 %defattr(644,root,root,755)
244 %{_libdir}/libbeecrypt.a
245 %endif
246
247 %if %{with java}
248 %files java
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so.*.*.*
251
252 %files java-devel
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so
255 %{_libdir}/libbeecrypt_java.la
256
257 %if %{with static_libs}
258 %files java-static
259 %defattr(644,root,root,755)
260 %{_libdir}/libbeecrypt_java.a
261 %endif
262 %endif
263
264 %if %{with doc}
265 %files doc
266 %defattr(644,root,root,755)
267 %doc docs/html
268 %endif
269
270 %if %{with python}
271 %files -n python-beecrypt
272 %defattr(644,root,root,755)
273 %attr(755,root,root) %{py_sitedir}/*.so
274 %endif
This page took 0.053131 seconds and 2 git commands to generate.