From a9a77d055d39f622253e9a0e7e650684d530b71e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=91=BD=20mgsharm?= Date: Wed, 29 May 2024 18:20:44 -0400 Subject: [PATCH] packages: add cloudformation settings extension package --- packages/settings-cloudformation/Cargo.toml | 21 ++++++++++ .../settings-cloudformation.spec | 39 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 packages/settings-cloudformation/Cargo.toml create mode 100644 packages/settings-cloudformation/settings-cloudformation.spec diff --git a/packages/settings-cloudformation/Cargo.toml b/packages/settings-cloudformation/Cargo.toml new file mode 100644 index 00000000000..95ae8422ddc --- /dev/null +++ b/packages/settings-cloudformation/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "settings-cloudformation" +version = "0.1.0" +edition = "2021" +publish = false +build = "../build.rs" + +[lib] +path = "../packages.rs" + +[package.metadata.build-package] +source-groups = [ + "settings-extensions/cloudformation" +] + +# RPM BuildRequires +[build-dependencies] +glibc = { path = "../glibc" } + +# RPM Requires +[dependencies] diff --git a/packages/settings-cloudformation/settings-cloudformation.spec b/packages/settings-cloudformation/settings-cloudformation.spec new file mode 100644 index 00000000000..79b2d391480 --- /dev/null +++ b/packages/settings-cloudformation/settings-cloudformation.spec @@ -0,0 +1,39 @@ +%global _cross_first_party 1 +%undefine _debugsource_packages + +%global extension_name cloudformation + +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}