summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorC. Dominik Bódi2024-04-15 18:30:45 +0200
committerC. Dominik Bódi2024-04-15 18:30:45 +0200
commit6ee926ee8e0839705102abf463c6d6f17554f4ae (patch)
treeb1e702bb219fa07fbb9ea7d18a6895ada5cf883c /PKGBUILD
parent626b0ebf1a31d7abc662f6e21eeaf97507276f83 (diff)
downloadaur-dnscontrol.tar.gz
* update to PKGBUID to reflect current AUR packaging guidelines
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD27
1 files changed, 16 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 842d560552ad..594425bbd5ab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,31 +3,36 @@
pkgname=dnscontrol
pkgver=4.9.0
-pkgrel=1
+pkgrel=2
pkgdesc="Synchronize your DNS to multiple providers from a simple DSL"
arch=('x86_64' 'armv7h' 'aarch64')
url="https://stackexchange.github.io/${pkgname}/"
license=('MIT')
depends=('glibc')
-makedepends=('go-pie')
+makedepends=('go')
provides=("${pkgname}=${pkgver}")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/StackExchange/${pkgname}/archive/v${pkgver}.tar.gz")
sha512sums=('42dec7495e00595fb8d6ec174b45e87505a874a7f1ed286040a5ce0718cb9dee8b9a903f8c3f9f7c30a2e4e162a938b490667b397fe3ea6df79baa9df4036b58')
prepare(){
- mkdir -p gopath/src/github.com/StackExchange
- ln -rTsf $pkgname-$pkgver gopath/src/github.com/StackExchange/dnscontrol
+ cd "$pkgname-$pkgver"
+ mkdir -p build/
+# mkdir -p gopath/src/github.com/StackExchange
+# ln -rTsf $pkgname-$pkgver gopath/src/github.com/StackExchange/dnscontrol
}
build() {
- export GOPATH="${srcdir}/gopath"
- cd gopath/src/github.com/StackExchange/dnscontrol
-
- GO111MODULE=on go run build/build.go -os=linux
- go clean -modcache
+ cd "$pkgname-$pkgver"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o build
}
package() {
- install -Dm755 gopath/src/github.com/StackExchange/dnscontrol/${pkgname}-Linux "${pkgdir}/usr/bin/${pkgname}"
- install -Dm644 gopath/src/github.com/StackExchange/dnscontrol/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ cd "$pkgname-$pkgver"
+ install -Dm755 build/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}