source: rtems/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-libs.spec @ ac39e0f

4.104.11
Last change on this file since ac39e0f was ac39e0f, checked in by Ralf Corsepius <ralf.corsepius@…>, on May 6, 2009 at 12:23:13 PM

Update.

  • Property mode set to 100644
File size: 7.4 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 freebsd_version 7.2
34%define freebsd_rpmvers %{expand:%(echo 7.2 | tr - _)}
35
36%define _use_internal_dependency_generator 0
37%define __debug_install_post %{nil}
38
39Name:           i586-pc-freebsd7.2
40Release:        0.20090506.1%{?dist}
41License:        FreeBSD
42Group:          Development/Tools
43
44BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
45BuildArch:      noarch
46
47Version:        %freebsd_rpmvers
48Summary:        i586-pc-freebsd7.2 Libraries
49
50Source0:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.aa
51Source1:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ab
52Source2:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ac
53Source3:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ad
54Source4:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ae
55Source5:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.af
56Source6:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ag
57Source7:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ah
58Source8:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ai
59Source9:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.aj
60Source10: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ak
61Source11: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.al
62Source12: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.am
63Source13: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.an
64Source14: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ao
65Source15: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ap
66Source16: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.aq
67Source17: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ar
68Source18: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.as
69Source19: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.at
70Source20: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.au
71Source21: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.av
72Source22: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.aw
73Source23: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ax
74Source24: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ay
75Source25: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.az
76Source26: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ba
77Source27: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bb
78Source28: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bc
79Source29: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bd
80Source30: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.be
81Source31: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bf
82Source32: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bg
83Source33: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bh
84Source34: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bi
85
86%description
87i586-pc-freebsd7.2 libraries.
88
89%prep
90%setup -q -c -T -n %{name}-%{version}
91
92  cat \
93 %SOURCE0 %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 \
94 %SOURCE5 %SOURCE6 %SOURCE7 %SOURCE8 %SOURCE9 \
95 %SOURCE10 %SOURCE11 %SOURCE12 %SOURCE13 %SOURCE14 \
96 %SOURCE15 %SOURCE16 %SOURCE17 %SOURCE18 %SOURCE19 \
97 %SOURCE20 %SOURCE21 %SOURCE22 %SOURCE23 %SOURCE24 \
98 %SOURCE25 %SOURCE26 %SOURCE27 %SOURCE28 %SOURCE29 \
99 %SOURCE30 %SOURCE31 %SOURCE32 %SOURCE33 %SOURCE34 \
100 | %{__tar} --unlink -pxzf - ./lib ./usr/lib ./usr/include %{?el5:||:}
101
102%build
103  # Setup sys-root (Usable for gcc >= 3.4)
104  mkdir -p i586-pc-freebsd7.2/sys-root
105  %{__tar} cf - lib usr/lib usr/include | ( cd i586-pc-freebsd7.2/sys-root ; %{__tar} xf -)
106
107  pushd i586-pc-freebsd7.2/sys-root/usr/lib > /dev/null
108  # missing files
109  rm -f lib*_p.*
110  # not needed
111  rm -rf aout compat
112
113  # Fix up symlinks
114  find -type l -exec ls -l {} \; | \
115    while read a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aA ; do \
116    case $aA in
117    /lib* ) # link
118       rm $a8;
119       b=`basename $aA`
120       ln -s ../../lib/$b $a8
121       ;;
122    esac
123  done
124  popd > /dev/null
125
126%install
127  rm -rf $RPM_BUILD_ROOT
128  mkdir -p $RPM_BUILD_ROOT%{_prefix}
129  cp -a i586-pc-freebsd7.2 $RPM_BUILD_ROOT%{_prefix}
130
131# Extract %%__os_install_post into os_install_post~
132cat << \EOF > os_install_post~
133%__os_install_post
134EOF
135
136# Generate customized brp-*scripts
137cat os_install_post~ | while read a x y; do
138case $a in
139# Prevent brp-strip* from trying to handle foreign binaries
140*/brp-strip*)
141  b=$(basename $a)
142  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
143  chmod a+x $b
144  ;;
145esac
146done
147
148sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
149< os_install_post~ > os_install_post
150%define __os_install_post . ./os_install_post
151
152
153cat << EOF > %{_builddir}/%{name}-%{freebsd_rpmvers}/find-provides
154#!/bin/sh
155grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i586-pc-freebsd7.2/(lib|include|sys-root)' \
156  | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/i586-pc-freebsd7.2/' | %__find_provides
157EOF
158chmod +x %{_builddir}/%{name}-%{freebsd_rpmvers}/find-provides
159%define __find_provides %{_builddir}/%{name}-%{freebsd_rpmvers}/find-provides
160
161cat << EOF > %{_builddir}/%{name}-%{freebsd_rpmvers}/find-requires
162#!/bin/sh
163grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i586-pc-freebsd7.2/(lib|include|sys-root)' \
164  | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/i586-pc-freebsd7.2/' | %__find_requires
165EOF
166chmod +x %{_builddir}/%{name}-%{freebsd_rpmvers}/find-requires
167%define __find_requires %{_builddir}/%{name}-%{freebsd_rpmvers}/find-requires
168
169%ifnarch noarch
170# Extract %%__debug_install_post into debug_install_post~
171cat << \EOF > debug_install_post~
172%__debug_install_post
173EOF
174
175# Generate customized debug_install_post script
176cat debug_install_post~ | while read a x y; do
177case $a in
178# Prevent find-debuginfo.sh* from trying to handle foreign binaries
179*/find-debuginfo.sh)
180  b=$(basename $a)
181  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
182  chmod a+x $b
183  ;;
184esac
185done
186
187sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
188< debug_install_post~ > debug_install_post
189%define __debug_install_post . ./debug_install_post
190
191%endif
192
193%clean
194  rm -rf $RPM_BUILD_ROOT
195
196%package sys-root
197Group: Development/Tools
198Summary: i586-pc-freebsd7.2 target files for gcc >= 3.4
199
200%description sys-root
201i586-pc-freebsd7.2 target files for gcc >= 3.4
202
203%files sys-root
204%defattr(-,root,root,-)
205%dir %{_prefix}/i586-pc-freebsd7.2
206%{_prefix}/i586-pc-freebsd7.2/sys-root
Note: See TracBrowser for help on using the repository browser.