diff options
author | Chris Johns <chrisj@rtems.org> | 2019-07-12 08:25:15 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2019-07-21 21:09:34 +1000 |
commit | 8db33fbe434267d385e637a14f38d444c72254fa (patch) | |
tree | 618a7fe3a19cf0181b54e2aafdd0063b29bf02a2 /rtems/config/tools/rtems-libbsd-common.cfg | |
parent | sb/config: Fix GDB probes when using python-config. (diff) | |
download | rtems-source-builder-8db33fbe434267d385e637a14f38d444c72254fa.tar.bz2 |
rtems: Add kernel, libbsd and BSP building as packages.
Diffstat (limited to 'rtems/config/tools/rtems-libbsd-common.cfg')
-rw-r--r-- | rtems/config/tools/rtems-libbsd-common.cfg | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/rtems/config/tools/rtems-libbsd-common.cfg b/rtems/config/tools/rtems-libbsd-common.cfg new file mode 100644 index 0000000..4503e1b --- /dev/null +++ b/rtems/config/tools/rtems-libbsd-common.cfg @@ -0,0 +1,79 @@ +# +# RTEMS LibBSD +# +# This configuration file configure's, build's and install's libbsd.a. +# + +%if %{release} == %{nil} +%define release 1 +%endif + +Name: rtems-libbsd-v%{rtems_libbsd_version}-%{_host}-%{release} +Summary: RTEMS LibBSD provides libbsd, a FreeBSD kernel set of + services for RTEMS. +Version: %{rtems_libbsd_version} +Release: %{release} +URL: https://git.rtems.org/rtems-libbsd.git/ + +# +# LibBSD is packaged as the release version when released. +# +%if %{rsb_released} + %define rtems_libbsd_version %{rsb_version} +%endif + +# +# RTEMS BSP support. +# +%include rtems-bsp.cfg + +# +# LibBSD Source. +# +# Collect and install rtems_waf as cgit snapshots to not caputre submodules, +# which is a good thing because we would collect the entire FreeBSD source + +# +%source set rtems_libbsd https://git.rtems.org/rtems-libbsd/snapshot/rtems-libbsd-%{rtems_libbsd_version}.tar.bz2 +%source set rtems_waf https://git.rtems.org/rtems_waf/snapshot/rtems_waf-%{rtems_waf_version}.tar.bz2 + +# +# Prepare the source code. +# +%prep + build_top=$(pwd) + + source_dir_libbsd="rtems-libbsd-%{rtems_libbsd_version}" + %source setup rtems_libbsd -q -n rtems-libbsd-%{rtems_libbsd_version} + %source setup rtems_waf -q -s 1 -c -a -n rtems-libbsd-%{rtems_libbsd_version}/rtems_waf + + cd ${build_top} + +# +# Build the source code. +# +%build + build_top=$(pwd) + + %{host_build_flags} + + cd ${source_dir_libbsd} + + ./waf distclean configure \ + --prefix=%{_prefix} \ + %{rtems_waf_tools} \ + %{rtems_waf_rtems} + --rtems-bsp=%{rtems_bsp_arch_bsp} + + ./waf build + + cd ${build_top} + +%install + build_top=$(pwd) + + %{__rmdir} ${SB_BUILD_ROOT} + + cd ${source_dir_libbsd} + ./waf --destdir=$SB_BUILD_ROOT%{rtems_waf_build_root_suffix} install + cd ${build_top} |