summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorfhajny <fhajny@pkgsrc.org>2009-12-07 09:24:46 +0000
committerfhajny <fhajny@pkgsrc.org>2009-12-07 09:24:46 +0000
commitc38bc0999163895fe8544868aeff05fe82765726 (patch)
treeb8d0db577275f1828c51f2209bdd5b49ee81175b /mail
parent5d5fbfc9cbc33f3e3cc8f948eb92bbb9b30a857d (diff)
downloadpkgsrc-c38bc0999163895fe8544868aeff05fe82765726.tar.gz
Provide a sample config file and fix its default path.
Diffstat (limited to 'mail')
-rw-r--r--mail/pfqueue/Makefile15
-rw-r--r--mail/pfqueue/PLIST3
-rw-r--r--mail/pfqueue/distinfo4
-rw-r--r--mail/pfqueue/files/pfqueue.conf2
-rw-r--r--mail/pfqueue/patches/patch-ab15
-rw-r--r--mail/pfqueue/patches/patch-ac24
6 files changed, 59 insertions, 4 deletions
diff --git a/mail/pfqueue/Makefile b/mail/pfqueue/Makefile
index 00702dadeb8..cc06278a4ac 100644
--- a/mail/pfqueue/Makefile
+++ b/mail/pfqueue/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2009/11/20 13:14:13 fhajny Exp $
+# $NetBSD: Makefile,v 1.9 2009/12/07 09:24:46 fhajny Exp $
#
DISTNAME= pfqueue-0.5.6
@@ -18,7 +18,9 @@ INCOMPAT_CURSES= NetBSD-1.*-*
.include "options.mk"
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
+INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 share/examples/pfqueue
+
+CONF_FILES= share/examples/pfqueue/pfqueue.conf ${PKG_SYSCONFDIR}/pfqueue.conf
CONFIGURE_ARGS+= --enable-shared
@@ -29,6 +31,15 @@ SUBST_FILES.make= backends/Makefile.in
SUBST_FILES.make+= libpfq/Makefile.in
SUBST_SED.make+= -e 's,-module,,'
+SUBST_CLASSES+= conf
+SUBST_MESSAGE.conf= Fixing path to config file
+SUBST_STAGE.conf= post-patch
+SUBST_FILES.conf= pfqconfig.c pfqueue.conf.5
+SUBST_SED.conf= -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
+
+post-install:
+ ${INSTALL_DATA} ${FILESDIR}/pfqueue.conf ${DESTDIR}${PREFIX}/share/examples/pfqueue
+
.include "../../devel/ncurses/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/pfqueue/PLIST b/mail/pfqueue/PLIST
index 033692a68c9..4889ad231a4 100644
--- a/mail/pfqueue/PLIST
+++ b/mail/pfqueue/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2009/11/20 13:14:13 fhajny Exp $
+@comment $NetBSD: PLIST,v 1.3 2009/12/07 09:24:46 fhajny Exp $
bin/pfqueue
bin/spfqueue
${PLIST.exim}lib/libpfq_exim.la
@@ -7,3 +7,4 @@ ${PLIST.socket}lib/libpfq_socket.la
lib/libpfqueue.la
man/man1/pfqueue.1
man/man5/pfqueue.conf.5
+share/examples/pfqueue/pfqueue.conf
diff --git a/mail/pfqueue/distinfo b/mail/pfqueue/distinfo
index 7ff4a02ce4e..8a6507bb775 100644
--- a/mail/pfqueue/distinfo
+++ b/mail/pfqueue/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.3 2009/11/20 13:14:13 fhajny Exp $
+$NetBSD: distinfo,v 1.4 2009/12/07 09:24:46 fhajny Exp $
SHA1 (pfqueue-0.5.6.tar.gz) = 29fc58eab31b1a6225bda1205f155ed5cfb951b2
RMD160 (pfqueue-0.5.6.tar.gz) = 6b2b539449fd9e0f127b23ba49de1761d769c27f
Size (pfqueue-0.5.6.tar.gz) = 298870 bytes
SHA1 (patch-aa) = 51c1ae7a438ef596a6b1c0d4821440822315e2e4
+SHA1 (patch-ab) = 3feee5012319cc3634217aacb95923f3ae550e7d
+SHA1 (patch-ac) = 26d19666b3dfd2bb71fb5140668ec58b292a046c
diff --git a/mail/pfqueue/files/pfqueue.conf b/mail/pfqueue/files/pfqueue.conf
new file mode 100644
index 00000000000..28e437274ad
--- /dev/null
+++ b/mail/pfqueue/files/pfqueue.conf
@@ -0,0 +1,2 @@
+# Default backend to use
+backend_name=postfix2
diff --git a/mail/pfqueue/patches/patch-ab b/mail/pfqueue/patches/patch-ab
new file mode 100644
index 00000000000..33334ec94f7
--- /dev/null
+++ b/mail/pfqueue/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.1 2009/12/07 09:24:46 fhajny Exp $
+
+Fix path to config file
+
+--- pfqconfig.c.orig 2007-01-19 16:31:42.000000000 +0000
++++ pfqconfig.c
+@@ -124,7 +124,7 @@ void pfq_read_file ( struct pfql_context
+ void pfq_read_config ( struct pfql_context_t *ctx ) {
+ char *b;
+ b = (char*)malloc(CFG_MAXLEN);
+- pfq_read_file ( ctx, "/etc/pfqueue.conf" );
++ pfq_read_file ( ctx, "@PKG_SYSCONFDIR@/pfqueue.conf" );
+ sprintf ( b, "%s/.pfqueue", getenv("HOME") );
+ pfq_read_file ( ctx, b );
+ free ( b );
diff --git a/mail/pfqueue/patches/patch-ac b/mail/pfqueue/patches/patch-ac
new file mode 100644
index 00000000000..4efa46fa189
--- /dev/null
+++ b/mail/pfqueue/patches/patch-ac
@@ -0,0 +1,24 @@
+$NetBSD: patch-ac,v 1.1 2009/12/07 09:24:46 fhajny Exp $
+
+Fix path to config file
+
+--- pfqueue.conf.5.orig 2007-01-19 16:37:19.000000000 +0000
++++ pfqueue.conf.5
+@@ -18,14 +18,14 @@
+ pfqueue.conf \- pfqueue configuration file
+
+ .SH FULL PATH
+-/etc/pfqueue.conf or ~/.pfqueue
++@PKG_SYSCONFDIR@/pfqueue.conf or ~/.pfqueue
+
+ .SH DESCRIPTION
+ \fBpfqueue\fP can be configured storing its option in configuration files.
+-At startup, if /etc/pfqueue.conf is present it is read and options
++At startup, if @PKG_SYSCONFDIR@/pfqueue.conf is present it is read and options
+ are set accordingly; then, if a .pfqueue file is present in user's home
+ directory, it is read and options are set accordingly, overriding those
+-stored in /etc/pfqueue.conf.
++stored in @PKG_SYSCONFDIR@/pfqueue.conf.
+ .br
+ Note that the resulting settings are overridden by command line options.
+