summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaichi Shinozaki2015-06-09 18:33:20 +0900
committerDaichi Shinozaki2015-06-09 18:33:20 +0900
commitd3acd70ee7c8c10ab0d234a742ec7d7f945c90da (patch)
treec5d19b0e5faf80c9f8cc7186d4a9498b6989392b
downloadaur-varnish-vmod-dbrw.tar.gz
Initial import
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD47
-rw-r--r--configure.ac.patch14
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..3ecb7944c90
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = varnish-vmod-dbrw
+ pkgdesc = Database-driven rewrites for Varnish Cache
+ pkgver = 2.0
+ pkgrel = 1
+ url = http://www.gnu.org.ua/software/vmod-dbrw/
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = varnish
+ makedepends = libtool
+ makedepends = pcre
+ depends = varnish
+ source = ftp://download.gnu.org.ua/pub/release/vmod-dbrw/vmod-dbrw-2.0.tar.gz
+ source = http://repo.varnish-cache.org/source/varnish-4.0.3.tar.gz
+ source = configure.ac.patch
+ md5sums = 1f7a3dfdf7d8ab3473f7c1b7b22b5564
+ md5sums = bf86f3630605c273b1bbadbbe518237a
+ md5sums = 3138ba8ffafc7d0295aa340c59003a40
+
+pkgname = varnish-vmod-dbrw
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..eeba59b66a7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Daichi Shinozaki <dsdseg@gmail.com>
+pkgname=varnish-vmod-dbrw
+_archpkgname=${pkgname#varnish-}
+pkgver=2.0
+_varnishver=$(pacman -Qi varnish|sed -n 's/^Version[ :]*\([0-9].*[0-9]\)-[0-9]$/\1/p')
+pkgrel=1
+pkgdesc="Database-driven rewrites for Varnish Cache"
+arch=('i686' 'x86_64')
+url=http://www.gnu.org.ua/software/vmod-dbrw/
+license=('GPL3')
+depends=('varnish')
+makedepends=('varnish' 'libtool' 'pcre')
+source=("ftp://download.gnu.org.ua/pub/release/$_archpkgname/$_archpkgname-$pkgver.tar.gz"
+# "ftp://download.gnu.org.ua/pub/release/$_archpkgname/$_archpkgname-$pkgver.tar.gz.sig"
+ "http://repo.varnish-cache.org/source/varnish-$_varnishver.tar.gz"
+ 'configure.ac.patch'
+
+ )
+md5sums=('1f7a3dfdf7d8ab3473f7c1b7b22b5564'
+# 'SKIP'
+ 'bf86f3630605c273b1bbadbbe518237a'
+ '3138ba8ffafc7d0295aa340c59003a40')
+
+build() {
+ cd "$srcdir/$_archpkgname-$pkgver"
+
+ # patch build files to support latest autotools
+ patch -p0 -i "$srcdir"/configure.ac.patch
+
+ autoreconf
+ ./configure VMODDIR=/usr/lib/varnish/vmods VARNISHSRC=`pwd`/../varnish-$_varnishver --prefix=/usr
+
+ make
+}
+
+check() {
+ cd "$srcdir/$_archpkgname-$pkgver"
+
+# varnishtest -D vmod_topbuild=`pwd` tests/*.vtc
+ make -k check
+}
+
+package() {
+ cd "$srcdir/$_archpkgname-$pkgver"
+
+ make DESTDIR="$pkgdir/" install
+}
diff --git a/configure.ac.patch b/configure.ac.patch
new file mode 100644
index 00000000000..396c202de8f
--- /dev/null
+++ b/configure.ac.patch
@@ -0,0 +1,14 @@
+--- configure.ac 2014-12-15 12:36:48.553141203 +0900
++++ configure.ac.orig 2014-12-15 12:35:44.471492464 +0900
+@@ -77,9 +77,9 @@
+ AM_CONDITIONAL([VARNISH4],[test $VARNISHVERSION -eq 4])
+
+ # Check that varnishtest is built in the varnish source directory
++AC_CHECK_FILE([/usr/bin/varnishtest],
+-AC_CHECK_FILE([$VARNISHSRC/bin/varnishtest/varnishtest],
+ [],
++ [AC_MSG_FAILURE([cannot find "/usr/bin/varnishtest". Please build your varnish source directory])]
+- [AC_MSG_FAILURE([cannot find "$VARNISHSRC/bin/varnishtest/varnishtest". Please build your varnish source directory])]
+ )
+
+ # vmod installation dir