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