--- /dev/null
+#!/bin/sh -
+
+# mingw32-configure
+# Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# This is a useful command-line script which configures
+# a program for cross-compilation. It is meant to be
+# the equivalent of the %{_mingw32_configure} macro in
+# /etc/rpm/macros.mingw32
+
+mingw32_prefix=/usr/i686-pc-mingw32/sys-root/mingw
+mingw32_libdir=$mingw32_prefix/lib
+mingw32_host=i686-pc-mingw32
+mingw32_target=i686-pc-mingw32
+mingw32_cc=i686-pc-mingw32-gcc
+mingw32_cflags="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
+
+PKG_CONFIG_PATH="$mingw32_libdir/pkgconfig" \
+CC="$mingw32_cc" \
+CFLAGS="$mingw32_cflags" \
+./configure \
+ --host=$mingw32_host \
+ --target=$mingw32_target \
+ --prefix=$_mingw32_prefix \
+ "$@"
%define debug_package %{nil}
Name: mingw32-filesystem
-Version: 31
+Version: 32
Release: 1%{?dist}
Summary: MinGW base filesystem and environment
Source3: mingw32.csh
Source4: mingw32-find-requires.sh
Source5: mingw32-find-provides.sh
+Source6: mingw32-configure.sh
Requires: setup
Requires: rpm
mkdir -p $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_bindir}/mingw32-configure
+
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -m 644 %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
%config(noreplace) %{_sysconfdir}/rpm/macros.mingw32
%config(noreplace) %{_sysconfdir}/profile.d/mingw32.sh
%config(noreplace) %{_sysconfdir}/profile.d/mingw32.csh
+%{_bindir}/mingw32-configure
%{_prefix}/i686-pc-mingw32/
/usr/lib/rpm/mingw32-*
%changelog
+* Mon Oct 27 2008 Richard Jones <rjones@redhat.com> - 32-1
+- Add mingw32-configure script.
+
* Mon Oct 27 2008 Richard Jones <rjones@redhat.com> - 31-1
- Update the spec file with explanation of the 'Provides: mingw32(...)'
lines for Windows system DLLs.