Commit 54cc09caa7
Unsigned
Layout: unified · split
PKGBUILD +14 −11
| @@ -1,23 +1,26 @@ | |||
| 1 | # Maintainer: Wraient <rushikeshwastaken@gmail.com> | 1 | # Maintainer: Wraient <rushikeshwastaken@gmail.com> |
| 2 | pkgname='curd' | 2 | pkgname='curd' |
| 3 | pkgver=0.0.7 | 3 | pkgver=1.0.3 |
| 4 | pkgrel=1 | 4 | pkgrel=2 |
| 5 | pkgdesc="Watch anime in CLI with AniList Tracking, Discord RPC, Intro/Outro/Filler/Recap Skipping, etc." | 5 | pkgdesc="Watch anime in CLI with AniList Tracking, Discord RPC, Intro/Outro/Filler/Recap Skipping, etc." |
| 6 | arch=("x86_64") | 6 | arch=('x86_64') |
| 7 | url="https://github.com/Wraient/curd" | 7 | url="https://github.com/Wraient/curd" |
| 8 | license=('GPL') | 8 | license=('GPL') |
| 9 | depends=('mpv' 'rofi' 'ueberzugpp') | 9 | depends=('mpv' 'rofi' 'ueberzugpp') |
| 10 | source=("curd::https://github.com/Wraient/curd/releases/download/${pkgver}/curd") | 10 | source=("$pkgname::https://github.com/Wraient/curd/releases/latest/download/curd") |
| 11 | sha256sums=('SKIP') | 11 | sha256sums=('SKIP') |
| 12 | 12 | ||
| 13 | pkgver() { | ||
| 14 | # Fetch the latest release tag from GitHub and set it as pkgver | ||
| 15 | local latest_release | ||
| 16 | latest_release=$(curl -s https://api.github.com/repos/Wraient/curd/releases/latest | grep -Po '"tag_name": "\K.*?(?=")') | ||
| 17 | echo "$latest_release" | ||
| 18 | } | ||
| 19 | |||
| 20 | package() { | 13 | package() { |
| 21 | # Install the precompiled binary into /usr/bin | 14 | # Install the precompiled binary into /usr/bin |
| 22 | install -Dm755 "$srcdir/curd" "$pkgdir/usr/bin/curd" | 15 | install -Dm755 "$srcdir/curd" "$pkgdir/usr/bin/curd" |
| 23 | } | 16 | } |
| 17 | |||
| 18 | pkgver() { | ||
| 19 | local ver | ||
| 20 | ver=$(curl -s --fail "https://api.github.com/repos/Wraient/curd/releases/latest" | jq -r '.tag_name' | sed 's/^v//') | ||
| 21 | if [ -n "$ver" ]; then | ||
| 22 | echo "$ver" | ||
| 23 | else | ||
| 24 | echo "$pkgver" | ||
| 25 | fi | ||
| 26 | } | ||