pacotes.eletrotupi.com

ref: master

pkgs/antispam-api/APKBUILD


# Maintainer: Pedro Lucas Porcellis 
pkgname=antispam-api
pkgver=0_git20220503
_commit=cb63e0104ac171fd9fed9ca172610d409b4aaa7f
pkgrel=2
pkgdesc="A simple API to potentially identify spammy domains/usernames"
options="!check" # No testsuite
url="https://git.sr.ht/~porcellis/antispam-api"
arch="all"
license="MIT"
subpackages="$pkgname-openrc"
makedepends="go git"
install="$pkgname.pre-install"
source="
	$pkgname-$pkgver.tar.gz::https://git.sr.ht/~porcellis/antispam-api/archive/$_commit.tar.gz
	$pkgname.initd
	$pkgname.confd
"
builddir="$srcdir/$pkgname-$_commit"

build() {
	go mod vendor
	go build \
		-o $pkgname \
		-trimpath \
		-mod=vendor \
		-ldflags "-extldflags $LDFLAGS"
}

check() {
	go test ./...
}

package() {
	install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}
sha512sums="
b64c286dbfd9480ac945c2ebe170099b35eff6cfbe8c90371ab9c58ba566bf9b5df593672eb446a1ac1bc77fee31b997bdb96ff60f8f2799d93fee8cb94803f7  antispam-api-0_git20220503.tar.gz
4ea3b469e50d3899d1e5d57e2fd7582ab4606a5f92044cb854635f318d68d4c40d62a3f17941f6b04aab4c6b3ca90285a8864c769637534cfb61afee3b3aba15  antispam-api.initd
0f5a9f2976d07013087b74abb4157295653af3b29b1845263a343d2141a77351dc60316516a3afe338d350544476b2b275dd7c0ba963868890b350dbf8ff11a8  antispam-api.confd
"