alpine-repos/anubis/APKBUILD

48 lines
1.3 KiB
Plaintext
Executable File

maintainer="fossdd <fossdd@pwned.life>"
pkgname=anubis
pkgver=1.17.1
pkgrel=0
pkgdesc="Block AI scrapers using a sha256 proof-of-work challenge"
url="https://github.com/TecharoHQ/anubis"
arch="all"
license="MIT"
makedepends="go npm bash zstd brotli"
pkgusers="anubis"
pkggroups="anubis"
install="$pkgname.pre-install"
subpackages="$pkgname-doc
$pkgname-openrc
"
source="$pkgname-$pkgver.tar.gz::https://github.com/TecharoHQ/anubis/archive/refs/tags/v$pkgver.tar.gz
$pkgname.initd
"
options="net !check" # check: no test suite
# secfixes:
# 1.15.2-r0:
# - CVE-2025-24369
preparre() {
default_prepare
make deps
}
build() {
make assets
make prebaked-build
}
package() {
install -Dm755 var/anubis -t "$pkgdir"/usr/bin/
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
install -D -m 755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -d -m 644 "$pkgdir"/etc/$pkgname
install -d -m 755 -o $pkgusers -g $pkggroups "$pkgdir"/var/log/$pkgname
}
sha512sums="
3f1b2a1b5e9464647da8ddf998e7e32842ed67363d6b231061519b7e01639fe41d567e9218f737784954ed087c65f63d479e14b0521f6721118d893b357917be anubis-1.17.1.tar.gz
e4909951c183bd4a7ff932fca5591a0d9aebd7aa569384a6c807d3ef9cfc00df2e0d7c872a2fa7ddbcfd60ba49f35140236ccb8d4c756ae9f81800fad22fcb21 anubis.initd
"