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

4.104.114.9
Last change on this file since f077b2b was f077b2b, checked in by Chris Johns <chrisj@…>, on Apr 22, 2013 at 12:28:27 PM

Fixes for CVS to work. Add RTEMS build for sparc/sis.

  • Property mode set to 100644
File size: 2.8 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  source_dir_0="rtems-%{rtems_kernel_version}"
50  %setup -q -c -n %{name}-%{version}
51  cd ${source_dir_0}
52  %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
53  %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
54  %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
55  %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
56  %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
57  %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
58  %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
59  %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
60  %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
61  %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
62%if %{rtems_bootstrap}
63  ./bootstrap -c
64  ./bootstrap -p
65  ./bootstrap
66%endif
67  cd ..
68
69%build
70  # Build directory support.
71  if test "%{_build}" != "%{_host}" ; then
72    build_dir="build-cxc"
73  else
74    build_dir="build"
75  fi
76  mkdir -p ${build_dir}
77  cd ${build_dir}
78
79  ../${source_dir_0}/configure \
80    --build=%{_build} --host=%{_host} \
81    --target=%{_target} \
82    %{?rtems_posix:--enable-posix}%{!?rtems_posix:--disable-posix} \
83    %{?rtems_networking:--enable-networking}%{!?rtems_networking:--disable-networking} \
84    %{?rtems_cxx:--enable-cxx}%{!?rtems_cxx:--disable-cxx} \
85    %{rtems_tests_opt} \
86    %{?rtems_bsps:--enable-rtemsbsp=%{rtems_bsps}} \
87    --target=%{_target} \
88    --prefix=%{_prefix} --bindir=%{_bindir} \
89    --exec-prefix=%{_exec_prefix} \
90    --includedir=%{_includedir} --libdir=%{_libdir} \
91    --mandir=%{_mandir} --infodir=%{_infodir}
92
93  %{__make} %{?_smp_mflags} all
94  cd ..
95
96%install
97  %{__rmdir} $SB_BUILD_ROOT
98
99  cd ${build_dir}
100  %{__make} DESTDIR=$SB_BUILD_ROOT install
101
102  cd ..
103
104%testing
Note: See TracBrowser for help on using the repository browser.