summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2018-11-11 01:59:23 +0000
committerschmonz <schmonz@pkgsrc.org>2018-11-11 01:59:23 +0000
commitd540b6a38ccd710a67f8516560c36c655e7723f5 (patch)
tree2e96e565cb3abd700284e8587ea95d7249efe020
parentd808596723ecda42cf80d809ee11bbba121d5992 (diff)
downloadpkgsrc-d540b6a38ccd710a67f8516560c36c655e7723f5.tar.gz
Initial import of greylisting-spp, a qmail-spp plugin for greylisting.
It can track its state in a flat file, Berkeley DB 4, or SQLite 2 or 3.
-rw-r--r--mail/greylisting-spp/DESCR2
-rw-r--r--mail/greylisting-spp/Makefile33
-rw-r--r--mail/greylisting-spp/PLIST8
-rw-r--r--mail/greylisting-spp/distinfo9
-rw-r--r--mail/greylisting-spp/options.mk21
-rw-r--r--mail/greylisting-spp/patches/patch-src_Makefile34
-rw-r--r--mail/greylisting-spp/patches/patch-test_Makefile24
-rw-r--r--mail/greylisting-spp/patches/patch-test_envdir.sh15
8 files changed, 146 insertions, 0 deletions
diff --git a/mail/greylisting-spp/DESCR b/mail/greylisting-spp/DESCR
new file mode 100644
index 00000000000..1c2cb057be7
--- /dev/null
+++ b/mail/greylisting-spp/DESCR
@@ -0,0 +1,2 @@
+greylisting-spp is a qmail-spp plugin for greylisting. It can track its
+state in a flat file, Berkeley DB 4, or SQLite 2 or 3.
diff --git a/mail/greylisting-spp/Makefile b/mail/greylisting-spp/Makefile
new file mode 100644
index 00000000000..01856eafa96
--- /dev/null
+++ b/mail/greylisting-spp/Makefile
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1 2018/11/11 01:59:23 schmonz Exp $
+
+DISTNAME= greylisting-spp-1.1
+CATEGORIES= mail
+MASTER_SITES= ${HOMEPAGE}
+
+MAINTAINER= schmonz@NetBSD.org
+HOMEPAGE= http://www.unix-ag.uni-kl.de/~conrad/greylisting/
+COMMENT= Plugin for qmail-spp that provides greylisting
+LICENSE= gnu-gpl-v2
+
+USE_TOOLS+= gmake
+CONFIGURE_SCRIPT= ${MAKE}
+CONFIGURE_ARGS= ${BUILD_MAKE_FLAGS}
+BUILD_DIRS= src
+TEST_DIRS= test
+TEST_TARGET= run-tests
+
+INSTALLATION_DIRS= bin share/doc/${PKGBASE}
+
+.include "options.mk"
+
+do-install:
+ cd ${WRKSRC} && \
+ ${INSTALL_PROGRAM} src/greylisting-spp \
+ ${DESTDIR}${PREFIX}/bin; \
+ for i in README README.db-bdb README.db-file \
+ README.db-sqlite README.db-sqlite3 README.dbapi; do \
+ ${INSTALL_DATA} doc/$$i \
+ ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}; \
+ done
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/mail/greylisting-spp/PLIST b/mail/greylisting-spp/PLIST
new file mode 100644
index 00000000000..b7e5327c3bf
--- /dev/null
+++ b/mail/greylisting-spp/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1 2018/11/11 01:59:23 schmonz Exp $
+bin/greylisting-spp
+share/doc/greylisting-spp/README
+share/doc/greylisting-spp/README.db-bdb
+share/doc/greylisting-spp/README.db-file
+share/doc/greylisting-spp/README.db-sqlite
+share/doc/greylisting-spp/README.db-sqlite3
+share/doc/greylisting-spp/README.dbapi
diff --git a/mail/greylisting-spp/distinfo b/mail/greylisting-spp/distinfo
new file mode 100644
index 00000000000..6c2f86fb6d9
--- /dev/null
+++ b/mail/greylisting-spp/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2018/11/11 01:59:23 schmonz Exp $
+
+SHA1 (greylisting-spp-1.1.tar.gz) = 648cfcb135619635e38a84c4c7316cba35d929e5
+RMD160 (greylisting-spp-1.1.tar.gz) = 91b2a46130070a92913c7e399004d86ad524a940
+SHA512 (greylisting-spp-1.1.tar.gz) = 7797c98243283f7ef8985df7f0525502f14b871f5d32303d4a55d4b8471443fe6687a4565f51a0f3b5bbd84c2ff516602a6064f2287161ca09fe026d0f479c59
+Size (greylisting-spp-1.1.tar.gz) = 33254 bytes
+SHA1 (patch-src_Makefile) = f41880f39b144f1d46daa7c6fa5f30c07ecaf33a
+SHA1 (patch-test_Makefile) = 82122675ed1ea2aa9ca33eec2403de88a97c551f
+SHA1 (patch-test_envdir.sh) = 31384dfd6d772dc97a6a870f4817ab1a4312100a
diff --git a/mail/greylisting-spp/options.mk b/mail/greylisting-spp/options.mk
new file mode 100644
index 00000000000..ade94a5cedc
--- /dev/null
+++ b/mail/greylisting-spp/options.mk
@@ -0,0 +1,21 @@
+# $NetBSD: options.mk,v 1.1 2018/11/11 01:59:23 schmonz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.greylisting-spp
+PKG_OPTIONS_OPTIONAL_GROUPS= db
+PKG_OPTIONS_GROUP.db= db4 sqlite sqlite3
+PKG_SUGGESTED_OPTIONS= sqlite3
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdb4)
+. include "../../databases/db4/buildlink3.mk"
+BUILD_MAKE_FLAGS+= DB_IMPL=bdb
+.elif !empty(PKG_OPTIONS:Msqlite)
+. include "../../databases/sqlite/buildlink3.mk"
+BUILD_MAKE_FLAGS+= DB_IMPL=sqlite
+.elif !empty(PKG_OPTIONS:Msqlite3)
+. include "../../databases/sqlite3/buildlink3.mk"
+BUILD_MAKE_FLAGS+= DB_IMPL=sqlite3
+.else
+BUILD_MAKE_FLAGS+= DB_IMPL=file
+.endif
diff --git a/mail/greylisting-spp/patches/patch-src_Makefile b/mail/greylisting-spp/patches/patch-src_Makefile
new file mode 100644
index 00000000000..addbaee9f89
--- /dev/null
+++ b/mail/greylisting-spp/patches/patch-src_Makefile
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_Makefile,v 1.1 2018/11/11 01:59:23 schmonz Exp $
+
+Respect pkgsrc CFLAGS and LDFLAGS.
+
+--- src/Makefile.orig 2011-06-20 20:05:00.000000000 +0000
++++ src/Makefile
+@@ -16,13 +16,13 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ #CFLAGS=-O6 -Wall
+-CFLAGS=-g -Wall
+-LDFLAGS=-g
++#CFLAGS=-g -Wall
++#LDFLAGS=-g
+
+ DB_IMPL=file
+
+ ifeq ($(DB_IMPL),bdb)
+-LDLIBS=-ldb
++LDLIBS=-ldb4
+ endif
+ ifeq ($(DB_IMPL),sqlite)
+ LDLIBS=-lsqlite
+@@ -34,8 +34,10 @@ endif
+ all: greylisting-spp
+
+ greylisting-spp: greylisting-spp.o db-$(DB_IMPL).o commonstuff.o
++ ${CC} ${LDFLAGS} greylisting-spp.o db-$(DB_IMPL).o commonstuff.o ${LDLIBS} -o greylisting-spp
+
+ greylisting-spp.o: greylisting-spp.c db-api.h
++ ${CC} ${CFLAGS} -c greylisting-spp.c
+
+ clean:
+ rm -f greylisting-spp *.o
diff --git a/mail/greylisting-spp/patches/patch-test_Makefile b/mail/greylisting-spp/patches/patch-test_Makefile
new file mode 100644
index 00000000000..fc82a1454fb
--- /dev/null
+++ b/mail/greylisting-spp/patches/patch-test_Makefile
@@ -0,0 +1,24 @@
+$NetBSD: patch-test_Makefile,v 1.1 2018/11/11 01:59:23 schmonz Exp $
+
+Avoid unnecessary use of unportable "echo -n".
+
+--- test/Makefile.orig 2008-04-27 20:17:06.000000000 +0000
++++ test/Makefile
+@@ -60,7 +60,7 @@ run-tests: greylisting-spp
+ echo junk01@tivano.de >envdir/SMTPMAILFROM; ./test-accept.sh envdir
+ echo junk@tivano.de >envdir/SMTPMAILFROM
+ echo junk01@tivano.de >envdir/SMTPRCPTTO; ./test-accept.sh envdir
+- echo -n "" >envdir/SMTPMAILFROM; ./test-reject-later.sh envdir
++ >envdir/SMTPMAILFROM; ./test-reject-later.sh envdir
+ sleep 1
+ ./test-accept.sh envdir
+ ./test-reject-later.sh envdir
+@@ -72,7 +72,7 @@ run-tests: greylisting-spp
+ >envdir/SMTPMAILFROM
+ ./test-accept.sh envdir
+ rm -rf $(TESTDB); mkdir -p dbdir
+- echo -n "" >envdir/SMTPMAILFROM
++ >envdir/SMTPMAILFROM
+ echo junk01@tivano.de >envdir/SMTPRCPTTO; ./test-reject-later.sh envdir
+ echo junk02@tivano.de >envdir/SMTPRCPTTO; ./test-reject-later.sh envdir
+ sleep 1
diff --git a/mail/greylisting-spp/patches/patch-test_envdir.sh b/mail/greylisting-spp/patches/patch-test_envdir.sh
new file mode 100644
index 00000000000..962ad6f318f
--- /dev/null
+++ b/mail/greylisting-spp/patches/patch-test_envdir.sh
@@ -0,0 +1,15 @@
+$NetBSD: patch-test_envdir.sh,v 1.1 2018/11/11 01:59:23 schmonz Exp $
+
+Filter out variables that trip up unset.
+
+--- test/envdir.sh.orig 2008-04-27 20:10:53.000000000 +0000
++++ test/envdir.sh
+@@ -20,7 +20,7 @@ if [ $# != 1 ]; then
+ exit 1
+ fi
+
+-unset `env | grep -v '^PATH=' | sed 's/=.*//'`
++unset `env | grep -v '^PATH=' | grep -v '\.MAKE\.LEVEL\.ENV' | grep -v 'PKG_BUILD_OPTIONS' | sed 's/=.*//'`
+
+ for i in $1/*; do
+ if [ -r $i ]; then