[mingw-nsiswrapper: 18/20] Made the package compatible with the mingw-w64 toolchain

Kalev Lember kalev at fedoraproject.org
Wed Mar 7 16:09:33 UTC 2012


commit 198f4bfb360fe19a96111b9111c5a031cdb4a1ed
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Mon Feb 27 17:56:58 2012 +0100

    Made the package compatible with the mingw-w64 toolchain
    
    and dropped unneeded RPM tags

 mingw32-nsiswrapper.spec |   14 +++++---------
 nsiswrapper.pl           |   18 +++++++++---------
 2 files changed, 14 insertions(+), 18 deletions(-)
---
diff --git a/mingw32-nsiswrapper.spec b/mingw32-nsiswrapper.spec
index e39512f..7d86a8b 100644
--- a/mingw32-nsiswrapper.spec
+++ b/mingw32-nsiswrapper.spec
@@ -1,5 +1,5 @@
 Name:           mingw32-nsiswrapper
-Version:        8
+Version:        9
 Release:        2%{?dist}
 Summary:        Helper program for making NSIS Windows installers
 
@@ -9,7 +9,6 @@ URL:            http://fedoraproject.org/wiki/MinGW
 Source0:        nsiswrapper.pl
 Source1:        README
 Source2:        COPYING
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
 
@@ -37,8 +36,6 @@ installer script that NSIS needs.
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
 mkdir -p $RPM_BUILD_ROOT%{_bindir}
 install -m 0755 %{SOURCE0} $RPM_BUILD_ROOT%{_bindir}/nsiswrapper
 
@@ -53,12 +50,7 @@ pod2man -c "NSIS" -r "%{name}-%{version}" %{SOURCE0} \
   > $RPM_BUILD_ROOT%{_mandir}/man1/nsiswrapper.1
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %files
-%defattr(-,root,root)
 %doc %{_docdir}/%{name}-%{version}/COPYING
 %doc %{_docdir}/%{name}-%{version}/README
 %{_bindir}/nsiswrapper
@@ -66,6 +58,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Feb 27 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 9-1
+- Made the package compatible with the mingw-w64 toolchain
+- Dropped unneeded RPM tags
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 8-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
diff --git a/nsiswrapper.pl b/nsiswrapper.pl
index f7989bd..e673b98 100755
--- a/nsiswrapper.pl
+++ b/nsiswrapper.pl
@@ -105,9 +105,9 @@ names of roots, which generally ensures that the original directory
 structure is preserved.  Thus for example if the original roots (and
 any dependencies) are:
 
- /usr/i686-pc-mingw32/sys-root/mingw/bin/program.exe
- /usr/i686-pc-mingw32/sys-root/mingw/bin/library.dll
- /usr/i686-pc-mingw32/sys-root/mingw/etc/config
+ /usr/i686-w64-mingw32/sys-root/mingw/bin/program.exe
+ /usr/i686-w64-mingw32/sys-root/mingw/bin/library.dll
+ /usr/i686-w64-mingw32/sys-root/mingw/etc/config
 
 then the install directory will look like this:
 
@@ -125,9 +125,9 @@ adding roots of the form:
 
 for example:
 
- /usr/i686-pc-mingw32/sys-root/mingw/bin/program.exe=program.exe
- /usr/i686-pc-mingw32/sys-root/mingw/bin/library.dll=library.dll
- /usr/i686-pc-mingw32/sys-root/mingw/etc/config=conf/config
+ /usr/i686-w64-mingw32/sys-root/mingw/bin/program.exe=program.exe
+ /usr/i686-w64-mingw32/sys-root/mingw/bin/library.dll=library.dll
+ /usr/i686-w64-mingw32/sys-root/mingw/etc/config=conf/config
 
 which results in:
 
@@ -228,7 +228,7 @@ my $installdir = '';
 my $installdirregkey = '';
 
 # XXX Should make these configurable.
-my $mingw32_prefix = '/usr/i686-pc-mingw32/sys-root/mingw';
+my $mingw32_prefix = '/usr/i686-w64-mingw32/sys-root/mingw';
 my $mingw32_bindir = $mingw32_prefix . '/bin';
 my $mingw32_libdir = $mingw32_prefix . '/lib';
 my $mingw32_sysconfdir = $mingw32_prefix . '/etc';
@@ -333,9 +333,9 @@ sub check_prereqs
     my @paths = split (/:/, $ENV{PATH});
 
     if (! $objdump) {
-	$objdump = check_path ("i686-pc-mingw32-objdump", @paths);
+	$objdump = check_path ("i686-w64-mingw32-objdump", @paths);
 	if (! $objdump || ! -x $objdump) {
-	    die "i686-pc-mingw32-objdump: program not found on \$PATH\n"
+	    die "i686-w64-mingw32-objdump: program not found on \$PATH\n"
 	}
     }
 }


More information about the scm-commits mailing list