From c8686b1e149b6c42db019c77caf36475aafadd03 Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Wed, 31 Aug 2022 01:51:12 +0200 Subject: [PATCH] Initial commit --- .SRCINFO | 22 ++++++++++++++++++++++ PKGBUILD | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..f0bec48 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = awl-dns-git + pkgdesc = A DNS client + pkgver = 0.2.0.r35.g61ddbb3 + pkgrel = 1 + url = https://git.froth.zone/sam/awl + arch = i686 + arch = pentium4 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h + arch = aarch64 + license = BSD + makedepends = git + makedepends = go>=1.18 + makedepends = scdoc + provides = awl-dns + conflicts = awl-dns + source = awl-dns-git::git+https://git.froth.zone/sam/awl.git + sha256sums = SKIP + +pkgname = awl-dns-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..2a9ff55 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Sam Therapy +pkgname=awl-dns-git +pkgver=0.2.0.r35.g61ddbb3 +pkgrel=1 +arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') +pkgdesc="A DNS client" +url="https://git.froth.zone/sam/awl" +license=('BSD') +makedepends=( + 'git' + 'go>=1.18' + 'scdoc' +) +provides=("${pkgname%-*}") +conflicts=("${pkgname%-*}") +source=("${pkgname}::git+https://git.froth.zone/sam/awl.git") +sha256sums=('SKIP') + + +pkgver() { + cd "$srcdir/$pkgname" + printf "%s" "$(git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g')" +} + +build() { + cd "$srcdir/$pkgname" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -ldflags=-X=main.version=${pkgver} -mod=readonly -modcacherw" + export CGO_ENABLED=1 + + make VERSION=$pkgver DESTDIR="$pkgdir" PREFIX="/usr" +} + +package() { + cd "$srcdir/$pkgname" + make VERSION=$pkgver DESTDIR="$pkgdir" PREFIX="/usr" install + install -Dm644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +}