source: rtems/contrib/crossrpms/freebsd7.0/i586/i586-pc-freebsd7.0-libs.spec @ d8f33271

4.104.11
Last change on this file since d8f33271 was d8f33271, checked in by Ralf Corsepius <ralf.corsepius@…>, on Aug 27, 2009 at 10:45:21 AM

Modernize.

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