From 3eed51d8738674552f1ab3b2c3ce0720499046cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=91=BD=20mgsharm?= Date: Thu, 23 May 2024 18:02:42 -0400 Subject: [PATCH] packages: add ecs settings extension package --- packages/settings-ecs/Cargo.toml | 21 +++++++++++++ packages/settings-ecs/settings-ecs.spec | 39 +++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 packages/settings-ecs/Cargo.toml create mode 100644 packages/settings-ecs/settings-ecs.spec diff --git a/packages/settings-ecs/Cargo.toml b/packages/settings-ecs/Cargo.toml new file mode 100644 index 00000000000..cbfcc122375 --- /dev/null +++ b/packages/settings-ecs/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "settings-ecs" +version = "0.1.0" +edition = "2021" +publish = false +build = "../build.rs" + +[lib] +path = "../packages.rs" + +[package.metadata.build-package] +source-groups = [ + "settings-extensions/ecs" +] + +# RPM BuildRequires +[build-dependencies] +glibc = { path = "../glibc" } + +# RPM Requires +[dependencies] diff --git a/packages/settings-ecs/settings-ecs.spec b/packages/settings-ecs/settings-ecs.spec new file mode 100644 index 00000000000..b39357c5be0 --- /dev/null +++ b/packages/settings-ecs/settings-ecs.spec @@ -0,0 +1,39 @@ +%global _cross_first_party 1 +%undefine _debugsource_packages + +%global extension_name ecs + +Name: %{_cross_os}settings-%{extension_name} +Version: 0.0 +Release: 0%{?dist} +Summary: settings-%{extension_name} +License: Apache-2.0 OR MIT +URL: https://github.com/bottlerocket-os/bottlerocket + +BuildRequires: %{_cross_os}glibc-devel + +%description +%{summary}. + +%prep +%setup -T -c +%cargo_prep + +%build +%cargo_build --manifest-path %{_builddir}/sources/Cargo.toml \ + -p settings-extension-%{extension_name} + +%install +install -d %{buildroot}%{_cross_libexecdir} +install -p -m 0755 \ + ${HOME}/.cache/%{__cargo_target}/release/settings-extension-%{extension_name} \ + %{buildroot}%{_cross_libexecdir} + +install -d %{buildroot}%{_cross_libexecdir}/settings +ln -sf \ + ../settings-extension-%{extension_name} \ + %{buildroot}%{_cross_libexecdir}/settings/%{extension_name} + +%files +%{_cross_libexecdir}/settings-extension-%{extension_name} +%{_cross_libexecdir}/settings/%{extension_name}