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