summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2017-08-06 04:04:02 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2017-08-06 04:05:34 (GMT)
commite85dac41c9bacb8bcd56f56f55c282434ecd8c80 (patch) (side-by-side diff)
treed2773d976e219829032d42bf7715c5c1d1a24a97
parent72f4a1452469501b945aee79b97bbe456858f44d (diff)
downloadvmod-geoip-e85dac41c9bacb8bcd56f56f55c282434ecd8c80.tar.gz
vmod-geoip-e85dac41c9bacb8bcd56f56f55c282434ecd8c80.tar.bz2
Switch to newer acvmod
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile.am12
-rw-r--r--README31
m---------acvmod0
-rw-r--r--configure.ac2
-rw-r--r--git2chg.awk75
-rw-r--r--src/Makefile.am10
6 files changed, 27 insertions, 103 deletions
diff --git a/Makefile.am b/Makefile.am
index 85b60bc..1003263 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,14 +17,4 @@ ACLOCAL_AMFLAGS = -I m4 -I acvmod
SUBDIRS = src
-AM_DISTCHECK_CONFIGURE_FLAGS=--without-vmoddir
-
-EXTRA_DIST=git2chg.awk
-
-.PHONY: ChangeLog
-ChangeLog:
- $(AM_V_GEN)if test -d .git; then \
- git log --pretty='format:%ct %an <%ae>%n%n%s%n%n%b%n' | \
- awk -f $(top_srcdir)/git2chg.awk > ChangeLog; \
- fi
-
+include acvmod/top.am
diff --git a/README b/README
index 0e93197..7ebf976 100644
--- a/README
+++ b/README
@@ -11,28 +11,39 @@ files.
import geoip;
- if (geoip.country_code == "US") {
+ if (geoip.country_code(client.ip) == "US") {
...
}
* Installation
-In order to compile the package you need to have Varnish 4.1 source tree and
-libmaxminddb installed.
+In order to compile the package you need to have the varnishd and
+varnishapi packages installed.
-Supposing that the varnish source tree
-is available under /usr/src/varnish-4.1, run:
+Supposing that condition is met, run:
- ./configure --with-varnish-source=/usr/src/varnish-4.1
+ ./configure
+
+It should be able to automatically find the necessary components. In case
+it doesn't, tweak the configuration variables as necessary. The most
+important one is PKG_CONFIG_PATH, which contains a path (in the UNIX sense)
+where the .pc files are located. It should contain a directory where the
+'varnishapi.pc' file lives. Example usage:
+
+ ./configure PKG_CONFIG_PATH=/usr/local/varnish/lib/pkgconfig:$PKG_CONFIG_PATH
+
+Please read the file INSTALL for a detailed discussion of available variables
+and command line options.
Once configured, do
-
+
make
-This will build the module.
+This will build the module. After this step you can optionally run
+'make test' to test the package.
+
+Finally, run the following command as root:
-Finally, do the following command as root:
-
make install
* Documentation
diff --git a/acvmod b/acvmod
-Subproject f064cf4d7aa1ead1f8607b8b72baf883f015ffc
+Subproject ba32780019480b89cd9d796b93a76cae6afe99a
diff --git a/configure.ac b/configure.ac
index 3fa5640..6ed462f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with vmod-geoip. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.69)
-AC_INIT([vmod-geoip], 0.90, [gray@gnu.org])
+AC_INIT([vmod-geoip], 0.91, [gray@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/vmod_geoip.vcc)
diff --git a/git2chg.awk b/git2chg.awk
deleted file mode 100644
index 465b2ce..0000000
--- a/git2chg.awk
+++ b/dev/null
@@ -1,75 +0,0 @@
-# This file is part of grecs
-# Copyright (C) 2007-2017 Sergey Poznyakoff
-#
-# Grecs is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# Grecs is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Grecs. If not, see <http://www.gnu.org/licenses/>.
-
-BEGIN {
- if (since)
- split(since,since_a,"-")
-}
-
-function timeok(t, a) {
- if (!since)
- return 1
- split(t,a,"-")
- if (a[1] < since_a[1])
- return 0
- if (a[1] > since_a[1])
- return 1
- if (a[2] < since_a[2])
- return 0
- if (a[2] > since_a[2])
- return 1
- return a[3] > since_a[3]
-}
-
-/^[0-9]+ .* +<[^>]+>/ {
- s = strftime("%F", $1)
- if (!timeok(s))
- exit
- sub(/^[0-9]+ +/,"")
- if (s == datestr && author == $0)
- next
- datestr = s
- author = $0
- if (runlen) { runlen = 0; print "" }
- printf("%s %s\n", datestr, author)
- next
-}
-/^Signed-off-by:/ { next }
-/^<unknown>$/ { next }
-NF==0 {
- runlen++
- next
-}
-{ if (runlen) { runlen = 0; print "" }
- print "\t" $0 }
-
-END {
- if (append) {
- print ""
- while ((getline < append) > 0) {
- if (match($0, /^Local *Variables:/))
- break
- print
- }
- }
- print "\f"
- # Make sure Emacs won't recognize this line:
- print "Local", "Variables:"
- print "mode: change-log"
- print "version-control: never"
- print "buffer-read-only: t"
- print "End:"
-}
diff --git a/src/Makefile.am b/src/Makefile.am
index b08a26a..8a3c8ea 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,9 +15,7 @@
# along with vmod-geoip. If not, see <http://www.gnu.org/licenses/>.
AM_CPPFLAGS =\
- -I$(VARNISHSRC)/include\
- -I$(VARNISHSRC)/bin/varnishd\
- -I$(VARNISHSRC)\
+ $(VARNISHAPI_CFLAGS)\
@MMDB_CFLAGS@
vmoddir = $(VMODDIR)
@@ -35,12 +33,11 @@ vmod_geoip.lo: vcc_if.h
CLEANFILES = vcc_if.c vcc_if.h *.rst
-vmodtool = $(VARNISHSRC)/lib/libvcc/vmodtool.py
vmodtoolargs = --strict
vccfile = $(top_srcdir)/src/vmod_geoip.vcc
-vcc_if.c vcc_if.h: $(vmodtool) $(vccfile)
- $(AM_V_GEN)$(PYTHON) $(vmodtool) $(vmodtoolargs) $(vccfile)
+vcc_if.c vcc_if.h: $(vccfile)
+ $(AM_V_GEN)$(PYTHON) $(VARNISHAPI_VMODTOOL) $(vmodtoolargs) $(vccfile)
EXTRA_DIST = \
vmod_geoip.vcc\
@@ -52,3 +49,4 @@ dist_man_MANS=vmod_geoip.3
vmod_geoip.3: vmod_geoip.man.rst
@$(abs_top_srcdir)/build-aux/missing rst2man.py vmod_geoip.man.rst > vmod_geoip.3
+DISTCLEANFILES=vmod_geoip.3

Return to:

Send suggestions and report system problems to the System administrator.