]> git.pld-linux.org Git - packages/beecrypt.git/blob - beecrypt.spec
- added bcond_without static_libs
[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:        2
16 Epoch:          2
17 License:        LGPL
18 Group:          Libraries
19 Source0:        http://heanet.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 applications
152 written in the Python programming language to use the interface
153 supplied by BeeCrypt libraries.
154
155 %description -n python-beecrypt -l pl
156 Pakiet python-beecrypt zawiera modu³, który pozwala aplikacjom napisanym w
157 Pythonie na u¿ywanie interfejsu dostarczanego przez bibliotekê BeeCrytp.
158
159 %prep
160 %setup -q
161 %patch0 -p1
162 %patch1 -p1
163 %patch2 -p1
164
165 # --with-cplusplus or building (even empty) *.cxx into libbeecrypt
166 # makes it (and thus rpm) depending on libstdc++ which is unacceptable
167 %{__perl} -pi -e 's/ cppglue\.cxx$//' Makefile.am
168 # only html docs
169 %{__perl} -pi -e 's/^GENERATE_LATEX .*/GENERATE_LATEX = NO/' Doxyfile.in
170
171 %build
172 %{__libtoolize}
173 %{__aclocal}
174 %{__autoconf}
175 %{__autoheader}
176 %{__automake}
177 %configure \
178         %{?with_javac:ac_cv_have_gcj=no} \
179         --without-cplusplus \
180         --with%{!?with_java:out}-javaglue \
181         --with-cpu=%{_target_cpu} \
182         %{!?with_static_libs:--enable-static=no} \
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 %{__make}
191
192 %if %{with python}
193 %{__make} -C python
194 %endif
195
196 %if %{with doc}
197 doxygen
198 %endif
199
200 %install
201 rm -rf $RPM_BUILD_ROOT
202
203 %{__make} install \
204         DESTDIR=$RPM_BUILD_ROOT
205
206 %if %{with python}
207 %{__make} install -C python \
208         DESTDIR=$RPM_BUILD_ROOT
209 %endif
210
211 rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
212
213 %clean
214 rm -rf $RPM_BUILD_ROOT
215
216 %post   -p /sbin/ldconfig
217 %postun -p /sbin/ldconfig
218
219 %post   java -p /sbin/ldconfig
220 %postun java -p /sbin/ldconfig
221
222 %files
223 %defattr(644,root,root,755)
224 %doc AUTHORS BENCHMARKS BUGS CONTRIBUTORS NEWS README
225 %attr(755,root,root) %{_libdir}/libbeecrypt.so.*.*.*
226
227 %files devel
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libbeecrypt.so
230 %{_libdir}/libbeecrypt.la
231 %{_includedir}/beecrypt
232
233 %if %{with static_libs}
234 %files static
235 %defattr(644,root,root,755)
236 %{_libdir}/libbeecrypt.a
237 %endif
238
239 %if %{with java}
240 %files java
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so.*.*.*
243
244 %files java-devel
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so
247 %{_libdir}/libbeecrypt_java.la
248
249 %if %{with static_libs}
250 %files java-static
251 %defattr(644,root,root,755)
252 %{_libdir}/libbeecrypt_java.a
253 %endif
254 %endif
255
256 %if %{with doc}
257 %files doc
258 %defattr(644,root,root,755)
259 %doc docs/html/*
260 %endif 
261
262 %if %{with python}
263 %files -n python-beecrypt
264 %defattr(644,root,root,755)
265 %attr(755,root,root) %{py_sitedir}/*.so
266 %endif
This page took 0.058295 seconds and 4 git commands to generate.