Skip to content

Commit

Permalink
add arch pkgbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
haileys committed Dec 29, 2023
1 parent 8ee86b9 commit b18bf28
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/arch/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pkg
src
*.tar.zst
37 changes: 37 additions & 0 deletions pkg/arch/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Maintainer: Hailey Somerville <[email protected]>
pkgname=bark-git
pkgdesc="Synchronised multicast audio streaming"
license=("AGPL3")
url="https://github.com/haileys/bark"
pkgver=r115.g0a555d4
pkgrel=1

pkgver() {
local number="$(git -C "$srcdir" rev-list --count HEAD)"
local commit="$(git -C "$srcdir" rev-parse --short=7 HEAD)"
echo "r${number}.g${commit}"
}

depends=(
"alsa-lib"
"gcc-libs"
"opus"
"speexdsp"
)
makedepends=("cargo")
arch=("x86_64")

prepare() {
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
export BARK_PKG_VERSION="$(pkgver)"
cargo build --frozen --release
}

package() {
install -Dm0755 -t "$pkgdir/usr/bin/" "$srcdir/target/release/bark"
}

0 comments on commit b18bf28

Please sign in to comment.