From 3fd7e0e22bf2eb567021717ff61bd588fa315428 Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Thu, 14 Nov 2024 19:39:45 +0200 Subject: [PATCH] fix: fedora spec non-default builds (#410) --- pkg/bin/generate_spec.sh | 15 +++++++++------ pkg/fedora-spec/lact-headless.spec | 12 ++++++------ pkg/fedora-spec/lact-libadwaita.spec | 12 ++++++------ pkg/fedora-spec/lact.spec | 2 +- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/pkg/bin/generate_spec.sh b/pkg/bin/generate_spec.sh index d876448d..f294a660 100755 --- a/pkg/bin/generate_spec.sh +++ b/pkg/bin/generate_spec.sh @@ -32,6 +32,9 @@ for RECIPE_PATH in "$RECIPES_DIR"/*/; do MAINTAINER=$(yq eval '.metadata.maintainer // "Unknown Maintainer"' "$RECIPE_FILE") SOURCE_URL="https://github.com/ilya-zlobintsev/LACT/archive/refs/tags/v${RECIPE_VERSION}.tar.gz" + MAKE_COMMAND_RAW=$(yq eval '.build.steps[0]' "$RECIPE_FILE" | grep -oP '(make.+)') + MAKE_COMMAND=${MAKE_COMMAND_RAW::-1} + # Collect Fedora-specific dependencies safely PKG_DEPENDS=$(yq eval '.metadata.depends | with_entries(select(.key | contains("fedora"))) | .[] | join(" ")' "$RECIPE_FILE" | xargs) PKG_BUILD_DEPENDS=$(yq eval '.metadata.build_depends | with_entries(select(.key | contains("fedora"))) | .[] | join(" ")' "$RECIPE_FILE" | xargs) @@ -76,7 +79,7 @@ $PKG_DESCRIPTION %setup -q -n LACT-%{version} %build -make %{?_smp_mflags} +$MAKE_COMMAND %{?_smp_mflags} %install rm -rf %{buildroot} @@ -86,11 +89,11 @@ make install PREFIX=/usr DESTDIR=%{buildroot} %defattr(-,root,root,-) %license LICENSE %doc README.md -/usr/bin/$RECIPE_NAME -/usr/lib/systemd/system/${RECIPE_NAME}d.service -/usr/share/applications/io.github.$RECIPE_NAME-linux.desktop -/usr/share/icons/hicolor/scalable/apps/io.github.$RECIPE_NAME-linux.svg -/usr/share/pixmaps/io.github.$RECIPE_NAME-linux.png +/usr/bin/lact +/usr/lib/systemd/system/lactd.service +/usr/share/applications/io.github.lact-linux.desktop +/usr/share/icons/hicolor/scalable/apps/io.github.lact-linux.svg +/usr/share/pixmaps/io.github.lact-linux.png %changelog * $(date +"%a %b %d %Y") - $MAINTAINER - $GH_RELEASE_NAME - $GH_RELEASE_TAG diff --git a/pkg/fedora-spec/lact-headless.spec b/pkg/fedora-spec/lact-headless.spec index e6f1677d..719d121c 100644 --- a/pkg/fedora-spec/lact-headless.spec +++ b/pkg/fedora-spec/lact-headless.spec @@ -17,7 +17,7 @@ AMDGPU control utility %setup -q -n LACT-%{version} %build -make %{?_smp_mflags} +make build-release-headless %{?_smp_mflags} %install rm -rf %{buildroot} @@ -27,11 +27,11 @@ make install PREFIX=/usr DESTDIR=%{buildroot} %defattr(-,root,root,-) %license LICENSE %doc README.md -/usr/bin/lact-headless -/usr/lib/systemd/system/lact-headlessd.service -/usr/share/applications/io.github.lact-headless-linux.desktop -/usr/share/icons/hicolor/scalable/apps/io.github.lact-headless-linux.svg -/usr/share/pixmaps/io.github.lact-headless-linux.png +/usr/bin/lact +/usr/lib/systemd/system/lactd.service +/usr/share/applications/io.github.lact-linux.desktop +/usr/share/icons/hicolor/scalable/apps/io.github.lact-linux.svg +/usr/share/pixmaps/io.github.lact-linux.png %changelog * Thu Nov 14 2024 - ilya-zlobintsev - - diff --git a/pkg/fedora-spec/lact-libadwaita.spec b/pkg/fedora-spec/lact-libadwaita.spec index 245440af..77514f6f 100644 --- a/pkg/fedora-spec/lact-libadwaita.spec +++ b/pkg/fedora-spec/lact-libadwaita.spec @@ -17,7 +17,7 @@ AMDGPU control utility %setup -q -n LACT-%{version} %build -make %{?_smp_mflags} +make build-release-libadwaita %{?_smp_mflags} %install rm -rf %{buildroot} @@ -27,11 +27,11 @@ make install PREFIX=/usr DESTDIR=%{buildroot} %defattr(-,root,root,-) %license LICENSE %doc README.md -/usr/bin/lact-libadwaita -/usr/lib/systemd/system/lact-libadwaitad.service -/usr/share/applications/io.github.lact-libadwaita-linux.desktop -/usr/share/icons/hicolor/scalable/apps/io.github.lact-libadwaita-linux.svg -/usr/share/pixmaps/io.github.lact-libadwaita-linux.png +/usr/bin/lact +/usr/lib/systemd/system/lactd.service +/usr/share/applications/io.github.lact-linux.desktop +/usr/share/icons/hicolor/scalable/apps/io.github.lact-linux.svg +/usr/share/pixmaps/io.github.lact-linux.png %changelog * Thu Nov 14 2024 - ilya-zlobintsev - - diff --git a/pkg/fedora-spec/lact.spec b/pkg/fedora-spec/lact.spec index 2eb1706c..32db54c5 100644 --- a/pkg/fedora-spec/lact.spec +++ b/pkg/fedora-spec/lact.spec @@ -17,7 +17,7 @@ AMDGPU control utility %setup -q -n LACT-%{version} %build -make %{?_smp_mflags} +make build-release %{?_smp_mflags} %install rm -rf %{buildroot}