source: rtems/contrib/crossrpms/freebsd6.4/i586/i586-pc-freebsd6.4-libs.spec @ e107a1b

4.104.11
Last change on this file since e107a1b was e107a1b, checked in by Ralf Corsepius <ralf.corsepius@…>, on Aug 27, 2009 at 1:20:33 PM

Update.

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