Skip to content

Commit

Permalink
packages: add metrics settings extension package
Browse files Browse the repository at this point in the history
  • Loading branch information
sumukhballal committed May 21, 2024
1 parent e644685 commit 10f4df0
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/settings-metrics/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "settings-metrics"
version = "0.1.0"
edition = "2021"
publish = false
build = "../build.rs"

[lib]
path = "../packages.rs"

[package.metadata.build-package]
source-groups = [
"settings-extensions/metrics"
]

# RPM BuildRequires
[build-dependencies]
glibc = { path = "../glibc" }

# RPM Requires
[dependencies]

39 changes: 39 additions & 0 deletions packages/settings-metrics/settings-metrics.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
%global _cross_first_party 1
%undefine _debugsource_packages

%global extension_name metrics

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}

0 comments on commit 10f4df0

Please sign in to comment.