source: rtems/contrib/crossrpms/rtems4.9/avr/rtems-4.9-avr-rtems4.9-cpukit.spec @ 84f86cb

4.104.114.95
Last change on this file since 84f86cb was 2d9201a, checked in by Ralf Corsepius <ralf.corsepius@…>, on Sep 28, 2007 at 7:35:18 AM

Add rtems-4.9*.spec

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