Skip to content

Commit

Permalink
fix: fedora spec non-default builds (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-zlobintsev authored Nov 14, 2024
1 parent 7119b40 commit 3fd7e0e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
15 changes: 9 additions & 6 deletions pkg/bin/generate_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -76,7 +79,7 @@ $PKG_DESCRIPTION
%setup -q -n LACT-%{version}
%build
make %{?_smp_mflags}
$MAKE_COMMAND %{?_smp_mflags}
%install
rm -rf %{buildroot}
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions pkg/fedora-spec/lact-headless.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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 - -
Expand Down
12 changes: 6 additions & 6 deletions pkg/fedora-spec/lact-libadwaita.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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 - -
Expand Down
2 changes: 1 addition & 1 deletion pkg/fedora-spec/lact.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 3fd7e0e

Please sign in to comment.