aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/Makefile1
-rw-r--r--www/mod_asn/Makefile36
-rw-r--r--www/mod_asn/distinfo2
-rw-r--r--www/mod_asn/pkg-descr5
-rw-r--r--www/mod_asn/pkg-plist8
5 files changed, 52 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index 06858d41f5d5..e4522c960aa3 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -434,6 +434,7 @@
SUBDIR += mod_access_referer
SUBDIR += mod_accounting
SUBDIR += mod_antiloris
+ SUBDIR += mod_asn
SUBDIR += mod_auth_cas
SUBDIR += mod_auth_cookie_mysql
SUBDIR += mod_auth_cookie_mysql2
diff --git a/www/mod_asn/Makefile b/www/mod_asn/Makefile
new file mode 100644
index 000000000000..c8ca78bcec0a
--- /dev/null
+++ b/www/mod_asn/Makefile
@@ -0,0 +1,36 @@
+# New ports collection makefile for: mod_asn
+# Date created: 24 Apr 2011
+# Whom: Jun Kuriyama <kuriyama@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= mod_asn
+PORTVERSION= 1.5
+CATEGORIES= www
+MASTER_SITES= ${MASTER_SITE_LOCAL} \
+ http://mirrorbrain.org/files/releases/
+MASTER_SITE_SUBDIR= kuriyama
+
+MAINTAINER= kuriyama@FreeBSD.org
+COMMENT= Look up the AS and network prefix of IP address
+
+LIB_DEPENDS= apr-1:${PORTSDIR}/devel/apr1
+
+USE_APACHE= 2.2+
+AP_FAST_BUILD= YES
+MANUAL_PACKAGE_BUILD= devel/apr1 with pgsql option required
+
+.include <bsd.port.pre.mk>
+
+pre-build:
+ @[ -r ${PREFIX}/lib/apr-util-1/apr_dbd_pgsql.so ] || (${ECHO_MSG} "APR util with PostgreSQL required."; ${FALSE})
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/asn_import.py ${PREFIX}/bin/asn_import
+ ${INSTALL_SCRIPT} ${WRKSRC}/asn_get_routeviews.py ${PREFIX}/bin/asn_get_routeviews
+ ${MKDIR} ${DATADIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/asn.sql ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/mod_asn.conf ${EXAMPLESDIR}
+
+.include <bsd.port.post.mk>
diff --git a/www/mod_asn/distinfo b/www/mod_asn/distinfo
new file mode 100644
index 000000000000..530520105d2e
--- /dev/null
+++ b/www/mod_asn/distinfo
@@ -0,0 +1,2 @@
+SHA256 (mod_asn-1.5.tar.gz) = 389c1402d96612db46c6b293aa1a75f08dd56f07502e0aa1a5807c2eecb02836
+SIZE (mod_asn-1.5.tar.gz) = 22976
diff --git a/www/mod_asn/pkg-descr b/www/mod_asn/pkg-descr
new file mode 100644
index 000000000000..eaae3dfeca8d
--- /dev/null
+++ b/www/mod_asn/pkg-descr
@@ -0,0 +1,5 @@
+mod_asn is an Apache module that uses BGP routing data to look up the
+autonomous system (AS) and the network prefix (subnet) which contains
+a given (clients) IP address.
+
+WWW: http://mirrorbrain.org/mod_asn/
diff --git a/www/mod_asn/pkg-plist b/www/mod_asn/pkg-plist
new file mode 100644
index 000000000000..30f6a4fc8f97
--- /dev/null
+++ b/www/mod_asn/pkg-plist
@@ -0,0 +1,8 @@
+bin/asn_import
+bin/asn_get_routeviews
+libexec/apache22/mod_asn.so
+%%EXAMPLESDIR%%/mod_asn.conf
+%%DATADIR%%/asn.sql
+@dirrm %%DATADIR%%
+@dirrm %%EXAMPLESDIR%%
+@unexec egrep -v 'LoadModule +asn_module +libexec/apache22/mod_asn.so' %D/etc/apache22/httpd.conf > /tmp/httpd.$$; mv /tmp/httpd.$$ %D/etc/apache22/httpd.conf