diff options
author | zi <zi@FreeBSD.org> | 2019-08-23 01:48:51 +0800 |
---|---|---|
committer | zi <zi@FreeBSD.org> | 2019-08-23 01:48:51 +0800 |
commit | 1c9cb6e619f26d9bb45b8b45f4c82da0424a2c85 (patch) | |
tree | 26dd9c6acb756035185406e97593c538ad18d92e | |
parent | f5dcbced87032a066099282b3287f1ed48345222 (diff) | |
download | freebsd-ports-gnome-1c9cb6e619f26d9bb45b8b45f4c82da0424a2c85.tar.gz freebsd-ports-gnome-1c9cb6e619f26d9bb45b8b45f4c82da0424a2c85.tar.zst freebsd-ports-gnome-1c9cb6e619f26d9bb45b8b45f4c82da0424a2c85.zip |
New port: varnish-libvmod-dynamic
This module provides a varnish director for dynamic creation of backends based
on calls to the system's network address resolution service which, in turn,
typically use information from the /etc/hosts file and the Domain Name Service
(DNS), but can be configured to use other sources like LDAP or more advanced
DNS resolution where getdns is available.
While standard varnish backends defined in VCL may also be defined in terms of
host names, changes of the name service information will only be picked up
with a VCL reload.
WWW: https://github.com/nigoroll/libvmod-dynamic
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/varnish-libvmod-dynamic/Makefile | 38 | ||||
-rw-r--r-- | www/varnish-libvmod-dynamic/distinfo | 3 | ||||
-rw-r--r-- | www/varnish-libvmod-dynamic/files/patch-src_dyn__resolver__getdns.c | 15 | ||||
-rw-r--r-- | www/varnish-libvmod-dynamic/pkg-descr | 11 | ||||
-rw-r--r-- | www/varnish-libvmod-dynamic/pkg-plist | 4 |
6 files changed, 72 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index ee3e8073f169..04e0aacb5345 100644 --- a/www/Makefile +++ b/www/Makefile @@ -2402,6 +2402,7 @@ SUBDIR += validator SUBDIR += varnish-libvmod-awsrest SUBDIR += varnish-libvmod-digest + SUBDIR += varnish-libvmod-dynamic SUBDIR += varnish-libvmod-maxminddb SUBDIR += varnish-modules SUBDIR += varnish-nagios diff --git a/www/varnish-libvmod-dynamic/Makefile b/www/varnish-libvmod-dynamic/Makefile new file mode 100644 index 000000000000..471181d8a915 --- /dev/null +++ b/www/varnish-libvmod-dynamic/Makefile @@ -0,0 +1,38 @@ +# $FreeBSD$ + +PORTNAME= libvmod-dynamic +PORTVERSION= 20190822 +CATEGORIES= www +PKGNAMEPREFIX= varnish- + +MAINTAINER= zi@FreeBSD.org +COMMENT= Varnish Module (vmod) for dynamic backends + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libgetdns.so:dns/getdns +BUILD_DEPENDS= rst2man:textproc/py-docutils@${PY_FLAVOR} + +USES= autoreconf gmake libtool pkgconfig python:3.5+,build varnish:6 +USE_LDCONFIG= yes + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --disable-static +INSTALL_TARGET= install-strip +DOCSDIR= ${PREFIX}/share/doc/vmod-dynamic +MAKE_JOBS_UNSAFE= yes + +CFLAGS+= -I${WRKSRC}/src + +USE_GITHUB= yes +GH_ACCOUNT= nigoroll +GH_TAGNAME= 220fd64 + +OPTIONS_DEFINE= DOCS + +post-patch: + ${REINPLACE_CMD} 's|$${VARNISHAPI_DATAROOTDIR}|${LOCALBASE}/share|' \ + ${WRKSRC}/Makefile.am + +.include <bsd.port.mk> diff --git a/www/varnish-libvmod-dynamic/distinfo b/www/varnish-libvmod-dynamic/distinfo new file mode 100644 index 000000000000..3c0120a97cf3 --- /dev/null +++ b/www/varnish-libvmod-dynamic/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1566493821 +SHA256 (nigoroll-libvmod-dynamic-20190822-220fd64_GH0.tar.gz) = 072e6c20cef5b8c9074d5c0eb4aaf9ba5f8b6a6b786be88421c18ada5d5d62e4 +SIZE (nigoroll-libvmod-dynamic-20190822-220fd64_GH0.tar.gz) = 40136 diff --git a/www/varnish-libvmod-dynamic/files/patch-src_dyn__resolver__getdns.c b/www/varnish-libvmod-dynamic/files/patch-src_dyn__resolver__getdns.c new file mode 100644 index 000000000000..80e234c3ba5f --- /dev/null +++ b/www/varnish-libvmod-dynamic/files/patch-src_dyn__resolver__getdns.c @@ -0,0 +1,15 @@ +--- src/dyn_resolver_getdns.c.orig 2019-08-22 17:20:58 UTC ++++ src/dyn_resolver_getdns.c +@@ -33,6 +33,12 @@ + #include <sys/socket.h> + #include <netdb.h> + ++#ifdef __FreeBSD__ ++#include <arpa/inet.h> ++#include <netinet/in.h> ++#include <resolv.h> ++#endif ++ + #include <cache/cache.h> + #include <vsa.h> + diff --git a/www/varnish-libvmod-dynamic/pkg-descr b/www/varnish-libvmod-dynamic/pkg-descr new file mode 100644 index 000000000000..c60e45825c27 --- /dev/null +++ b/www/varnish-libvmod-dynamic/pkg-descr @@ -0,0 +1,11 @@ +This module provides a varnish director for dynamic creation of backends based +on calls to the system's network address resolution service which, in turn, +typically use information from the /etc/hosts file and the Domain Name Service +(DNS), but can be configured to use other sources like LDAP or more advanced +DNS resolution where getdns is available. + +While standard varnish backends defined in VCL may also be defined in terms of +host names, changes of the name service information will only be picked up +with a VCL reload. + +WWW: https://github.com/nigoroll/libvmod-dynamic diff --git a/www/varnish-libvmod-dynamic/pkg-plist b/www/varnish-libvmod-dynamic/pkg-plist new file mode 100644 index 000000000000..24032a9fe107 --- /dev/null +++ b/www/varnish-libvmod-dynamic/pkg-plist @@ -0,0 +1,4 @@ +lib/varnish/vmods/libvmod_dynamic.so +man/man3/vmod_dynamic.3.gz +%%PORTDOCS%%%%DOCSDIR%%/LICENSE +%%PORTDOCS%%%%DOCSDIR%%/README.rst |