source: rtems-source-builder/rtems/config/tools/rtems-kernel-4-1.cfg @ aabe4e7

4.104.114.95
Last change on this file since aabe4e7 was aabe4e7, checked in by Chris Johns <chrisj@…>, on 03/21/13 at 11:52:10

Use ftp.rtems.org and not www.rtems.org.

  • Property mode set to 100644
File size: 2.7 KB
Line 
1#
2# RTEMS 4.xx Version 1.
3#
4# This configuration file configure's, make's and install's RTEMS.
5#
6
7%include %{_configdir}/checks.cfg
8
9Name:      %{_target}-kernel-%{rtems_kernel_version}-%{release}
10Summary:   RTEMS v%{rtems_kernel_version} for target %{_target} on host %{_host}
11Version:   %{rtems_kernel_version}
12Release:   %{release}
13URL:       http://www..rtems.org/
14BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
15
16#
17# Source
18#
19%ifn %{defined Source0}
20 Source0: http://ftp.rtems.org/ftp/pub/rtems/%{rtems_kernel_version}/rtems-%{rtems_kernel_version}.tar.bz2
21%endif
22
23#
24# Default set up.
25#
26%ifn %{defined rtems_posix}
27 %define rtems_posix 1
28%endif
29%ifn %{defined rtems_networking}
30 %define rtems_networking 1
31%endif
32%ifn %{defined rtems_cxx}
33 %define rtems_cxx 1
34%endif
35%ifn %{defined rtems_tests}
36 %define rtems_tests samples
37%endif
38
39%if %{rtems_tests} == disable
40 %define rtems_tests_opt --disable-tests
41%else
42 %define rtems_tests_opt --enable-tests=%{rtems_tests}
43%endif
44
45#
46# Prepare the source code.
47#
48%prep
49  %setup -q -c -n %{name}-%{version}
50  cd rtems-%{rtems_kernel_version}
51  %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
52  %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
53  %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
54  %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
55  %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
56  %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
57  %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
58  %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
59  %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
60  %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
61  cd ..
62
63%build
64  export PATH="%{_bindir}:${PATH}"
65  mkdir -p build
66  cd build
67  %{?host_force_32bit:HOST_FORCE_32BIT="-m32"}
68%if "%{_build}" != "%{_host}"
69  CFLAGS_FOR_BUILD="-g -O2 -Wall ${HOST_FORCE_32BIT}" \
70%endif
71  CFLAGS="$SB_OPT_FLAGS" \
72  ../rtems-%{rtems_kernel_version}/configure \
73    --build=%{_build} --host=%{_host} \
74    --target=%{_target} \
75    %{?rtems_posix:--enable-posix}%{!?rtems_posix:--disable-posix} \
76    %{?rtems_networking:--enable-networking}%{!?rtems_networking:--disable-networking} \
77    %{?rtems_cxx:--enable-cxx}%{!?rtems_cxx:--disable-cxx} \
78    %{rtems_tests_opt} \
79    --target=%{_target} \
80    --prefix=%{_prefix} --bindir=%{_bindir} \
81    --exec-prefix=%{_exec_prefix} \
82    --includedir=%{_includedir} --libdir=%{_libdir} \
83    --mandir=%{_mandir} --infodir=%{_infodir}
84
85  %{__make} %{?_smp_mflags} all
86  cd ..
87
88%install
89  export PATH="%{_bindir}:${PATH}"
90  rm -rf $SB_BUILD_ROOT
91
92  cd build
93  %{__make} DESTDIR=$SB_BUILD_ROOT install
94
95  cd ..
Note: See TracBrowser for help on using the repository browser.