[RSB PATCH] rtems/net: Add net services build support

chrisj at rtems.org chrisj at rtems.org
Mon Jun 5 05:20:15 UTC 2023


From: Chris Johns <chrisj at rtems.org>

---
 rtems/config/net/net-services-1.cfg       | 23 ++++++
 rtems/config/net/net-services.bset        | 15 ++++
 rtems/config/tools/rtems-net-services.cfg | 91 +++++++++++++++++++++++
 3 files changed, 129 insertions(+)
 create mode 100644 rtems/config/net/net-services-1.cfg
 create mode 100644 rtems/config/net/net-services.bset
 create mode 100644 rtems/config/tools/rtems-net-services.cfg

diff --git a/rtems/config/net/net-services-1.cfg b/rtems/config/net/net-services-1.cfg
new file mode 100644
index 0000000..c342547
--- /dev/null
+++ b/rtems/config/net/net-services-1.cfg
@@ -0,0 +1,23 @@
+#
+# RTEMS Net Services
+#
+
+%if %{release} == %{nil}
+ %define release 1
+%endif
+
+#
+# Net Services Version
+#
+%define rtems_net_services_version e35f89b6bf8170b5556a90535ed2f1f6b7473d81
+%hash sha512 rtems-net-services-%{rtems_net_services_version}.tar.bz2 \
+       CqubUTOMm3zohNpOYft5QPTqhl9qEuBo3wcQ5tOTZGRwOMzwQ+3tRyl8ZrcgdTtoV7fIZCoJt5Ty5zTeANdMCQ==
+
+%define rtems_waf_version 68654b4f995382765605dc16917baad4bdbf7f7c
+%hash sha512 rtems-waf-%{rtems_waf_version}.tar.bz2 \
+       NAuyFxjfSiQd6VfYZl4fJClywPrLF2fN+GjXHjq3ddceqaBrSeHZ+XpYpU3XTnk2qKICsUSTLV+CskDuWdwqvQ==
+
+#
+# Net Services Build configuration
+#
+%include %{_configdir}/tools/rtems-net-services.cfg
diff --git a/rtems/config/net/net-services.bset b/rtems/config/net/net-services.bset
new file mode 100644
index 0000000..7d90399
--- /dev/null
+++ b/rtems/config/net/net-services.bset
@@ -0,0 +1,15 @@
+#
+# Build set for RTEMS Net Services
+#
+
+%define release 1
+
+#
+# The RTEMS Package defines
+#
+%include rtems-package.bset
+
+#
+# Build Net Services
+#
+net/net-services-1
diff --git a/rtems/config/tools/rtems-net-services.cfg b/rtems/config/tools/rtems-net-services.cfg
new file mode 100644
index 0000000..2acfbd8
--- /dev/null
+++ b/rtems/config/tools/rtems-net-services.cfg
@@ -0,0 +1,91 @@
+#
+# RTEMS Net Services
+#
+# This configuration file configure's, build's and install's
+# networking services libraries
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+Name:      rtems-net-services-%{rtems_net_services_version}-%{_host}-%{release}
+Summary:   RTEMS Net Services provides networking services for RTEMS networking
+           stacks.
+Version:   %{rtems_net_services_version}
+Release:   %{release}
+URL:       https://git.rtems.org/rtems-net-services.git/
+
+#
+# Net services is packaged as the release version when released.
+#
+%if %{rsb_released}
+ %define rtems_net_services_version %{rsb_version}
+ %define rtems_net_services_ext xz
+ %define rtems_waf_ext xz
+%else
+ %define rtems_net_services_ext bz2
+ %define rtems_waf_ext bz2
+%endif
+
+#
+# RTEMS BSP support.
+#
+%include rtems-bsp.cfg
+
+#
+# Net services Source.
+#
+#  If not a release collect and install rtems_waf as cgit snapshots to not
+#  capture submodules.
+#
+#  Releases package submodules in the top level tarfile.
+#
+%source set rtems_net_services --rsb-file=rtems-net-services-%{rtems_net_services_version}.tar.%{rtems_net_services_ext} \
+      https://git.rtems.org/rtems-net-services/snapshot/rtems-net-services-%{rtems_net_services_version}.tar.%{rtems_net_services_ext}
+%if !%{rsb_released}
+ %source set rtems_waf \
+      https://git.rtems.org/rtems_waf/snapshot/rtems_waf-%{rtems_waf_version}.tar.%{rtems_waf_ext}
+%endif
+
+#
+# Prepare the source code.
+#
+%prep
+  build_top=$(pwd)
+
+  source_dir_net_services="rtems-net-services-%{rtems_net_services_version}"
+  %source setup rtems_net_services -q -n rtems-net-services-%{rtems_net_services_version}
+  %if !%{rsb_released}
+   %source setup rtems_waf -q -s 1 -c -a -n rtems-net-services-%{rtems_net_services_version}/rtems_waf
+  %endif
+  cd ${build_top}
+
+#
+# Build the source code.
+#
+%build
+  build_top=$(pwd)
+
+  %{host_build_flags}
+
+  cd ${source_dir_net_services}
+
+  ./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_net_services}
+  ./waf --destdir=$SB_BUILD_ROOT%{rtems_waf_build_root_suffix} install
+  cd ${build_top}
-- 
2.37.1



More information about the devel mailing list