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