aports/testing/crab-hole/APKBUILD
2025-03-16 22:11:56 +00:00

48 lines
1.5 KiB
Text

maintainer="Dominic <git@msrd0.de>"
pkgname=crab-hole
pkgver=0.1.12
pkgrel=0
pkgdesc="A DNS level ad and spy blocker"
url="https://github.com/LuckyTurtleDev/crab-hole"
# other archs: missing ring support
arch="x86_64 aarch64 x86 armhf armv7"
license="AGPL-3.0-or-later"
makedepends="cargo cargo-auditable"
subpackages="$pkgname-openrc"
source="https://github.com/LuckyTurtleDev/crab-hole/archive/refs/tags/v$pkgver/crab-hole-$pkgver.tar.gz
$pkgname.initd
$pkgname.confd
"
install="$pkgname.pre-install"
# net: needed for downloading dependencies
options="net"
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo auditable build --target="$CTARGET" --release --frozen
}
check() {
cargo test --release --frozen
}
package() {
install -Dm755 target/$CTARGET/release/$pkgname -t "$pkgdir"/usr/bin/
install -Dm644 example-config.toml "$pkgdir"/etc/$pkgname.toml
install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}
sha512sums="
d00f1bf82baaa0158d7dbc01ce1b015781ab64f1702d088f11a579204663dedfe1a21f76a0e4f7bbbf514c5c7acc9fb635d8935cec3378777ff2e0525f31cfc3 crab-hole-0.1.12.tar.gz
1ec93e6cdf09599ae1b0eca89ed9d6eef5e7b0dc328598151e20211df17aaec790ef0f30d424a5b032ed8a1aec4a073b68f0e6921aa29f1901fc2487e6568586 crab-hole.initd
1ca2464264d938f880460a27dc92325a30fa35c26461bf69dba2f17849b2d6450ba3bec704ead19148daf06f882c2d60f99dc8f970d0229e62040b793aca9517 crab-hole.confd
"