summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorShulhan2018-09-08 19:08:31 +0700
committerShulhan2018-09-08 19:08:31 +0700
commite9690fd7ea4fff3f311d92ae12ea797ec9cc7bcf (patch)
tree3510b3b18caf53c6308d5677c0b5a4ffe19c552f
parent557c4d6569fe14bd8f9873292df0df2aac05e820 (diff)
downloadaur-e9690fd7ea4fff3f311d92ae12ea797ec9cc7bcf.tar.gz
Release candidate #1 for v2.0.0
Rewrite rescached from "C with class" to Go
-rw-r--r--PKGBUILD38
-rw-r--r--rescached-git.install16
2 files changed, 18 insertions, 36 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f4590d208fb..e557f938bca 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,23 @@
-# Maintainer: sulhan <ms@kilabit.info>
+# Maintainer: shulhan <ms@kilabit.info>
pkgname=rescached-git
-pkgver=1.7.0.r6.gddf766f
+pkgver=2.0.0rc1.64.d7a4ca4
+_pkgver=2.0.0rc1
pkgrel=1
pkgdesc="Resolver/DNS cache daemon"
arch=('i686' 'x86_64' 'armv7h')
-url="https://github.com/shuLhan/rescached"
+url="https://github.com/shuLhan/rescached-go"
license=('custom:BSD')
-depends=('gcc-libs')
+depends=('bash')
provides=('rescached')
-conflicts=('bind' 'nsd' 'pdnsd' 'powerdns' 'unbound')
+conflicts=('bind' 'nsd' 'pdnsd' 'powerdns' 'unbound' 'dnsmasq')
-makedepends=('gcc' 'make' 'fakeroot' 'git')
+makedepends=('git' 'go-pie>=1.11' 'asciidoc')
source=(
- "$pkgname::git+https://github.com/shuLhan/rescached.git"
- "libvos::git+https://github.com/shuLhan/libvos.git"
+ "$pkgname::git+https://github.com/shuLhan/rescached-go.git"
)
sha1sums=(
'SKIP'
- 'SKIP'
)
install=rescached-git.install
@@ -29,32 +28,23 @@ backup=(
pkgver() {
cd "$pkgname"
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
-}
-
-prepare() {
- cd "$pkgname"
- git submodule init
- git config submodule.libvos.url $srcdir/libvos
- git submodule update
- cd "src"
+ printf "%s.%s.%s" "$_pkgver" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
- cd "$pkgname/src"
+ cd "$pkgname"
echo ">>"
echo ">> cleaning ..."
echo ">>"
- make distclean
+ make clean
echo ">>"
echo ">> make ..."
echo ">>"
- unset CXXFLAGS
make || return 1
}
package() {
- cd "$pkgname/src"
- make DESTDIR="$pkgdir/" install
- install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ cd "$pkgname"
+ make PREFIX="$pkgdir" install
+ install -Dm644 $srcdir/$pkgname/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/rescached-git.install b/rescached-git.install
index e932c887799..e546834c822 100644
--- a/rescached-git.install
+++ b/rescached-git.install
@@ -1,14 +1,6 @@
post_upgrade() {
- ## Remove old ads file
- [[ -f /etc/rescached/hosts.ads ]] \
- && rm -f /etc/rescached/hosts.ads
-
- ## Fix wrong systemd service
- [[ -f /etc/systemd/system/rescached.service ]] \
- && rm -f /etc/systemd/system/rescached.service
-
- systemctl daemon-reload
-
- echo ':: rescached service now installed in /usr/lib/systemd/system'
- echo ':: Please reenable the service if you want to start it at boot'
+ ## Remove old config
+ [[ -f /etc/rescached/rescached.cfg ]] && rm -f /etc/rescached/rescached.cfg
+ ## Remove old cache
+ [[ -f /var/cache/rescached/rescached.vos ]] && rm -f /var/cache/rescached/rescached.vos
}