3ea338041f51144b6574f8b9471e95fd062da498
[fedora-mingw.git] / gnutls / mingw32-gnutls.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 Name:           mingw32-gnutls
8 Version:        2.6.3
9 Release:        1%{?dist}
10 Summary:        MinGW Windows GnuTLS TLS/SSL encryption library
11
12 License:        GPLv3+ and LGPLv2+
13 Group:          Development/Libraries
14 URL:            http://www.gnutls.org/
15 #Source0:        ftp://ftp.gnutls.org/pub/gnutls/gnutls-%{version}.tar.bz2
16 # XXX patent tainted SRP code removed.
17 Source0:        gnutls-%{version}-nosrp.tar.bz2
18 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19
20 BuildArch:      noarch
21
22 Patch1:         gnutls-2.6.2-nosrp.patch
23
24 # MinGW-specific patches.
25 Patch1000:      mingw32-gnutls-2.6.3-certtool-build.patch
26
27 BuildRequires:  mingw32-filesystem >= 25
28 BuildRequires:  mingw32-gcc
29 BuildRequires:  mingw32-binutils
30 BuildRequires:  mingw32-dlfcn
31 BuildRequires:  mingw32-libgpg-error
32 BuildRequires:  mingw32-libgcrypt >= 1.2.2
33 BuildRequires:  mingw32-gettext
34 BuildRequires:  mingw32-iconv
35 BuildRequires:  mingw32-readline
36 BuildRequires:  mingw32-zlib
37
38 BuildRequires:  autoconf
39 BuildRequires:  automake
40 BuildRequires:  libtool
41
42 # Yes, really ...
43 BuildRequires:  pkgconfig
44
45 # For native /usr/bin/msgfmt etc.
46 BuildRequires:  gettext
47
48 Requires:       pkgconfig
49
50
51 %description
52 MinGW Windows GnuTLS TLS/SSL encryption library.
53
54
55 %prep
56 %setup -q -n gnutls-%{version}
57
58 %patch1 -p1 -b .nosrp
59
60 %patch1000 -p1 -b .mingw32
61
62 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
63     touch lib/$i
64 done
65
66 libtoolize --force --copy
67 autoreconf
68
69
70 %build
71 PATH="%{_mingw32_bindir}:$PATH" \
72 %{_mingw32_configure} \
73   --with-included-libtasn1 \
74   --disable-srp-authentication \
75   --disable-static
76 # %{?_smp_mflags} doesn't build correctly.
77 make
78
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82
83 make DESTDIR=$RPM_BUILD_ROOT install
84 rm -f $RPM_BUILD_ROOT%{_mingw32_datadir}/info/dir
85
86 # Remove info and man pages which duplicate stuff in Fedora already.
87 rm -rf $RPM_BUILD_ROOT%{_mingw32_infodir}
88 rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir}
89
90 %find_lang gnutls
91
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96
97 %files -f gnutls.lang
98 %defattr(-,root,root)
99 %{_mingw32_bindir}/certtool.exe
100 %{_mingw32_bindir}/gnutls-cli-debug.exe
101 %{_mingw32_bindir}/gnutls-cli.exe
102 %{_mingw32_bindir}/gnutls-serv.exe
103 %{_mingw32_bindir}/libgnutls-26.def
104 %{_mingw32_bindir}/libgnutls-26.dll
105 %{_mingw32_bindir}/libgnutls-config
106 %{_mingw32_bindir}/libgnutls-extra-26.def
107 %{_mingw32_bindir}/libgnutls-extra-26.dll
108 %{_mingw32_bindir}/libgnutls-extra-config
109 %{_mingw32_bindir}/libgnutls-openssl-26.def
110 %{_mingw32_bindir}/libgnutls-openssl-26.dll
111 %{_mingw32_bindir}/psktool.exe
112 %{_mingw32_libdir}/libgnutls-extra.dll.a
113 %{_mingw32_libdir}/libgnutls-extra.la
114 %{_mingw32_libdir}/libgnutls-openssl.dll.a
115 %{_mingw32_libdir}/libgnutls-openssl.la
116 %{_mingw32_libdir}/libgnutls.dll.a
117 %{_mingw32_libdir}/libgnutls.la
118 %{_mingw32_libdir}/pkgconfig/gnutls-extra.pc
119 %{_mingw32_libdir}/pkgconfig/gnutls.pc
120 %{_mingw32_includedir}/gnutls/
121 %{_mingw32_datadir}/aclocal/libgnutls-extra.m4
122 %{_mingw32_datadir}/aclocal/libgnutls.m4
123
124
125 %changelog
126 * Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 2.6.3-1
127 - Rebase to native Fedora version 2.6.3.
128 - Enable C++ library.
129 - Use find_lang macro.
130 - Don't build static library.
131 - Rebase MinGW patch to 2.6.3.
132 - +BR mingw32-dlfcn.
133 - +BR mingw32-readline.
134 - Force rebuild of libtool.
135
136 * Tue Jan 13 2009 Richard W.M. Jones <rjones@redhat.com> - 2.4.2-4
137 - Requires pkgconfig.
138
139 * Thu Nov 13 2008 Richard W.M. Jones <rjones@redhat.com> - 2.4.2-3
140 - fix chain verification issue CVE-2008-4989 (#470079)
141 - separate out the MinGW-specific patch from the others
142
143 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 2.4.2-2
144 - Rename mingw -> mingw32.
145
146 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 2.4.2-1
147 - New native version.
148
149 * Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 2.4.1-9
150 - Switch to source tar.bz2 with SRP stuff removed
151
152 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 2.4.1-8
153 - Remove duplicate manpages and info files.
154
155 * Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 2.4.1-7
156 - Add BR on autoconf, automake and libtool
157
158 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 2.4.1-6
159 - Need to run autoreconf after patching src/Makefile.am.
160 - Remove static libs.
161
162 * Fri Sep  5 2008 Richard W.M. Jones <rjones@redhat.com> - 2.4.1-5
163 - Add patch to build certtool.exe because of missing dep of gnulib on intl.
164 - BuildArch is noarch.
165
166 * Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 2.4.1-3
167 - Use mingw-filesystem RPM macros.
168 - Depends on mingw-iconv, mingw-gettext.
169
170 * Tue Sep  2 2008 Daniel P. Berrange <berrange@redhat.com> - 2.4.1-2
171 - List files explicitly and use custom CFLAGS
172
173 * Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 2.4.1-1
174 - Initial RPM release, largely based on earlier work from several sources.