: nply/foundationpkgs

commit 0fea439e434b278805ab3aaaa8fd4c39fc5a3ff3
parent 2d50b2cd856a8c9163b574afc21167998b8a1155
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Thu, 29 Oct 2026 20:30:33 +0530

Package minimal-fxa-server and account management CLI
1 file changed, 40 insertions(+), 0 deletions(-)
A
Unix/minimal-fxa-server/APKBUILD
|
40
++++++++++++++++++++++++++++++++++++++++
diff --git a/Unix/minimal-fxa-server/APKBUILD b/Unix/minimal-fxa-server/APKBUILD
@@ -0,0 +1,40 @@
+pkgname=minimal-fxa-server
+pkgver=0_git20260225
+pkgrel=0
+pkgdesc="Minimal Firefox Accounts server and local user management CLI"
+url="https://github.com/ahyattdev/minimal-fxa-server"
+arch="all"
+license="MIT"
+makedepends="go"
+_commit=8ec5f0d160269f5079431d2b75574337f0552940
+source="$url/archive/$_commit.tar.gz"
+sha256sums="
+d336c2d13f58b915dca33a3cd20a9d44239d800fa02b38a19b1ee7fd5efbc08a  $_commit.tar.gz
+"
+builddir="$srcdir/$pkgname-$_commit"
+
+build() {
+	# Native CI builds only; do not label host Go binaries as a cross target.
+	if cross_compiling; then
+		echo "$pkgname: cross compilation is not supported" >&2
+		return 1
+	fi
+	cd "$builddir"
+	CGO_ENABLED=0 go build -mod=readonly -trimpath -ldflags="-s -w" -o minimal-fxa-server .
+	CGO_ENABLED=0 go build -mod=readonly -trimpath -ldflags="-s -w" -o fxa-user ./cmd/fxa-user
+	# The repository builder does not run check() separately.
+	check
+}
+
+check() {
+	cd "$builddir"
+	CGO_ENABLED=0 go test -mod=readonly ./...
+	./fxa-user --help
+}
+
+package() {
+	cd "$builddir"
+	mkdir -p "$pkgdir/usr/bin" "$pkgdir/usr/share/licenses/$pkgname"
+	install -m755 minimal-fxa-server fxa-user "$pkgdir/usr/bin/"
+	install -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}