From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Mon, 27 Oct 2008 19:15:36 +0000 (+0000) Subject: Added mingw32-configure script. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=d0d74da6f4e9aaf8ac01f3bcc2341840a3f26a97;p=fedora-mingw.git Added mingw32-configure script. --- diff --git a/filesystem/mingw32-configure.sh b/filesystem/mingw32-configure.sh new file mode 100755 index 0000000..73bb0ad --- /dev/null +++ b/filesystem/mingw32-configure.sh @@ -0,0 +1,39 @@ +#!/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 \ + "$@" diff --git a/filesystem/mingw32-filesystem.spec b/filesystem/mingw32-filesystem.spec index 85d576d..7292baa 100644 --- a/filesystem/mingw32-filesystem.spec +++ b/filesystem/mingw32-filesystem.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: mingw32-filesystem -Version: 31 +Version: 32 Release: 1%{?dist} Summary: MinGW base filesystem and environment @@ -17,6 +17,7 @@ Source2: mingw32.sh Source3: mingw32.csh Source4: mingw32-find-requires.sh Source5: mingw32-find-provides.sh +Source6: mingw32-configure.sh Requires: setup Requires: rpm @@ -70,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT 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/ @@ -125,11 +129,15 @@ rm -rf $RPM_BUILD_ROOT %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 - 32-1 +- Add mingw32-configure script. + * Mon Oct 27 2008 Richard Jones - 31-1 - Update the spec file with explanation of the 'Provides: mingw32(...)' lines for Windows system DLLs.