Build static subpackages (Erik van Pienbroek)
[fedora-mingw.git] / libssh2 / mingw32-libssh2.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-libssh2
8 Version:        0.18
9 Release:        6%{?dist}
10 Summary:        MinGW Windows library implementing the SSH2 protocol
11
12 License:        BSD
13 Group:          Development/Libraries
14 URL:            http://www.libssh2.org/
15 Source0:        http://downloads.sourceforge.net/libssh2/libssh2-%{version}.tar.gz
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
18 BuildArch:      noarch
19
20 BuildRequires:  mingw32-filesystem >= 33
21 BuildRequires:  mingw32-gcc
22 BuildRequires:  mingw32-binutils
23 BuildRequires:  mingw32-openssl
24 BuildRequires:  mingw32-zlib
25 BuildRequires:  autoconf, automake, libtool
26 BuildRequires:  pkgconfig
27
28 # MinGW-specific patches.
29 # Sent upstream 2008-11-10.
30 Patch1001:      libssh2-01-build-win-library.patch
31 Patch1002:      libssh2-02-libssh_priv-headers.patch
32 Patch1003:      libssh2-03-remove-extra-config.patch
33 Patch1004:      libssh2-04-non-blocking-examples.patch
34 Patch1005:      libssh2-05-remove-WINSOCK-VERSION.patch
35
36
37 %description
38 libssh2 is a library implementing the SSH2 protocol as defined by
39 Internet Drafts: SECSH-TRANS(22), SECSH-USERAUTH(25),
40 SECSH-CONNECTION(23), SECSH-ARCH(20), SECSH-FILEXFER(06)*,
41 SECSH-DHGEX(04), and SECSH-NUMBERS(10).
42
43
44 %package static
45 Summary:        Static version of the MinGW Windows SSH2 library
46 Requires:       %{name} = %{version}-%{release}
47 Group:          Development/Libraries
48
49 %description static
50 Static version of the MinGW Windows SSH2 library.
51
52
53 %prep
54 %setup -q -n libssh2-%{version}
55
56 %patch1001 -p1
57 %patch1002 -p1
58 %patch1003 -p1
59 %patch1004 -p1
60 %patch1005 -p1
61
62 libtoolize --force --copy
63 autoreconf
64
65
66 %build
67 %{_mingw32_configure} --enable-static --enable-shared
68 make %{?_smp_mflags}
69
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 make DESTDIR=$RPM_BUILD_ROOT install
74
75 # Remove man pages which duplicate native Fedora.
76 rm -r $RPM_BUILD_ROOT%{_mingw32_mandir}/man3
77
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82
83 %files
84 %defattr(-,root,root,-)
85 %doc COPYING
86 %{_mingw32_bindir}/libssh2-1.dll
87 %{_mingw32_libdir}/libssh2.dll.a
88 %{_mingw32_libdir}/libssh2.la
89 %{_mingw32_includedir}/libssh2.h
90 %{_mingw32_includedir}/libssh2_publickey.h
91 %{_mingw32_includedir}/libssh2_sftp.h
92
93
94 %files static
95 %defattr(-,root,root,-)
96 %{_mingw32_libdir}/libssh2.a
97
98 %changelog
99 * Fri Apr  3 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.18-6
100 - Added -static subpackage
101 - Fixed %%defattr line
102
103 * Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 0.18-5
104 - Rebuild for mingw32-gcc 4.4
105
106 * Fri Feb  6 2009 Richard W.M. Jones <rjones@redhat.com> - 0.18-4
107 - Include license file.
108
109 * Fri Feb  6 2009 Richard W.M. Jones <rjones@redhat.com> - 0.18-3
110 - Rebuild against new OpenSSH (because of soname bump).
111
112 * Sat Jan 24 2009 Richard W.M. Jones <rjones@redhat.com> - 0.18-2
113 - Update libtool installation.
114
115 * Mon Nov 10 2008 Richard W.M. Jones <rjones@redhat.com> - 0.18-1
116 - Initial RPM release.