summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorndoskrnl2020-11-05 09:06:37 +0800
committerndoskrnl2020-11-05 09:06:37 +0800
commit461183bd6776ca5005969171b43e553f1cf1cd74 (patch)
tree0bdd08892f57cd183f003877713aa573140f1523
parentceb1a242fab92c7a961dba236c7602d0b59b0095 (diff)
downloadaur-461183bd6776ca5005969171b43e553f1cf1cd74.tar.gz
Coredns-wgsd init
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD35
2 files changed, 27 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 104c543fd86..40de191c46f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,20 @@
-pkgbase = coredns
- pkgdesc = A DNS server that chains plugins
+pkgbase = coredns-wgsd-git
+ pkgdesc = A DNS server that chains plugins - with module wgsd
pkgver = 1.8.0
pkgrel = 1
- url = https://github.com/coredns/coredns
+ url = https://github.com/tobikris/wgsd
arch = i686
arch = x86_64
license = Apache
makedepends = go
- makedepends = make
provides = coredns
- conflicts = coredns-bin
- source = coredns-1.8.0.tar.gz::https://github.com/coredns/coredns/archive/v1.8.0.tar.gz
+ conflicts = coredns
+ source = wgsd::git+https://github.com/tobikris/wgsd.git#branch=serve-self
source = coredns.service
source = coredns-sysusers.conf
- sha256sums = 74bdfdd0bc314d2191159b6782f678989aa0cff1af993a1d384f62d1585070d8
+ sha256sums = SKIP
sha256sums = 030cd8e938c293c11a9acdb09b138f98b37874772072336792ec4bf0d9eff9b1
sha256sums = 536d03f8b20b0d2d6e8f96edd7e4e4dd7f6fef39ab0e952522d8725f3cc186b7
-pkgname = coredns
+pkgname = coredns-wgsd-git
diff --git a/PKGBUILD b/PKGBUILD
index 6f75f04f47c..703f6e3692c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,39 +1,44 @@
# Maintainer: Simon Legner <Simon.Legner@gmail.com>
-pkgname=coredns
-gopkgname='github.com/coredns/coredns'
+# Maintainer: Ndoskrnl <lollipop.studio.cn@gmail.com>
+pkgname=coredns-wgsd-git
+_pkgname='wgsd'
pkgver=1.8.0
pkgrel=1
-pkgdesc="A DNS server that chains plugins"
-makedepends=('go' 'make')
+pkgdesc="A DNS server that chains plugins - with module wgsd"
+makedepends=('go')
conflicts=('coredns-bin')
arch=('i686' 'x86_64')
-url="https://github.com/coredns/coredns"
+url="https://github.com/tobikris/wgsd"
license=('Apache')
provides=('coredns')
-source=(coredns-${pkgver}.tar.gz::https://github.com/coredns/${pkgname}/archive/v${pkgver}.tar.gz
+conflicts=('coredns')
+source=($_pkgname::git+https://github.com/tobikris/wgsd.git#branch=serve-self
coredns.service
coredns-sysusers.conf)
-sha256sums=('74bdfdd0bc314d2191159b6782f678989aa0cff1af993a1d384f62d1585070d8'
+sha256sums=('SKIP'
'030cd8e938c293c11a9acdb09b138f98b37874772072336792ec4bf0d9eff9b1'
'536d03f8b20b0d2d6e8f96edd7e4e4dd7f6fef39ab0e952522d8725f3cc186b7')
-prepare() {
- export GOPATH="$srcdir/build"
- rm -rf "$GOPATH/src/$gopkgname"
- mkdir --parents `dirname "$GOPATH/src/$gopkgname"`
- mv -Tv "$srcdir/$pkgname-${pkgver}" "$GOPATH/src/$gopkgname"
+pkgver() {
+ cd $srcdir/$_pkgname
+ cat go.mod | grep -o --color=never -P '(?<=coredns v)[.\d]+'
}
build() {
export GOPATH="$srcdir/build"
export PATH=$GOPATH/bin:$PATH
- cd $GOPATH/src/$gopkgname
- make GOPATH=$GOPATH coredns
+
+ cd $srcdir/$_pkgname/cmd/coredns
+ go build
+
+ cd $srcdir/$_pkgname/cmd/wgsd-client
+ go build
}
package() {
- install -Dm755 "$srcdir/build/src/$gopkgname/coredns" "$pkgdir/usr/bin/coredns"
+ install -Dm755 "$srcdir/$_pkgname/cmd/coredns/coredns" "$pkgdir/usr/bin/coredns"
+ install -Dm755 "$srcdir/$_pkgname/cmd/wgsd-client/wgsd-client" "$pkgdir/usr/bin/wgsd-client"
install -Dm644 "$srcdir/coredns.service" "$pkgdir/usr/lib/systemd/system/coredns.service"
install -Dm644 "$srcdir/coredns-sysusers.conf" "$pkgdir/usr/lib/sysusers.d/coredns.conf"
install -d "${pkgdir}/etc/coredns"