libssh2 package.
[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:        1%{?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 autoreconf
54
55
56 %build
57 %{_mingw32_configure} --disable-static --enable-shared
58 make %{?_smp_mflags}
59
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 make DESTDIR=$RPM_BUILD_ROOT install
64
65 # Remove man pages which duplicate native Fedora.
66 rm -r $RPM_BUILD_ROOT%{_mingw32_mandir}/man3
67
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72
73 %files
74 %defattr(-,root,root)
75 %{_mingw32_bindir}/libssh2-1.dll
76 %{_mingw32_libdir}/libssh2.dll.a
77 %{_mingw32_libdir}/libssh2.la
78 %{_mingw32_includedir}/libssh2.h
79 %{_mingw32_includedir}/libssh2_publickey.h
80 %{_mingw32_includedir}/libssh2_sftp.h
81
82
83 %changelog
84 * Mon Nov 10 2008 Richard W.M. Jones <rjones@redhat.com> - 0.18-1
85 - Initial RPM release.