source: rtems-source-builder/rtems/config/tools/rtems-libbsd-common.cfg @ f2a8973

Last change on this file since f2a8973 was f1a3c8c, checked in by Chris Johns <chrisj@…>, on 04/28/20 at 08:33:41

rtems-libbsd: Remove the v from the package name verision

  • Property mode set to 100644
File size: 2.0 KB
Line 
1#
2# RTEMS LibBSD
3#
4# This configuration file configure's, build's and install's libbsd.a.
5#
6
7%if %{release} == %{nil}
8%define release 1
9%endif
10
11Name:      rtems-libbsd-%{rtems_libbsd_version}-%{_host}-%{release}
12Summary:   RTEMS LibBSD provides libbsd, a FreeBSD kernel set of
13           services for RTEMS.
14Version:   %{rtems_libbsd_version}
15Release:   %{release}
16URL:       https://git.rtems.org/rtems-libbsd.git/
17
18#
19# LibBSD is packaged as the release version when released.
20#
21%if %{rsb_released}
22 %define rtems_libbsd_version %{rsb_version}
23 %define rtems_libbsd_ext xz
24%else
25 %define rtems_libbsd_ext bz2
26%endif
27
28#
29# RTEMS BSP support.
30#
31%include rtems-bsp.cfg
32
33#
34# LibBSD Source.
35#
36#  If not a release collect and install rtems_waf as cgit snapshots to not
37#  capture submodules, which is a good thing because we would collect the entire
38#  FreeBSD source.
39#
40#  Releases package submodules in the top level tarfile.
41#
42%source set rtems_libbsd \
43      https://git.rtems.org/rtems-libbsd/snapshot/rtems-libbsd-%{rtems_libbsd_version}.tar.%{rtems_libbsd_ext}
44%if !%{rsb_released}
45 %source set rtems_waf \
46       https://git.rtems.org/rtems_waf/snapshot/rtems_waf-%{rtems_waf_version}.tar.%{rtems_libbsd_ext}
47%endif
48
49#
50# Prepare the source code.
51#
52%prep
53  build_top=$(pwd)
54
55  source_dir_libbsd="rtems-libbsd-%{rtems_libbsd_version}"
56  %source setup rtems_libbsd -q -n rtems-libbsd-%{rtems_libbsd_version}
57  %if !%{rsb_released}
58   %source setup rtems_waf -q -s 1 -c -a -n rtems-libbsd-%{rtems_libbsd_version}/rtems_waf
59  %endif
60  cd ${build_top}
61
62#
63# Build the source code.
64#
65%build
66  build_top=$(pwd)
67
68  %{host_build_flags}
69
70  cd ${source_dir_libbsd}
71
72  ./waf distclean configure \
73    --prefix=%{_prefix} \
74    %{rtems_waf_tools} \
75    %{rtems_waf_rtems} \
76    --rtems-bsp=%{rtems_bsp_arch_bsp}
77
78  ./waf build
79
80  cd ${build_top}
81
82%install
83  build_top=$(pwd)
84
85  %{__rmdir} ${SB_BUILD_ROOT}
86
87  cd ${source_dir_libbsd}
88  ./waf --destdir=$SB_BUILD_ROOT%{rtems_waf_build_root_suffix} install
89  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.