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

4.104.114.95
Last change on this file since 9a15c40 was 9a15c40, checked in by Chris Johns <chrisj@…>, on May 13, 2014 at 1:26:09 PM

sb: Implement %source and %patch to manage source and patches.

Remove the numbered source and patches and automatically manage
sources and patches. This removes the overhead in maintaining large
collections of patches.

  • Property mode set to 100644
File size: 2.5 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%source set rtems http://ftp.rtems.org/ftp/pub/rtems/%{rtems_kernel_version}/rtems-%{rtems_kernel_version}.tar.bz2
20
21#
22# If C++ defined for the tool set use it to control RTEMS's setting..
23#
24%if %{defined enable_cxx}
25 %define rtems_cxx %{enable_cxx}
26%endif
27
28#
29# Default set up.
30#
31%ifn %{defined rtems_posix}
32 %define rtems_posix 1
33%endif
34%ifn %{defined rtems_networking}
35 %define rtems_networking 1
36%endif
37%ifn %{defined rtems_cxx}
38 %define rtems_cxx 1
39%endif
40%ifn %{defined rtems_tests}
41 %define rtems_tests samples
42%endif
43
44%if %{rtems_tests} == disable
45 %define rtems_tests_opt --disable-tests
46%else
47 %define rtems_tests_opt --enable-tests=%{rtems_tests}
48%endif
49
50#
51# It the rtems_bsps is all undefine it
52#
53%if %{rtems_bsps} == all
54 %undefine rtems_bsps
55%endif
56
57#
58# Prepare the source code.
59#
60%prep
61  source_dir_rtems="rtems-%{rtems_kernel_version}"
62  %source setup rtems -q -c -n %{name}-%{version}
63  cd ${source_dir_rtems}
64  %patch setup rtems -p1
65%if %{rtems_bootstrap}
66  %if %{defined _internal_autotools_path}
67    export PATH="%{_internal_autotools_path}/bin:${PATH}"
68  %endif
69  ./bootstrap -c
70  %{_sbdir}/sb-bootstrap --preinstall
71  %{_sbdir}/sb-bootstrap
72%endif
73  cd ..
74
75%build
76  # Build directory support.
77  if test "%{_build}" != "%{_host}" ; then
78    build_dir="build-cxc"
79  else
80    build_dir="build"
81  fi
82  mkdir -p ${build_dir}
83  cd ${build_dir}
84
85  ../${source_dir_rtems}/configure \
86    --build=%{_build} --host=%{_host} \
87    --target=%{_target} \
88    %{?rtems_posix:--enable-posix}%{!?rtems_posix:--disable-posix} \
89    %{?rtems_networking:--enable-networking}%{!?rtems_networking:--disable-networking} \
90    %{?rtems_cxx:--enable-cxx}%{!?rtems_cxx:--disable-cxx} \
91    %{rtems_tests_opt} \
92    %{?rtems_bsps:--enable-rtemsbsp=%{rtems_bsps}} \
93    --prefix=%{_prefix} --bindir=%{_bindir} \
94    --exec-prefix=%{_exec_prefix} \
95    --includedir=%{_includedir} --libdir=%{_libdir} \
96    --mandir=%{_mandir} --infodir=%{_infodir}
97
98  %{__make} %{?_smp_mflags} all
99  cd ..
100
101%install
102  %{__rmdir} $SB_BUILD_ROOT
103
104  cd ${build_dir}
105  %{__make} DESTDIR=$SB_BUILD_ROOT install
106
107  cd ..
108
109%testing
Note: See TracBrowser for help on using the repository browser.