Add libglade2 needed for virt-viewer
[fedora-mingw.git] / curl / mingw32-curl.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-curl
8 Version:        7.18.2
9 Release:        2%{?dist}
10 Summary:        MinGW Windows port of curl and libcurl
11
12 License:        MIT
13 Group:          Development/Libraries
14 URL:            http://curl.haxx.se/
15 Source0:        http://curl.haxx.se/download/curl-%{version}.tar.bz2
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
18 BuildArch:      noarch
19
20 # Patches from native Fedora package.
21 Patch1:         curl-7.15.3-multilib.patch
22 Patch2:         curl-7.16.0-privlibs.patch
23 Patch3:         curl-7.17.1-badsocket.patch
24 Patch4:         curl-7.18.2-nssproxy.patch
25 Patch5:         curl-7.18.2-nss-thread-safety.patch
26
27 # MinGW-specific patches.
28 Patch1000:      mingw-curl-7.18.2-getaddrinfo.patch
29
30 BuildRequires:  mingw32-filesystem >= 35
31 BuildRequires:  mingw32-gcc
32 BuildRequires:  mingw32-binutils
33 BuildRequires:  pkgconfig
34 BuildRequires:  mingw32-gettext
35 BuildRequires:  mingw32-iconv
36 BuildRequires:  mingw32-zlib
37 BuildRequires:  mingw32-libidn
38 BuildRequires:  mingw32-libssh2
39
40 # See nss/README for the status of this package.
41 #BuildRequires:  mingw32-nss
42 # Temporarily we can use OpenSSL instead of NSS:
43 BuildRequires:  mingw32-openssl
44
45 # Not started porting this package yet.
46 #BuildRequires:  mingw32-openldap
47
48 # Not started porting this package yet.
49 #BuildRequires:  mingw32-krb5
50
51
52 %description
53 cURL is a tool for getting files from HTTP, FTP, FILE, LDAP, LDAPS,
54 DICT, TELNET and TFTP servers, using any of the supported protocols.
55 cURL is designed to work without user interaction or any kind of
56 interactivity. cURL offers many useful capabilities, like proxy
57 support, user authentication, FTP upload, HTTP post, and file transfer
58 resume.
59
60 This is the MinGW cross-compiled Windows library.
61
62
63 %prep
64 %setup -q -n curl-%{version}
65
66 %patch1 -p1 -b .multilib
67 %patch2 -p1 -b .privlibs
68 %patch3 -p1 -b .badsocket
69 %patch4 -p1 -b .nssproxy
70 %patch5 -p1 -b .nssthreadsafety
71
72 %patch1000 -p1 -b .getaddrinfo
73
74
75 %build
76 %{_mingw32_configure} \
77   --with-ssl --enable-ipv6 \
78   --with-ca-bundle=%{_mingw32_sysconfdir}/pki/tls/certs/ca-bundle.crt \
79   --with-libidn \
80   --disable-static --with-libssh2 \
81   --without-random
82
83 # It's not clear where to set the --with-ca-bundle path.  This is the
84 # default for CURLOPT_CAINFO.  If this doesn't exist, you'll get an
85 # error from all https transfers unless the program sets
86 # CURLOPT_CAINFO to point to the correct ca-bundle.crt file.
87
88 # --without-random disables random number collection (eg. from
89 # /dev/urandom).  There isn't an obvious alternative for Windows:
90 # Perhaps we can port EGD or use a library such as Yarrow.
91
92 # These are the original flags that we'll work towards as
93 # more of the dependencies get ported to Fedora MinGW.
94 #
95 #  --without-ssl --with-nss=%{_mingw32_prefix} --enable-ipv6
96 #  --with-ca-bundle=%{_mingw32_sysconfdir}/pki/tls/certs/ca-bundle.crt
97 #  --with-gssapi=%{_mingw32_prefix}/kerberos --with-libidn
98 #  --enable-ldaps --disable-static --with-libssh2
99
100 make %{?_smp_mflags}
101
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105 make DESTDIR=$RPM_BUILD_ROOT install
106
107 # Remove the man pages which duplicate documentation in the
108 # native Fedora package.
109 rm -r $RPM_BUILD_ROOT%{_mingw32_mandir}/man{1,3}
110
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115
116 %files
117 %defattr(-,root,root)
118 %{_mingw32_bindir}/curl-config
119 %{_mingw32_bindir}/curl.exe
120 %{_mingw32_bindir}/libcurl-4.dll
121 %{_mingw32_libdir}/libcurl.dll.a
122 %{_mingw32_libdir}/libcurl.la
123 %{_mingw32_libdir}/pkgconfig/libcurl.pc
124 %{_mingw32_includedir}/curl/
125
126
127 %changelog
128 * Thu Nov 13 2008 Richard W.M. Jones <rjones@redhat.com> - 7.18.2-2
129 - Requires mingw32-filesystem >= 35.
130
131 * Thu Nov 13 2008 Richard W.M. Jones <rjones@redhat.com> - 7.18.2-1
132 - Initial RPM release.