git: c1e76f67587e - main - Add www/mod_defensible: Apache 2.4 module aiming to block IP listed in DNSBL

From: Li-Wen Hsu <lwhsu_at_FreeBSD.org>
Date: Tue, 08 Feb 2022 04:00:24 UTC
The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c1e76f67587e0de95a4f7695a8fb881557de29b8

commit c1e76f67587e0de95a4f7695a8fb881557de29b8
Author:     Peter Libassi <peter@libassi.se>
AuthorDate: 2022-02-08 03:58:16 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2022-02-08 03:59:10 +0000

    Add www/mod_defensible: Apache 2.4 module aiming to block IP listed in DNSBL
    
    PR:             261236
---
 www/Makefile                                    |  1 +
 www/mod_defensible/Makefile                     | 28 +++++++++++++++++++++++++
 www/mod_defensible/distinfo                     |  3 +++
 www/mod_defensible/files/patch-mod_defensible.c | 12 +++++++++++
 www/mod_defensible/pkg-descr                    | 11 ++++++++++
 5 files changed, 55 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 52c0026078ab..22b4097b1b56 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -374,6 +374,7 @@
     SUBDIR += mod_cfg_ldap
     SUBDIR += mod_cloudflare
     SUBDIR += mod_dav_svn
+    SUBDIR += mod_defensible
     SUBDIR += mod_dnssd
     SUBDIR += mod_evasive
     SUBDIR += mod_fastcgi
diff --git a/www/mod_defensible/Makefile b/www/mod_defensible/Makefile
new file mode 100644
index 000000000000..d7d175d2b6b4
--- /dev/null
+++ b/www/mod_defensible/Makefile
@@ -0,0 +1,28 @@
+# Created by: Peter Libassi <peter@libassi.se>
+
+PORTNAME=	mod_defensible
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.5
+CATEGORIES=	www
+
+MAINTAINER=	peter@libassi.se
+COMMENT=	Apache 2.4 module aiming to block IP listed in DNSBL
+
+LICENSE=	APACHE20
+
+USES=		apache:2.4+
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	jd
+
+AP_FAST_BUILD=	yes
+AP_GENPLIST=	yes
+SHORTMODNAME=	defensible
+
+SRC_FILE=	mod_defensible.c
+
+post-patch:
+	${REINPLACE_CMD} 's,%%PORTVERSION%%,${PORTVERSION},' \
+		${WRKSRC}/mod_defensible.c
+
+.include <bsd.port.mk>
diff --git a/www/mod_defensible/distinfo b/www/mod_defensible/distinfo
new file mode 100644
index 000000000000..590722605ac6
--- /dev/null
+++ b/www/mod_defensible/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1642253279
+SHA256 (jd-mod_defensible-v1.5_GH0.tar.gz) = 030f5cc41c80d6973eb893f1fbbe24427cd03855a89009d198384164c02a4082
+SIZE (jd-mod_defensible-v1.5_GH0.tar.gz) = 5416
diff --git a/www/mod_defensible/files/patch-mod_defensible.c b/www/mod_defensible/files/patch-mod_defensible.c
new file mode 100644
index 000000000000..d8352b3011b8
--- /dev/null
+++ b/www/mod_defensible/files/patch-mod_defensible.c
@@ -0,0 +1,12 @@
+--- mod_defensible.c.orig	2012-04-03 14:50:25 UTC
++++ mod_defensible.c
+@@ -19,7 +19,8 @@
+  *
+  */
+ 
+-#include <config.h>
++/*#include <config.h>*/
++#define VERSION "%%PORTVERSION%%"
+ 
+ #include "apr_strings.h"
+ 
diff --git a/www/mod_defensible/pkg-descr b/www/mod_defensible/pkg-descr
new file mode 100644
index 000000000000..03588c109368
--- /dev/null
+++ b/www/mod_defensible/pkg-descr
@@ -0,0 +1,11 @@
+mod_defensible is a Apache 2.x module aiming to forbid IP listed
+in DNSBL.
+
+httpd.conf configuration example:
+
+DnsblUse On
+DnsblServers bsb.spamlookup.net bl.blbl.org opm.blitzed.org sbl-xbl.spamhaus.org
+
+No UDNS support in this FreeBSD port version
+
+WWW: https://github.com/jd/mod_defensible