1a63774d37d9bcfc55b55c125f4350b220312258
[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:        5%{?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 %prep
45 %setup -q -n libssh2-%{version}
46
47 %patch1001 -p1
48 %patch1002 -p1
49 %patch1003 -p1
50 %patch1004 -p1
51 %patch1005 -p1
52
53 libtoolize --force --copy
54 autoreconf
55
56
57 %build
58 %{_mingw32_configure} --disable-static --enable-shared
59 make %{?_smp_mflags}
60
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 make DESTDIR=$RPM_BUILD_ROOT install
65
66 # Remove man pages which duplicate native Fedora.
67 rm -r $RPM_BUILD_ROOT%{_mingw32_mandir}/man3
68
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73
74 %files
75 %defattr(-,root,root)
76 %doc COPYING
77 %{_mingw32_bindir}/libssh2-1.dll
78 %{_mingw32_libdir}/libssh2.dll.a
79 %{_mingw32_libdir}/libssh2.la
80 %{_mingw32_includedir}/libssh2.h
81 %{_mingw32_includedir}/libssh2_publickey.h
82 %{_mingw32_includedir}/libssh2_sftp.h
83
84
85 %changelog
86 * Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 0.18-5
87 - Rebuild for mingw32-gcc 4.4
88
89 * Fri Feb  6 2009 Richard W.M. Jones <rjones@redhat.com> - 0.18-4
90 - Include license file.
91
92 * Fri Feb  6 2009 Richard W.M. Jones <rjones@redhat.com> - 0.18-3
93 - Rebuild against new OpenSSH (because of soname bump).
94
95 * Sat Jan 24 2009 Richard W.M. Jones <rjones@redhat.com> - 0.18-2
96 - Update libtool installation.
97
98 * Mon Nov 10 2008 Richard W.M. Jones <rjones@redhat.com> - 0.18-1
99 - Initial RPM release.