From 6f870f045b8ff72b1ba465fa9b9f5982305685e3 Mon Sep 17 00:00:00 2001 From: Sam Berning Date: Fri, 26 Jan 2024 00:58:56 +0000 Subject: [PATCH] packages: add aws settings extension package Signed-off-by: Sam Berning --- packages/settings-aws/Cargo.toml | 21 +++++++++++++ packages/settings-aws/settings-aws.spec | 39 +++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 packages/settings-aws/Cargo.toml create mode 100644 packages/settings-aws/settings-aws.spec diff --git a/packages/settings-aws/Cargo.toml b/packages/settings-aws/Cargo.toml new file mode 100644 index 00000000000..d2313575330 --- /dev/null +++ b/packages/settings-aws/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "settings-aws" +version = "0.1.0" +edition = "2021" +publish = false +build = "../build.rs" + +[lib] +path = "../packages.rs" + +[package.metadata.build-package] +source-groups = [ + "settings-extensions/aws" +] + +# RPM BuildRequires +[build-dependencies] +glibc = { path = "../glibc" } + +# RPM Requires +[dependencies] diff --git a/packages/settings-aws/settings-aws.spec b/packages/settings-aws/settings-aws.spec new file mode 100644 index 00000000000..d0224fffe00 --- /dev/null +++ b/packages/settings-aws/settings-aws.spec @@ -0,0 +1,39 @@ +%global _cross_first_party 1 +%undefine _debugsource_packages + +%global extension_name aws + +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}