]> git.pld-linux.org Git - packages/beecrypt.git/blob - beecrypt.spec
00e3040795e5be207036738ca1d609c427bcb071
[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  static_libs     # don't build static libraries
9 #
10 Summary:        The BeeCrypt Cryptography Library
11 Summary(pl.UTF-8):      Biblioteka kryptograficzna BeeCrypt
12 Name:           beecrypt
13 Version:        4.2.1
14 Release:        1
15 Epoch:          2
16 License:        LGPL v2.1+
17 Group:          Libraries
18 Source0:        http://dl.sourceforge.net/project/beecrypt/beecrypt/%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5:  8441c014170823f2dff97e33df55af1e
20 Patch0:         %{name}-ac.patch
21 Patch1:         %{name}-ac_python.patch
22 URL:            http://sourceforge.net/projects/beecrypt/
23 BuildRequires:  autoconf >= 2.50
24 BuildRequires:  automake
25 %if %{with java} && !%{with javac}
26 %ifarch i586 i686 athlon pentium3 pentium4 %{x8664}
27 BuildRequires:  jdk
28 %else
29 BuildRequires:  gcc-java
30 BuildRequires:  libgcj-devel
31 %endif
32 %endif
33 %if %{with java} && %{with javac}
34 BuildRequires:  jdk
35 %endif
36 BuildRequires:  libtool
37 %if %{with python}
38 BuildRequires:  python-devel
39 BuildRequires:  python-modules
40 BuildRequires:  rpm-pythonprov
41 %endif
42 BuildRequires:  rpmbuild(macros) >= 1.213
43 Obsoletes:      beecrypt-doc
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         specflags_alpha         -mno-explicit-relocs
47 %define         specflags_pentium2      -mmmx
48 %define         specflags_pentium3      -mmmx -msse
49 %define         specflags_pentium4      -mmmx -msse -msse2
50 %define         specflags_athlon        -mmmx
51
52 %description
53 BeeCrypt is an open source cryptography library that contains highly
54 optimized C and assembler implementations of many well-known
55 algorithms including Blowfish, MD5, SHA-1, Diffie-Hellman, and
56 ElGamal.
57
58 %description -l pl.UTF-8
59 BeeCrypt jest open sourcową biblioteką, która zawiera wysoko
60 zoptymailzowane funkcje w C oraz assemblerze wielu algorytmów
61 szyfrowania m.in.: Blowfish, MD5, SHA-1, Diffie-Hellman oraz ElGamal.
62
63 %package devel
64 Summary:        The BeeCrypt Cryptography Library - development files
65 Summary(pl.UTF-8):      Pliki dla programistów używających biblioteki BeeCrypt
66 Group:          Development/Libraries
67 Requires:       %{name} = %{epoch}:%{version}-%{release}
68
69 %description devel
70 The BeeCrypt Cryptography Library - development files.
71
72 %description devel -l pl.UTF-8
73 Biblioteka kryptograficzna BeeCrypt - pliki dla programistów.
74
75 %package static
76 Summary:        The BeeCrypt Cryptography Library - static library
77 Summary(pl.UTF-8):      Biblioteka statyczna BeeCrypt
78 Group:          Development/Libraries
79 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
80
81 %description static
82 The BeeCrypt Cryptography Library - static library.
83
84 %description static -l pl.UTF-8
85 Biblioteka statyczna BeeCrypt.
86
87 %package java
88 Summary:        BeeCrypt Java glue library
89 Summary(pl.UTF-8):      Biblioteka łącząca BeeCrypt z Javą
90 Group:          Libraries
91 Requires:       %{name} = %{epoch}:%{version}-%{release}
92
93 %description java
94 BeeCrypt Java glue library.
95
96 %description java -l pl.UTF-8
97 Biblioteka łącząca BeeCrypt z Javą.
98
99 %package java-devel
100 Summary:        Development files for BeeCrypt Java glue library
101 Summary(pl.UTF-8):      Pliki programistyczne biblioteki łączącej Beecrypt z Javą
102 Group:          Development/Libraries
103 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
104 Requires:       %{name}-java = %{epoch}:%{version}-%{release}
105
106 %description java-devel
107 Development files for BeeCrypt Java glue library.
108
109 %description java-devel -l pl.UTF-8
110 Pliki programistyczne biblioteki łączącej Beecrypt z Javą.
111
112 %package java-static
113 Summary:        BeeCrypt Java glue static library
114 Summary(pl.UTF-8):      Statyczna biblioteka łącząca BeeCrypt z Javą
115 Group:          Development/Libraries
116 Requires:       %{name}-java-devel = %{epoch}:%{version}-%{release}
117
118 %description java-static
119 BeeCrypt Java glue static library.
120
121 %description java-static -l pl.UTF-8
122 Statyczna biblioteka łącząca BeeCrypt z Javą.
123
124 %package -n python-beecrypt
125 Summary:        Python interface to BeeCrypt library
126 Summary(pl.UTF-8):      Pythonowy interfejs do biblioteki BeeCrypt
127 Group:          Development/Languages/Python
128 Requires:       %{name} = %{epoch}:%{version}-%{release}
129 %pyrequires_eq  python-libs
130
131 %description -n python-beecrypt
132 The python-beecrypt package contains a module which permits
133 applications written in the Python programming language to use the
134 interface supplied by BeeCrypt libraries.
135
136 %description -n python-beecrypt -l pl.UTF-8
137 Pakiet python-beecrypt zawiera moduł, który pozwala aplikacjom
138 napisanym w Pythonie na używanie interfejsu dostarczanego przez
139 bibliotekę BeeCrytp.
140
141 %prep
142 %setup -q
143 %patch0 -p1
144 %patch1 -p1
145
146 # --with-cplusplus or building (even empty) *.cxx into libbeecrypt
147 # makes it (and thus rpm) depending on libstdc++ which is unacceptable
148 %{__perl} -pi -e 's/ cppglue\.cxx$//' Makefile.am
149
150 %build
151 %{__libtoolize}
152 %{__aclocal}
153 %{__autoconf}
154 %{__autoheader}
155 %{__automake}
156 %configure \
157         %{?with_javac:ac_cv_have_gcj=no} \
158         %{!?with_static_libs:--disable-static} \
159         --without-cplusplus \
160         --with%{!?with_java:out}-java \
161         %{!?with_python:--without-python}
162
163 %{__make}
164
165 %install
166 rm -rf $RPM_BUILD_ROOT
167 install -d $RPM_BUILD_ROOT/%{_lib}
168
169 %{__make} install \
170         DESTDIR=$RPM_BUILD_ROOT
171
172 mv -f $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so.* $RPM_BUILD_ROOT/%{_lib}
173 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libbeecrypt.so.*.*.*) \
174         $RPM_BUILD_ROOT%{_libdir}/libbeecrypt.so
175
176 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}}
177
178 %clean
179 rm -rf $RPM_BUILD_ROOT
180
181 %post   -p /sbin/ldconfig
182 %postun -p /sbin/ldconfig
183
184 %post   java -p /sbin/ldconfig
185 %postun java -p /sbin/ldconfig
186
187 %files
188 %defattr(644,root,root,755)
189 %doc AUTHORS BENCHMARKS BUGS CONTRIBUTORS NEWS README
190 %attr(755,root,root) /%{_lib}/libbeecrypt.so.*.*.*
191 %attr(755,root,root) %ghost /%{_lib}/libbeecrypt.so.7
192
193 %files devel
194 %defattr(644,root,root,755)
195 %attr(755,root,root) %{_libdir}/libbeecrypt.so
196 %{_libdir}/libbeecrypt.la
197 %{_includedir}/beecrypt
198
199 %if %{with static_libs}
200 %files static
201 %defattr(644,root,root,755)
202 %{_libdir}/libbeecrypt.a
203 %endif
204
205 %if %{with java}
206 %files java
207 %defattr(644,root,root,755)
208 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so.*.*.*
209 %attr(755,root,root) %ghost %{_libdir}/libbeecrypt_java.so.7
210
211 %files java-devel
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_libdir}/libbeecrypt_java.so
214 %{_libdir}/libbeecrypt_java.la
215
216 %if %{with static_libs}
217 %files java-static
218 %defattr(644,root,root,755)
219 %{_libdir}/libbeecrypt_java.a
220 %endif
221 %endif
222
223 %if %{with python}
224 %files -n python-beecrypt
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{py_sitedir}/_bc.so
227 %endif
This page took 0.054855 seconds and 2 git commands to generate.