source: rtems/contrib/crossrpms/cygwin/i686/i686-pc-cygwin-libs.spec @ facca98

4.104.11
Last change on this file since facca98 was facca98, checked in by Ralf Corsepius <ralf.corsepius@…>, on May 7, 2009 at 2:40:22 PM

New.

  • Property mode set to 100644
File size: 3.8 KB
Line 
1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
6
7%ifos cygwin cygwin32 mingw mingw32
8%define _exeext .exe
9%define debug_package           %{nil}
10%define _libdir                 %{_exec_prefix}/lib
11%else
12%define _exeext %{nil}
13%endif
14
15%ifos cygwin cygwin32
16%define optflags -O3 -pipe -march=i486 -funroll-loops
17%endif
18
19%ifos mingw mingw32
20%if %{defined _mingw32_cflags}
21%define optflags %{_mingw32_cflags}
22%else
23%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
24%endif
25%endif
26
27%if "%{_build}" != "%{_host}"
28%define _host_rpmprefix %{_host}-
29%else
30%define _host_rpmprefix %{nil}
31%endif
32
33%define cygwin_version 1.5.25-15
34%define cygwin_rpmvers %{expand:%(echo 1.5.25-15 | tr - _)}
35
36Name:         i686-pc-cygwin
37Release:      0.20090506.1%{?dist}
38License:      GPL
39Group:        Development/Tools
40
41BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
42BuildArch:      noarch
43
44Version:        %cygwin_rpmvers
45Summary:        i686-pc-cygwin libraries
46
47Source0:        ftp://cygwin.com/pub/cygwin/release/cygwin/cygwin-%{cygwin_version}.tar.bz2
48%{?_without_sources:NoSource:   0}
49
50%description
51i686-pc-cygwin libraries.
52
53%prep
54%setup -c -q
55
56%build
57  rm -rf i686-pc-cygwin
58
59  # Setup sys-root (Usable for gcc >= 3.4)
60  mkdir -p i686-pc-cygwin/sys-root
61  %{__tar} cf - usr/lib usr/include | ( cd i686-pc-cygwin/sys-root ; %{__tar} xf -)
62
63%install
64  rm -rf $RPM_BUILD_ROOT
65  mkdir -p $RPM_BUILD_ROOT%{_prefix}
66  cp -a i686-pc-cygwin $RPM_BUILD_ROOT%{_prefix}
67
68# Extract %%__os_install_post into os_install_post~
69cat << \EOF > os_install_post~
70%__os_install_post
71EOF
72
73# Generate customized brp-*scripts
74cat os_install_post~ | while read a x y; do
75case $a in
76# Prevent brp-strip* from trying to handle foreign binaries
77*/brp-strip*)
78  b=$(basename $a)
79  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
80  chmod a+x $b
81  ;;
82esac
83done
84
85sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
86< os_install_post~ > os_install_post
87%define __os_install_post . ./os_install_post
88
89
90cat << EOF > %{_builddir}/%{name}-%{cygwin_rpmvers}/find-provides
91#!/bin/sh
92grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i686-pc-cygwin/(lib|include|sys-root)' \
93  | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/i686-pc-cygwin/' | %__find_provides
94EOF
95chmod +x %{_builddir}/%{name}-%{cygwin_rpmvers}/find-provides
96%define __find_provides %{_builddir}/%{name}-%{cygwin_rpmvers}/find-provides
97
98cat << EOF > %{_builddir}/%{name}-%{cygwin_rpmvers}/find-requires
99#!/bin/sh
100grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i686-pc-cygwin/(lib|include|sys-root)' \
101  | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/i686-pc-cygwin/' | %__find_requires
102EOF
103chmod +x %{_builddir}/%{name}-%{cygwin_rpmvers}/find-requires
104%define __find_requires %{_builddir}/%{name}-%{cygwin_rpmvers}/find-requires
105
106%ifnarch noarch
107# Extract %%__debug_install_post into debug_install_post~
108cat << \EOF > debug_install_post~
109%__debug_install_post
110EOF
111
112# Generate customized debug_install_post script
113cat debug_install_post~ | while read a x y; do
114case $a in
115# Prevent find-debuginfo.sh* from trying to handle foreign binaries
116*/find-debuginfo.sh)
117  b=$(basename $a)
118  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
119  chmod a+x $b
120  ;;
121esac
122done
123
124sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
125< debug_install_post~ > debug_install_post
126%define __debug_install_post . ./debug_install_post
127
128%endif
129
130%clean
131  rm -rf $RPM_BUILD_ROOT
132
133%package sys-root
134Group: Development/Tools
135Summary: i686-pc-cygwin target files for gcc >= 3.4
136
137%description sys-root
138i686-pc-cygwin target files for gcc >= 3.4
139
140%files sys-root
141%defattr(-,root,root,-)
142%dir %{_prefix}/i686-pc-cygwin
143%{_prefix}/i686-pc-cygwin/sys-root
Note: See TracBrowser for help on using the repository browser.