Fix zlib to actually use the win32 mingw build instead of generic static only build
[fedora-mingw.git] / gnutls-fragment / gnutls.spec
1 # XXX This prevents binaries from being stripped.  Using ordinary 'strip'
2 # on a MinGW library actually corrupts the library, hence we must disable
3 # this action.  However we would still like Fedora binaries to be stripped.
4 %define __os_install_post /usr/lib/rpm/brp-compress %{nil}
5
6 Summary: A TLS protocol implementation
7 Name: gnutls
8 Version: 2.4.1
9 Release: 2%{?dist}
10 # The libgnutls library is LGPLv2+, utilities and remaining libraries are GPLv3+
11 License: GPLv3+ and LGPLv2+
12 Group: System Environment/Libraries
13 BuildRequires: libgcrypt-devel >= 1.2.2, gettext
14 BuildRequires: zlib-devel, readline-devel, libtasn1-devel
15 BuildRequires: lzo-devel
16 URL: http://www.gnutls.org/
17 #Source0: ftp://ftp.gnutls.org/pub/gnutls/devel/%{name}-%{version}.tar.gz
18 #Source1: ftp://ftp.gnutls.org/pub/gnutls/devel/%{name}-%{version}.tar.gz.sig
19 # XXX patent tainted SRP code removed.
20 Source0: %{name}-%{version}-nosrp.tar.bz2
21 Source1: libgnutls-config
22 Patch1: gnutls-2.4.0-nosrp.patch
23
24 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
25 Requires: libgcrypt >= 1.2.2
26
27 %package devel
28 Summary: Development files for the %{name} package
29 Group: Development/Libraries
30 Requires: %{name} = %{version}-%{release}
31 Requires: libgcrypt-devel
32 Requires: pkgconfig
33 Requires(post): /sbin/install-info
34 Requires(preun): /sbin/install-info
35
36 %package utils
37 Summary: Command line tools for TLS protocol
38 Group: Applications/System
39 Requires: %{name} = %{version}-%{release}
40
41 %package -n mingw-gnutls
42 Summary:        MinGW Windows cross-compile of %{name} package
43 Group:          Development/Libraries
44
45 BuildRequires:  mingw-gcc
46 BuildRequires:  mingw-binutils
47 BuildRequires:  mingw-libgpg-error
48 BuildRequires:  mingw-libgcrypt
49
50 Requires:       mingw-runtime
51 Requires:       mingw-libgpg-error
52 Requires:       mingw-libgcrypt
53
54
55 %description
56 GnuTLS is a project that aims to develop a library which provides a secure 
57 layer, over a reliable transport layer. Currently the GnuTLS library implements
58 the proposed standards by the IETF's TLS working group.
59
60 %description devel
61 GnuTLS is a project that aims to develop a library which provides a secure
62 layer, over a reliable transport layer. Currently the GnuTLS library implements
63 the proposed standards by the IETF's TLS working group.
64 This package contains files needed for developing applications with
65 the GnuTLS library.
66
67 %description utils
68 GnuTLS is a project that aims to develop a library which provides a secure
69 layer, over a reliable transport layer. Currently the GnuTLS library implements
70 the proposed standards by the IETF's TLS working group.
71 This package contains command line TLS client and server and certificate
72 manipulation tools.
73
74 %description -n mingw-gnutls
75 GnuTLS is a project that aims to develop a library which provides a secure 
76 layer, over a reliable transport layer. Currently the GnuTLS library implements
77 the proposed standards by the IETF's TLS working group.
78 This package contains a MinGW Windows cross-compiled library so that
79 you can build programs that depend on GnuTLS library for Windows from
80 a Fedora host.
81
82 %prep
83 %setup -q
84 %patch1 -p1 -b .nosrp
85
86 for i in auth_srp_rsa.c auth_srp_sb64.c auth_srp_passwd.c auth_srp.c gnutls_srp.c ext_srp.c; do
87     touch lib/$i
88 done
89
90 %build
91 mkdir build
92 pushd build
93 echo '../configure "$@"' > configure; chmod +x configure
94 %configure --with-libtasn1-prefix=%{_prefix} \
95            --with-included-libcfg \
96            --disable-srp-authentication
97 make
98 popd
99
100 mkdir i686-pc-mingw32
101 pushd i686-pc-mingw32
102 CFLAGS="$RPM_OPT_FLAGS -fno-stack-protector" \
103 ../configure \
104   --build=%_build \
105   --host=i686-pc-mingw32 \
106   --prefix=%{_prefix}/i686-pc-mingw32/sys-root/mingw \
107   --disable-cxx \
108   --with-included-libtasn1 \
109   --with-included-libcfg \
110   --disable-srp-authentication
111 make
112 popd
113
114 %install
115 rm -fr $RPM_BUILD_ROOT
116 pushd build
117 %makeinstall
118 rm -f $RPM_BUILD_ROOT%{_bindir}/srptool
119 rm -f $RPM_BUILD_ROOT%{_bindir}/gnutls-srpcrypt
120 cp -f %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/libgnutls-config
121 cp -f %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/libgnutls-extra-config
122 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/srptool.1
123 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*srp*
124 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
125 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
126 %find_lang %{name}
127 popd
128
129 pushd i686-pc-mingw32
130 make DESTDIR=$RPM_BUILD_ROOT install
131 popd
132
133 %check
134 pushd build
135 make check
136 popd
137
138 %clean
139 rm -fr $RPM_BUILD_ROOT
140
141 %post -p /sbin/ldconfig
142
143 %postun -p /sbin/ldconfig
144
145 %post devel
146 if [ -f %{_infodir}/gnutls.info.gz ]; then
147     /sbin/install-info %{_infodir}/gnutls.info.gz %{_infodir}/dir || :
148 fi
149
150 %preun devel
151 if [ $1 = 0 -a -f %{_infodir}/gnutls.info.gz ]; then
152    /sbin/install-info --delete %{_infodir}/gnutls.info.gz %{_infodir}/dir || :
153 fi
154
155 %files -f build/%{name}.lang
156 %defattr(-,root,root,-)
157 %{_libdir}/*.so.*
158 %doc COPYING COPYING.LIB README AUTHORS
159
160 %files devel
161 %defattr(-,root,root,-)
162 %{_bindir}/libgnutls*-config
163 %{_includedir}/*
164 %{_libdir}/*.a
165 %{_libdir}/*.so
166 %{_datadir}/aclocal/*
167 %{_libdir}/pkgconfig/*.pc
168 %{_mandir}/man3/*
169 %{_infodir}/gnutls*
170
171 %files utils
172 %defattr(-,root,root,-)
173 %{_bindir}/certtool
174 %{_bindir}/psktool
175 %{_bindir}/gnutls*
176 %{_mandir}/man1/*
177
178 %files -n mingw-gnutls
179 %defattr(-,root,root)
180 %{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/*
181 %{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/*
182 %{_prefix}/i686-pc-mingw32/sys-root/mingw/include/*
183 %{_prefix}/i686-pc-mingw32/sys-root/mingw/share/aclocal/*
184 %{_prefix}/i686-pc-mingw32/sys-root/mingw/share/info/*
185 %{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man1/*
186 %{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/*
187
188 %changelog
189 * Tue Jul  8 2008 Richard W.M. Jones <rjones@redhat.com> 2.4.1-2
190 - Build mingw-gnutls subpackage.
191
192 * Tue Jul  1 2008 Tomas Mraz <tmraz@redhat.com> 2.4.1-1
193 - new upstream version
194 - correct the license tag
195 - explicit --with-included-opencdk not needed
196 - use external lzo library, internal not included anymore
197
198 * Tue Jun 24 2008 Tomas Mraz <tmraz@redhat.com> 2.4.0-1
199 - upgrade to latest upstream
200
201 * Tue May 20 2008 Tomas Mraz <tmraz@redhat.com> 2.0.4-3
202 - fix three security issues in gnutls handshake - GNUTLS-SA-2008-1
203   (#447461, #447462, #447463)
204
205 * Mon Feb  4 2008 Joe Orton <jorton@redhat.com> 2.0.4-2
206 - use system libtasn1
207
208 * Tue Dec  4 2007 Tomas Mraz <tmraz@redhat.com> 2.0.4-1
209 - upgrade to latest upstream
210
211 * Tue Aug 21 2007 Tomas Mraz <tmraz@redhat.com> 1.6.3-2
212 - license tag fix
213
214 * Wed Jun  6 2007 Tomas Mraz <tmraz@redhat.com> 1.6.3-1
215 - upgrade to latest upstream (#232445)
216
217 * Tue Apr 10 2007 Tomas Mraz <tmraz@redhat.com> 1.4.5-2
218 - properly require install-info (patch by Ville Skyttä)
219 - standard buildroot and use dist tag
220 - add COPYING and README to doc
221
222 * Wed Feb  7 2007 Tomas Mraz <tmraz@redhat.com> 1.4.5-1
223 - new upstream version
224 - drop libtermcap-devel from buildrequires
225
226 * Thu Sep 14 2006 Tomas Mraz <tmraz@redhat.com> 1.4.1-2
227 - detect forged signatures - CVE-2006-4790 (#206411), patch
228   from upstream
229
230 * Tue Jul 18 2006 Tomas Mraz <tmraz@redhat.com> - 1.4.1-1
231 - upgrade to new upstream version, only minor changes
232
233 * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.4.0-1.1
234 - rebuild
235
236 * Wed Jun 14 2006 Tomas Mraz <tmraz@redhat.com> - 1.4.0-1
237 - upgrade to new upstream version (#192070), rebuild
238   of dependent packages required
239
240 * Tue May 16 2006 Tomas Mraz <tmraz@redhat.com> - 1.2.10-2
241 - added missing buildrequires
242
243 * Mon Feb 13 2006 Tomas Mraz <tmraz@redhat.com> - 1.2.10-1
244 - updated to new version (fixes CVE-2006-0645)
245
246 * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.2.9-3.2
247 - bump again for double-long bug on ppc(64)
248
249 * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.2.9-3.1
250 - rebuilt for new gcc4.1 snapshot and glibc changes
251
252 * Tue Jan  3 2006 Jesse Keating <jkeating@redhat.com> 1.2.9-3
253 - rebuilt
254
255 * Fri Dec  9 2005 Tomas Mraz <tmraz@redhat.com> 1.2.9-2
256 - replaced *-config scripts with calls to pkg-config to
257   solve multilib conflicts
258
259 * Wed Nov 23 2005 Tomas Mraz <tmraz@redhat.com> 1.2.9-1
260 - upgrade to newest upstream
261 - removed .la files (#172635)
262
263 * Sun Aug  7 2005 Tomas Mraz <tmraz@redhat.com> 1.2.6-1
264 - upgrade to newest upstream (rebuild of dependencies necessary)
265
266 * Mon Jul  4 2005 Tomas Mraz <tmraz@redhat.com> 1.0.25-2
267 - split the command line tools to utils subpackage
268
269 * Sat Apr 30 2005 Tomas Mraz <tmraz@redhat.com> 1.0.25-1
270 - new upstream version fixes potential DOS attack
271
272 * Sat Apr 23 2005 Tomas Mraz <tmraz@redhat.com> 1.0.24-2
273 - readd the version script dropped by upstream
274
275 * Fri Apr 22 2005 Tomas Mraz <tmraz@redhat.com> 1.0.24-1
276 - update to the latest upstream version on the 1.0 branch
277
278 * Wed Mar  2 2005 Warren Togami <wtogami@redhat.com> 1.0.20-6
279 - gcc4 rebuild
280
281 * Tue Jan  4 2005 Ivana Varekova <varekova@redhat.com> 1.0.20-5
282 - add gnutls Requires zlib-devel (#144069)
283
284 * Mon Nov 08 2004 Colin Walters <walters@redhat.com> 1.0.20-4
285 - Make gnutls-devel Require libgcrypt-devel
286
287 * Tue Sep 21 2004 Jeff Johnson <jbj@redhat.com> 1.0.20-3
288 - rebuild with release++, otherwise unchanged.
289
290 * Tue Sep  7 2004 Jeff Johnson <jbj@redhat.com> 1.0.20-2
291 - patent tainted SRP code removed.
292
293 * Sun Sep  5 2004 Jeff Johnson <jbj@redhat.com> 1.0.20-1
294 - update to 1.0.20.
295 - add --with-included-opencdk --with-included-libtasn1
296 - add --with-included-libcfg --with-included-lzo
297 - add --disable-srp-authentication.
298 - do "make check" after build.
299
300 * Fri Mar 21 2003 Jeff Johnson <jbj@redhat.com> 0.9.2-1
301 - upgrade to 0.9.2
302
303 * Tue Jun 25 2002 Jeff Johnson <jbj@redhat.com> 0.4.4-1
304 - update to 0.4.4.
305
306 * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
307 - automated rebuild
308
309 * Sat May 25 2002 Jeff Johnson <jbj@redhat.com> 0.4.3-1
310 - update to 0.4.3.
311
312 * Tue May 21 2002 Jeff Johnson <jbj@redhat.com> 0.4.2-1
313 - update to 0.4.2.
314 - change license to LGPL.
315 - include splint annotations patch.
316
317 * Tue Apr  2 2002 Nalin Dahyabhai <nalin@redhat.com> 0.4.0-1
318 - update to 0.4.0
319
320 * Thu Jan 17 2002 Nalin Dahyabhai <nalin@redhat.com> 0.3.2-1
321 - update to 0.3.2
322
323 * Wed Jan 10 2002 Nalin Dahyabhai <nalin@redhat.com> 0.3.0-1
324 - add a URL
325
326 * Wed Dec 20 2001 Nalin Dahyabhai <nalin@redhat.com>
327 - initial package