[mingw-termcap] Added win64 support

epienbro epienbro at fedoraproject.org
Sat Mar 10 19:23:46 UTC 2012


commit 0975d2816d66014e0d9df02671bdea484c324612
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Sat Mar 10 20:23:34 2012 +0100

    Added win64 support
    
    - Added win64 support
    - Automatically generate debuginfo subpackage
    - Added static subpackage

 mingw-termcap.spec |   97 ++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 86 insertions(+), 11 deletions(-)
---
diff --git a/mingw-termcap.spec b/mingw-termcap.spec
index d2e5d30..175ed1b 100644
--- a/mingw-termcap.spec
+++ b/mingw-termcap.spec
@@ -5,12 +5,14 @@
 # ncurses.  So here we are using the GNU termcap library which is
 # regretably GPL'd.
 
-%define __strip %{mingw32_strip}
-%define __objdump %{mingw32_objdump}
+%?mingw_package_header
+
+%global mingw_build_win32 1
+%global mingw_build_win64 1
 
 Name:           mingw-termcap
 Version:        1.3.1
-Release:        12%{?dist}
+Release:        13%{?dist}
 Summary:        MinGW terminal feature database
 
 License:        GPLv2+
@@ -20,10 +22,14 @@ Source0:        ftp://ftp.gnu.org/gnu/termcap/termcap-%{version}.tar.gz
 
 BuildArch:      noarch
 
-BuildRequires:  mingw32-filesystem
+BuildRequires:  mingw32-filesystem >= 95
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-binutils
 
+BuildRequires:  mingw64-filesystem >= 95
+BuildRequires:  mingw64-gcc
+BuildRequires:  mingw64-binutils
+
 BuildRequires:  autoconf
 
 
@@ -38,6 +44,7 @@ This package contains libraries and development tools for the MinGW
 cross-compiled version.
 
 
+# Win32
 %package -n mingw32-termcap
 Summary:        MinGW terminal feature database
 
@@ -51,6 +58,37 @@ other termcap libraries.
 This package contains libraries and development tools for the MinGW
 cross-compiled version.
 
+%package -n mingw32-termcap-static
+Summary:        Static version of the cross compiled termcap library
+Requires:       mingw32-termcap = %{version}-%{release}
+
+%description -n mingw32-termcap-static
+Static version of the cross compiled termcap library.
+
+# Win64
+%package -n mingw64-termcap
+Summary:        MinGW terminal feature database
+
+%description -n mingw64-termcap
+This is the GNU termcap library -- a library of C functions that
+enable programs to send control strings to terminals in a way
+independent of the terminal type.  The GNU termcap library does not
+place an arbitrary limit on the size of termcap entries, unlike most
+other termcap libraries.
+
+This package contains libraries and development tools for the MinGW
+cross-compiled version.
+
+%package -n mingw64-termcap-static
+Summary:        Static version of the cross compiled termcap library
+Requires:       mingw64-termcap = %{version}-%{release}
+
+%description -n mingw64-termcap-static
+Static version of the cross compiled termcap library.
+
+
+%?mingw_debug_package
+
 
 %prep
 %setup -q -n termcap-%{version}
@@ -60,34 +98,53 @@ autoconf
 
 
 %build
-%{mingw32_configure}
-make
+%mingw_configure
+%mingw_make %{?_smp_mflags}
 
 # Build a shared library.  No need for -fPIC on Windows.
+pushd build_win32
 %{mingw32_cc} -shared \
   -Wl,--out-implib,libtermcap.dll.a \
   -o libtermcap-0.dll \
   termcap.o tparam.o version.o
+popd
+pushd build_win64
+%{mingw64_cc} -shared \
+  -Wl,--out-implib,libtermcap.dll.a \
+  -o libtermcap-0.dll \
+  termcap.o tparam.o version.o
+popd
 
 
 %install
-make install \
+# We can't use the %%mingw_make_install macro here as
+# the Makefile doesn't support the DESTDIR=... flag
+make install -C build_win32 \
   prefix=$RPM_BUILD_ROOT%{mingw32_prefix} \
   exec_prefix=$RPM_BUILD_ROOT%{mingw32_prefix} \
   oldincludedir=
+make install -C build_win64 \
+  prefix=$RPM_BUILD_ROOT%{mingw64_prefix} \
+  exec_prefix=$RPM_BUILD_ROOT%{mingw64_prefix} \
+  oldincludedir=
 
 # Move the shared library to the correct locations.
 mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir}
-install -m 0755 libtermcap-0.dll $RPM_BUILD_ROOT%{mingw32_bindir}
-install -m 0755 libtermcap.dll.a $RPM_BUILD_ROOT%{mingw32_libdir}
+install -m 0755 build_win32/libtermcap-0.dll $RPM_BUILD_ROOT%{mingw32_bindir}
+install -m 0755 build_win32/libtermcap.dll.a $RPM_BUILD_ROOT%{mingw32_libdir}
 
-# Don't want the static library, thank you.
-rm $RPM_BUILD_ROOT%{mingw32_libdir}/libtermcap.a
+mkdir -p $RPM_BUILD_ROOT%{mingw64_bindir}
+install -m 0755 build_win64/libtermcap-0.dll $RPM_BUILD_ROOT%{mingw64_bindir}
+install -m 0755 build_win64/libtermcap.dll.a $RPM_BUILD_ROOT%{mingw64_libdir}
 
 # Move the info files to the correct location.
 mkdir -p $RPM_BUILD_ROOT%{mingw32_infodir}
 mv $RPM_BUILD_ROOT%{mingw32_prefix}/info/* $RPM_BUILD_ROOT%{mingw32_infodir}
 
+mkdir -p $RPM_BUILD_ROOT%{mingw64_infodir}
+mv $RPM_BUILD_ROOT%{mingw64_prefix}/info/* $RPM_BUILD_ROOT%{mingw64_infodir}
+
+
 
 %files -n mingw32-termcap
 %doc COPYING
@@ -98,8 +155,26 @@ mv $RPM_BUILD_ROOT%{mingw32_prefix}/info/* $RPM_BUILD_ROOT%{mingw32_infodir}
 # there is no equivalent native Fedora package.
 %{mingw32_infodir}/*
 
+%files -n mingw32-termcap-static
+%{mingw32_libdir}/libtermcap.a
+
+%files -n mingw64-termcap
+%doc COPYING
+%{mingw64_bindir}/libtermcap-0.dll
+%{mingw64_libdir}/libtermcap.dll.a
+%{mingw64_includedir}/termcap.h
+%{mingw64_infodir}/*
+
+%files -n mingw64-termcap-static
+%{mingw64_libdir}/libtermcap.a
+
 
 %changelog
+* Sat Mar 10 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.3.1-13
+- Added win64 support
+- Automatically generate debuginfo subpackage
+- Added static subpackage
+
 * Wed Mar 07 2012 Kalev Lember <kalevlember at gmail.com> - 1.3.1-12
 - Renamed the source package to mingw-termcap (#801034)
 - Modernize the spec file


More information about the scm-commits mailing list