[mingw-libssh2] Added win64 support

Erik van Pienbroek epienbro at fedoraproject.org
Sun Apr 8 11:46:07 UTC 2012


commit 2264d7ed0ae1756575f35246f4106278e20ff31e
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Sun Apr 8 13:45:52 2012 +0200

    Added win64 support
    
    contributed by Marc-Andre Lureau

 libssh2-01-build-win-library.patch      |   11 -
 libssh2-02-libssh_priv-headers.patch    |   58 -----
 libssh2-03-remove-extra-config.patch    |  373 -------------------------------
 libssh2-04-non-blocking-examples.patch  |  119 ----------
 libssh2-05-remove-WINSOCK-VERSION.patch |  186 ---------------
 mingw-libssh2.spec                      |   68 +++++-
 6 files changed, 55 insertions(+), 760 deletions(-)
---
diff --git a/mingw-libssh2.spec b/mingw-libssh2.spec
index 6b13107..52b5182 100644
--- a/mingw-libssh2.spec
+++ b/mingw-libssh2.spec
@@ -1,10 +1,8 @@
-%global __strip %{mingw32_strip}
-%global __objdump %{mingw32_objdump}
-%define __debug_install_post %{mingw32_debug_install_post}
+%?mingw_package_header
 
 Name:           mingw-libssh2
 Version:        1.1
-Release:        10%{?dist}
+Release:        11%{?dist}
 Summary:        MinGW Windows library implementation of the SSH2 protocol
 
 License:        BSD
@@ -14,12 +12,22 @@ Source0:        http://downloads.sourceforge.net/libssh2/libssh2-%{version}.tar.
 
 BuildArch:      noarch
 
-BuildRequires:  mingw32-filesystem
+BuildRequires:  mingw32-filesystem >= 95
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-binutils
 BuildRequires:  mingw32-openssl
 BuildRequires:  mingw32-zlib
 
+BuildRequires:  mingw64-filesystem >= 95
+BuildRequires:  mingw64-gcc
+BuildRequires:  mingw64-binutils
+BuildRequires:  mingw64-openssl
+BuildRequires:  mingw64-zlib
+
+# The libtool bundled with this package is too old for win64 support
+BuildRequires:  autoconf automake libtool
+
+
 %description
 libssh2 is a library implementing the SSH2 protocol as defined by
 Internet Drafts: SECSH-TRANS(22), SECSH-USERAUTH(25),
@@ -27,6 +35,7 @@ SECSH-CONNECTION(23), SECSH-ARCH(20), SECSH-FILEXFER(06)*,
 SECSH-DHGEX(04), and SECSH-NUMBERS(10).
 
 
+# Win32
 %package -n mingw32-libssh2
 Summary:        MinGW Windows library implementation of the SSH2 protocol
 Requires:       pkgconfig
@@ -37,38 +46,57 @@ Internet Drafts: SECSH-TRANS(22), SECSH-USERAUTH(25),
 SECSH-CONNECTION(23), SECSH-ARCH(20), SECSH-FILEXFER(06)*,
 SECSH-DHGEX(04), and SECSH-NUMBERS(10).
 
-
 %package -n mingw32-libssh2-static
 Summary:        Static version of the MinGW Windows SSH2 library
 Requires:       mingw32-libssh2 = %{version}-%{release}
-Group:          Development/Libraries
 
 %description -n mingw32-libssh2-static
 Static version of the MinGW Windows SSH2 library.
 
+# Win64
+%package -n mingw64-libssh2
+Summary:        MinGW Windows library implementation of the SSH2 protocol
+Requires:       pkgconfig
+
+%description -n mingw64-libssh2
+libssh2 is a library implementing the SSH2 protocol as defined by
+Internet Drafts: SECSH-TRANS(22), SECSH-USERAUTH(25),
+SECSH-CONNECTION(23), SECSH-ARCH(20), SECSH-FILEXFER(06)*,
+SECSH-DHGEX(04), and SECSH-NUMBERS(10).
+
+%package -n mingw64-libssh2-static
+Summary:        Static version of the MinGW Windows SSH2 library
+Requires:       mingw64-libssh2 = %{version}-%{release}
+
+%description -n mingw64-libssh2-static
+Static version of the MinGW Windows SSH2 library.
+
 
-%{?mingw32_debug_package}
+%?mingw_debug_package
 
 
 %prep
 %setup -q -n libssh2-%{version}
+autoreconf -i --force
 
 
 %build
-%{mingw32_configure} --enable-static --enable-shared
-make %{?_smp_mflags}
+%mingw_configure --enable-static --enable-shared
+%mingw_make %{?_smp_mflags}
 
 
 %install
-make DESTDIR=$RPM_BUILD_ROOT install
+%mingw_make DESTDIR=$RPM_BUILD_ROOT install
 
 # Remove .la files
-rm $RPM_BUILD_ROOT%{mingw32_libdir}/*.la
+find $RPM_BUILD_ROOT -name "*.la" -delete
 
 # Remove man pages which duplicate native Fedora.
 rm -r $RPM_BUILD_ROOT%{mingw32_mandir}/man3
+rm -r $RPM_BUILD_ROOT%{mingw64_mandir}/man3
 
 
+# Win32
 %files -n mingw32-libssh2
 %doc COPYING
 %{mingw32_bindir}/libssh2-1.dll
@@ -77,12 +105,26 @@ rm -r $RPM_BUILD_ROOT%{mingw32_mandir}/man3
 %{mingw32_includedir}/libssh2_publickey.h
 %{mingw32_includedir}/libssh2_sftp.h
 
-
 %files -n mingw32-libssh2-static
 %{mingw32_libdir}/libssh2.a
 
+# Win64
+%files -n mingw64-libssh2
+%doc COPYING
+%{mingw64_bindir}/libssh2-1.dll
+%{mingw64_libdir}/libssh2.dll.a
+%{mingw64_includedir}/libssh2.h
+%{mingw64_includedir}/libssh2_publickey.h
+%{mingw64_includedir}/libssh2_sftp.h
+
+%files -n mingw64-libssh2-static
+%{mingw64_libdir}/libssh2.a
+
 
 %changelog
+* Sun Apr 08 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.1-11
+- Added win64 support (contributed by Marc-Andre Lureau)
+
 * Fri Mar 09 2012 Kalev Lember <kalevlember at gmail.com> - 1.1-10
 - Remove .la files
 


More information about the scm-commits mailing list