diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..5c10a86 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Gergő Sályi +# shellcheck shell=bash disable=SC2034,SC2154 +pkgname=multibg-wayland +pkgver=0.2.0 +pkgrel=1 +pkgdesc='Set a different wallpaper for the background of each Sway or Hyprland or niri workspace' +arch=('x86_64' 'i686' 'pentium4' 'armv7h' 'aarch64') +url="https://github.com/gergo-salyi/multibg-wayland" +# Direct source files are MIT OR Apache-2.0 but have GPL-3.0-or-later dependencies +license=('GPL-3.0-or-later') +depends=('dav1d>=1.3.0' 'gcc-libs' 'glibc') +makedepends=('cargo') +optdepends=( + 'hyprland: supported window manager to set the wallpapers with' + 'niri: supported window manager to set the wallpapers with' + 'sway: supported window manager to set the wallpapers with' + 'vulkan-driver: upload and serve wallpapers from GPU memory' + 'vulkan-icd-loader: upload and serve wallpapers from GPU memory' +) +source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate") +sha256sums=('63f83cfe01d144c7b3bd1ef209c826cdc7669f51b64578f0e8a82133080a3ce8') + +prepare() { + cd "$pkgname-$pkgver" + export RUSTUP_TOOLCHAIN=stable + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" +} + +build() { + cd "$pkgname-$pkgver" + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo build --frozen --release --features avif +} + +package() { + cd "$pkgname-$pkgver" + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" + ln -rs "$pkgdir/usr/bin/$pkgname" "$pkgdir/usr/bin/multibg-sway" + install -Dm644 "README.md" "$pkgdir/usr/share/doc/${pkgname}/README.md" +} diff --git a/PKGBUILD.in b/PKGBUILD.in index 3073ed0..d816d76 100644 --- a/PKGBUILD.in +++ b/PKGBUILD.in @@ -3,7 +3,7 @@ pkgname=multibg-wayland pkgver=@pkgver@ pkgrel=1 -pkgdesc='Set a different wallpaper for the background of each Sway workspace' +pkgdesc='Set a different wallpaper for the background of each Sway or Hyprland or niri workspace' arch=('x86_64' 'i686' 'pentium4' 'armv7h' 'aarch64') url="https://github.com/gergo-salyi/multibg-wayland" # Direct source files are MIT OR Apache-2.0 but have GPL-3.0-or-later dependencies diff --git a/scripts/pkgbuild.sh b/scripts/pkgbuild.sh index 97cac16..3bdd33c 100755 --- a/scripts/pkgbuild.sh +++ b/scripts/pkgbuild.sh @@ -7,7 +7,7 @@ name = "multibg-wayland"' ]]; then exit 1 fi -version=$(cargo pkgid | cut -d '#' -f2) +version=$(cargo pkgid | cut -d '@' -f2) crate="target/package/multibg-wayland-$version.crate" sum=$(sha256sum "$crate" | cut -d ' ' -f1)