diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-05-07 14:40:22 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-05-07 14:40:22 +0000 |
commit | facca98f29f96eb35eb8781a41da79a9ba023d62 (patch) | |
tree | ced2f22c7c23da2a45649c10f89c02f55e7d6f79 /contrib/crossrpms/cygwin/i686/i686-pc-cygwin-w32api.spec | |
parent | 5fd366e01da3a557affd706fe7acf71835f56891 (diff) |
New.
Diffstat (limited to 'contrib/crossrpms/cygwin/i686/i686-pc-cygwin-w32api.spec')
-rw-r--r-- | contrib/crossrpms/cygwin/i686/i686-pc-cygwin-w32api.spec | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/contrib/crossrpms/cygwin/i686/i686-pc-cygwin-w32api.spec b/contrib/crossrpms/cygwin/i686/i686-pc-cygwin-w32api.spec new file mode 100644 index 0000000000..c856108f23 --- /dev/null +++ b/contrib/crossrpms/cygwin/i686/i686-pc-cygwin-w32api.spec @@ -0,0 +1,154 @@ +# +# Please send bugfixes or comments to +# http://www.rtems.org/bugzilla +# + + +%ifos cygwin cygwin32 mingw mingw32 +%define _exeext .exe +%define debug_package %{nil} +%define _libdir %{_exec_prefix}/lib +%else +%define _exeext %{nil} +%endif + +%ifos cygwin cygwin32 +%define optflags -O3 -pipe -march=i486 -funroll-loops +%endif + +%ifos mingw mingw32 +%if %{defined _mingw32_cflags} +%define optflags %{_mingw32_cflags} +%else +%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields +%endif +%endif + +%if "%{_build}" != "%{_host}" +%define _host_rpmprefix %{_host}- +%else +%define _host_rpmprefix %{nil} +%endif + +%define w32api_version 3.12-1 +%define w32api_rpmvers %{expand:%(echo 3.12-1 | tr - _)} + +Name: i686-pc-cygwin-w32api +Release: 0.20090506.1%{?dist} +License: GPL +Group: Development/Tools + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +Version: %w32api_rpmvers +Summary: Cygwin w32api Libraries + +Source0: ftp://cygwin.com/pub/cygwin/release/w32api/w32api-%{w32api_version}.tar.bz2 +%{?_without_sources:NoSource: 0} + +%description +Cygwin w32api libraries. + +%prep +%setup -c -q + +%build + rm -rf i686-pc-cygwin + + mkdir -p i686-pc-cygwin + cp -a usr/lib usr/include i686-pc-cygwin + + # Setup sys-root (Usable for gcc >= 3.4) + mkdir -p i686-pc-cygwin/sys-root + %{__tar} cf - usr/lib usr/include | ( cd i686-pc-cygwin/sys-root ; %{__tar} xf -) + +%install + rm -rf $RPM_BUILD_ROOT + mkdir -p $RPM_BUILD_ROOT%{_prefix} + cp -a i686-pc-cygwin $RPM_BUILD_ROOT%{_prefix} + +# Extract %%__os_install_post into os_install_post~ +cat << \EOF > os_install_post~ +%__os_install_post +EOF + +# Generate customized brp-*scripts +cat os_install_post~ | while read a x y; do +case $a in +# Prevent brp-strip* from trying to handle foreign binaries +*/brp-strip*) + b=$(basename $a) + sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b + chmod a+x $b + ;; +esac +done + +sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \ +< os_install_post~ > os_install_post +%define __os_install_post . ./os_install_post + + +cat << EOF > %{_builddir}/%{name}-%{w32api_rpmvers}/find-provides +#!/bin/sh +grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i686-pc-cygwin/(lib|include|sys-root)' \ + | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/i686-pc-cygwin/' | %__find_provides +EOF +chmod +x %{_builddir}/%{name}-%{w32api_rpmvers}/find-provides +%define __find_provides %{_builddir}/%{name}-%{w32api_rpmvers}/find-provides + +cat << EOF > %{_builddir}/%{name}-%{w32api_rpmvers}/find-requires +#!/bin/sh +grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i686-pc-cygwin/(lib|include|sys-root)' \ + | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/i686-pc-cygwin/' | %__find_requires +EOF +chmod +x %{_builddir}/%{name}-%{w32api_rpmvers}/find-requires +%define __find_requires %{_builddir}/%{name}-%{w32api_rpmvers}/find-requires + +%ifnarch noarch +# Extract %%__debug_install_post into debug_install_post~ +cat << \EOF > debug_install_post~ +%__debug_install_post +EOF + +# Generate customized debug_install_post script +cat debug_install_post~ | while read a x y; do +case $a in +# Prevent find-debuginfo.sh* from trying to handle foreign binaries +*/find-debuginfo.sh) + b=$(basename $a) + sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b + chmod a+x $b + ;; +esac +done + +sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \ +< debug_install_post~ > debug_install_post +%define __debug_install_post . ./debug_install_post + +%endif + +%clean + rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%dir %{_prefix}/i686-pc-cygwin +%{_prefix}/i686-pc-cygwin/lib +%{_prefix}/i686-pc-cygwin/include + +%package sys-root +Group: Development/Tools +Summary: i686-pc-cygwin target files for gcc >= 3.4 + +%description sys-root +i686-pc-cygwin target files for gcc >= 3.4 + +%files sys-root +%defattr(-,root,root,-) +%dir %{_prefix}/i686-pc-cygwin +%{_prefix}/i686-pc-cygwin/sys-root + + |