From 8942ba5f0177ab33b928f12b1fce09fda8a95adb Mon Sep 17 00:00:00 2001 From: "J." <105894089+Its-J@users.noreply.github.com> Date: Sat, 14 Dec 2024 19:07:44 -0600 Subject: [PATCH] package spotx-bash (#2629) (cherry picked from commit 0dbbb8f1a8879ace5d3bb59539002359d9216142) --- anda/tools/spotx-bash/anda.hcl | 8 ++++++ anda/tools/spotx-bash/spotx-bash.spec | 36 +++++++++++++++++++++++++++ anda/tools/spotx-bash/update.rhai | 5 ++++ 3 files changed, 49 insertions(+) create mode 100644 anda/tools/spotx-bash/anda.hcl create mode 100644 anda/tools/spotx-bash/spotx-bash.spec create mode 100644 anda/tools/spotx-bash/update.rhai diff --git a/anda/tools/spotx-bash/anda.hcl b/anda/tools/spotx-bash/anda.hcl new file mode 100644 index 000000000..82bb67736 --- /dev/null +++ b/anda/tools/spotx-bash/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "spotx-bash.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/tools/spotx-bash/spotx-bash.spec b/anda/tools/spotx-bash/spotx-bash.spec new file mode 100644 index 000000000..295fa82cc --- /dev/null +++ b/anda/tools/spotx-bash/spotx-bash.spec @@ -0,0 +1,36 @@ +%global commit 0143cd113cdec0f0516beba3afe46e42e69b8b1c +%global commit_date 20241119 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: spotx-bash +Version: %commit_date.git~%shortcommit +Release: 1%?dist +Summary: Adblock for the Spotify desktop client on Linux. +License: MIT +URL: https://github.com/SpotX-Official/SpotX-Bash +Source0: %url/archive/%commit.tar.gz +Requires: bash +BuildArch: noarch +Provides: spotx spotx-linux spot-x spotx.sh + +%description +%summary + +%prep +%autosetup -n SpotX-Bash-%commit + +%install +mkdir -p %{buildroot}%{_bindir} +install -Dm 755 spotx.sh %buildroot%{_bindir}/spotx + +%post +%{__ln_s} -f %{_bindir}/spotx %{_bindir}/spotx.sh + +%files +%doc README.md +%license LICENSE +%_bindir/spotx + +%changelog +* Sat Dec 14 2024 Its-J +- Package SpotX-Bash \ No newline at end of file diff --git a/anda/tools/spotx-bash/update.rhai b/anda/tools/spotx-bash/update.rhai new file mode 100644 index 000000000..3f7a8703c --- /dev/null +++ b/anda/tools/spotx-bash/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("SpotX-Official/SpotX-Bash")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +}