Skip to content

Commit

Permalink
PKGBUILD: use binary release
Browse files Browse the repository at this point in the history
  • Loading branch information
sullyj3 committed Jul 26, 2024
1 parent 2867faa commit 0e28af3
Showing 1 changed file with 20 additions and 30 deletions.
50 changes: 20 additions & 30 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,41 +1,31 @@
# Maintainer: James Sully <[email protected]>

# this PKGBUILD is WIP

# Maintainer: Your Name <[email protected]>
pkgname=sand
pkgver=108ace95506895d5f2f9b90e788b4b68544f5e56
pkgver=0.1.0
pkgrel=1
pkgdesc="Countdown timer with CLI client and daemon"
pkgdesc="A brief description of your sand program"
arch=('x86_64')
url="https://github.com/sullyj3/sand"
license=('MIT')
depends=('systemd' 'libnotify')
makedepends=('git')
source=("git+https://github.com/sullyj3/sand.git")
sha256sums=('SKIP')

pkgver() {
cd "$srcdir/$pkgname"
# TODO better version
git rev-parse HEAD
}

build() {
cd "$srcdir/$pkgname"

# TODO: I think there's currently no way to specify this
# as a makedepend. We'll need to pre-build the executables
# on github actions.
lake build
}
source=("$url/releases/download/v$pkgver/$pkgname-v$pkgver-x86_linux.tar.zst")
sha256sums=('2cfb85474a6b5debf8d279ce8336b46ed8b7452ed02b67417e1e6e566a7ab44f')

package() {
cd "$srcdir/$pkgname"
cd "${srcdir}/release"

# Install the binary
install -Dm755 sand "${pkgdir}/usr/bin/sand"

# Install documentation
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"

# Install license
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

# Install both sand and sandd to /usr/bin
install -Dm755 .lake/build/bin/sand "$pkgdir/usr/bin/sand"
# Install systemd user services
install -Dm644 resources/systemd/sand.socket "${pkgdir}/usr/lib/systemd/user/sand.socket"
install -Dm644 resources/systemd/sand.service "${pkgdir}/usr/lib/systemd/user/sand.service"

# Install systemd user units
install -Dm644 resources/systemd/sand.service "$pkgdir/usr/lib/systemd/user/sand.service"
install -Dm644 resources/systemd/sand.socket "$pkgdir/usr/lib/systemd/user/sand.socket"
# Install additional resources
install -Dm644 resources/timer_sound.opus "${pkgdir}/usr/share/${pkgname}/timer_sound.opus"
}

0 comments on commit 0e28af3

Please sign in to comment.