1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 11:45:18 +03:00
aports/testing/swhkd/APKBUILD
psykose 39f6fef713 */*: cargo fetch with --target
this does not download deps that won't be used for the default build
target (the ctarget we are building for implicitly).
this makes quite a few fetches faster.. because a ton of crates download
a 10mb "windows-sys" that is never used, amongst other things.

maybe breaks a thing or two.
2023-02-11 16:56:41 +01:00

59 lines
1.4 KiB
Text

# Maintainer: psykose <alice@ayaya.dev>
pkgname=swhkd
pkgver=1.2.1
pkgrel=0
pkgdesc="Sxhkd clone for Wayland"
url="https://github.com/waycrate/swhkd"
# s390x: fails to build due to libc crate
arch="all !s390x"
license="BSD-2-Clause"
# requires pkexec
depends="polkit"
makedepends="cargo scdoc"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/waycrate/swhkd/archive/refs/tags/$pkgver.tar.gz
lock.patch
"
case "$CARCH" in
riscv64)
options="$options textrels"
;;
esac
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo build --release --frozen --bins
mkdir -p man/man5
mkdir -p man/man1
scdoc < ./docs/swhkd.1.scd > man/man1/swhkd.1
scdoc < ./docs/swhkd.5.scd > man/man5/swhkd.5
scdoc < ./docs/swhkd-keys.5.scd > man/man5/swhkd-keys.5
scdoc < ./docs/swhks.1.scd > man/man1/swhks.1
}
check() {
cargo test --frozen
}
package() {
install -Dm755 target/release/swhkd target/release/swhks \
-t "$pkgdir"/usr/bin/
install -Dm644 com.github.swhkd.pkexec.policy \
-t "$pkgdir"/usr/share/polkit-1/actions/
cp -a man "$pkgdir"/usr/share/man
}
sha512sums="
2c67c2a818a605312eef19cdb7444c5d10a5d06abb3c7df4236a6b70a4917a0da3d7bdfe05cfbb8c95123b3321d91edc72d50cd3af5a59459a40c9e5cfb0f027 swhkd-1.2.1.tar.gz
2fad72df67c831119ef630b5f1fb9fd5a90b22af115c11196117dd1774cc47e64c8eb10f48c0d64c6105459def32c2907c07ff96b31670997a085f97e9b8b9af lock.patch
"