source: rtems/contrib/crossrpms/rtems4.10/avr/rtems-4.10-avr-rtems4.10-cpukit.spec @ 3bf44c20

4.104.11
Last change on this file since 3bf44c20 was 6d3f0321, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jul 18, 2009 at 4:02:03 AM

Regenerate.

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