source: rtems/contrib/crossrpms/rtems4.9/powerpc/rtems-4.9-powerpc-rtems4.9-cpukit.spec @ 9589c665

4.104.114.9
Last change on this file since 9589c665 was 9589c665, checked in by Ralf Corsepius <ralf.corsepius@…>, on Sep 3, 2008 at 10:48:11 PM

Regenerate.

  • Property mode set to 100644
File size: 3.5 KB
Line 
1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
6%define _prefix                 /opt/rtems-4.9
7%define _infodir                %{_prefix}/info
8%define _mandir                 %{_prefix}/man
9
10%ifos cygwin cygwin32 mingw mingw32
11%define _exeext .exe
12%else
13%define _exeext %{nil}
14%endif
15
16%ifos cygwin cygwin32
17%define optflags -O3 -pipe -march=i486 -funroll-loops
18%define _libdir                 %{_exec_prefix}/lib
19%define debug_package           %{nil}
20%endif
21
22%if "%{_build}" != "%{_host}"
23%define _host_rpmprefix rtems-4.9-%{_host}-
24%else
25%define _host_rpmprefix %{nil}
26%endif
27
28
29%define cpukit_pkgvers 4.7.99.1-20070510
30%define cpukit_version 4.7.99.1
31%define cpukit_rpmvers %{expand:%(echo "4.7.99.1" | tr - _ )}
32
33Name:           rtems-4.9-powerpc-rtems4.9-cpukit
34Summary:        powerpc-rtems4.9 cpukit
35
36Group:          Development/Tools
37Version:        %{cpukit_rpmvers}
38Release:        0%{?dist}
39License:        GPL
40URL:            http://cpukit.gnu.org
41BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
42BuildArch:      noarch
43
44%define _use_internal_dependency_generator 0
45
46BuildRequires:  rtems-4.9-powerpc-rtems4.9-gcc
47
48Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/rtems-%{cpukit_pkgvers}.tar.bz2
49%{?_without_sources:NoSource:   0}
50
51%description
52RTEMS cpukit for powerpc-rtems4.9.
53%prep
54%setup -c -T -n %{name}-%{version}
55
56%setup -q -T -D -n %{name}-%{version} -a0
57
58
59%build
60  export PATH="%{_bindir}:${PATH}"
61  mkdir -p build
62
63  cd build
64  ../rtems-%{cpukit_pkgvers}/configure \
65    --prefix=%{_prefix} \
66    --target=powerpc-rtems4.9 \
67    --enable-multilib \
68    --disable-rtemsbsp
69
70  make all RTEMS_BSP=
71  cd ..
72
73%install
74  rm -rf $RPM_BUILD_ROOT
75  export PATH="%{_bindir}:${PATH}"
76  cd build
77  make DESTDIR=$RPM_BUILD_ROOT install
78  cd ..
79
80  rm -rf $RPM_BUILD_ROOT%{_prefix}/share/man
81  rm -rf $RPM_BUILD_ROOT%{_prefix}/bin
82# Extract %%__os_install_post into os_install_post~
83cat << \EOF > os_install_post~
84%__os_install_post
85EOF
86
87# Generate customized brp-*scripts
88cat os_install_post~ | while read a x y; do
89case $a in
90# Prevent brp-strip* from trying to handle foreign binaries
91*/brp-strip*)
92  b=$(basename $a)
93  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
94  chmod a+x $b
95  ;;
96# Fix up brp-compress to handle %%_prefix != /usr
97*/brp-compress*)
98  b=$(basename $a)
99  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
100  chmod a+x $b
101  ;;
102esac
103done
104
105sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
106  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
107< os_install_post~ > os_install_post
108%define __os_install_post . ./os_install_post
109
110
111cat << EOF > %{_builddir}/%{name}-%{cpukit_rpmvers}/find-provides
112#!/bin/sh
113grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/powerpc-rtems4.9/(lib|include|sys-root)' \
114  | grep -v '^${RPM_BUILD_ROOT}%{cpukitlib}/powerpc-rtems4.9/' | %__find_provides
115EOF
116chmod +x %{_builddir}/%{name}-%{cpukit_rpmvers}/find-provides
117%define __find_provides %{_builddir}/%{name}-%{cpukit_rpmvers}/find-provides
118
119cat << EOF > %{_builddir}/%{name}-%{cpukit_rpmvers}/find-requires
120#!/bin/sh
121grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/powerpc-rtems4.9/(lib|include|sys-root)' \
122  | grep -v '^${RPM_BUILD_ROOT}%{cpukitlib}/powerpc-rtems4.9/' | %__find_requires
123EOF
124chmod +x %{_builddir}/%{name}-%{cpukit_rpmvers}/find-requires
125%define __find_requires %{_builddir}/%{name}-%{cpukit_rpmvers}/find-requires
126
127%clean
128  rm -rf $RPM_BUILD_ROOT
129
130%description -n rtems-4.9-powerpc-rtems4.9-cpukit
131GNU cc compiler for powerpc-rtems4.9.
132
133%files -n rtems-4.9-powerpc-rtems4.9-cpukit
134%dir %{_prefix}
135%{_prefix}/powerpc-rtems4.9
136# Violates the FHS
137%exclude %{_prefix}/make
Note: See TracBrowser for help on using the repository browser.