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