[79570] trunk/dports/mail
pixilla at macports.org
pixilla at macports.org
Sat Jun 18 12:38:20 PDT 2011
Revision: 79570
http://trac.macports.org/changeset/79570
Author: pixilla at macports.org
Date: 2011-06-18 12:38:20 -0700 (Sat, 18 Jun 2011)
Log Message:
-----------
mail/sqlgrey: New port.
Added Paths:
-----------
trunk/dports/mail/sqlgrey/
trunk/dports/mail/sqlgrey/Portfile
trunk/dports/mail/sqlgrey/files/
trunk/dports/mail/sqlgrey/files/patch-Makefile.diff
trunk/dports/mail/sqlgrey/files/patch-etc-sqlgrey.conf.diff
trunk/dports/mail/sqlgrey/files/patch-sqlgrey-logstats.pl.diff
trunk/dports/mail/sqlgrey/files/patch-sqlgrey.diff
trunk/dports/mail/sqlgrey/files/patch-tester.pl.diff
Added: trunk/dports/mail/sqlgrey/Portfile
===================================================================
--- trunk/dports/mail/sqlgrey/Portfile (rev 0)
+++ trunk/dports/mail/sqlgrey/Portfile 2011-06-18 19:38:20 UTC (rev 79570)
@@ -0,0 +1,83 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+PortGroup perl5 1.0
+
+name sqlgrey
+version 1.8.0-rc2
+categories mail
+maintainers pixilla.com:brad
+platforms darwin
+description SQLgrey is a postfix policy service implementing a grey-listing policy
+long_description ${description}
+homepage http://sqlgrey.sourceforge.net/
+master_sites sourceforge
+
+depends_lib port:p5-net-server \
+ port:p5-io-multiplex \
+ port:p5-dbi
+
+depends_run port:postfix
+
+checksums sha1 2359577af0149394d1181e12007f013478148423 \
+ rmd160 0404df3987ceb4732e73fee09388454995754c1c
+
+patchfiles patch-Makefile.diff \
+ patch-etc-sqlgrey.conf.diff \
+ patch-sqlgrey-logstats.pl.diff \
+ patch-sqlgrey.diff \
+ patch-tester.pl.diff
+
+set sqlgreyuser _${name}
+set sqlgreygroup ${sqlgreyuser}
+
+pre-configure {
+ reinplace "s|@@PREFIX@@|${destroot}${prefix}|g" ${worksrcpath}/Makefile
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/etc/sqlgrey.conf
+ reinplace "s|@@NAME@@|${name}|g" ${worksrcpath}/etc/sqlgrey.conf
+ reinplace "s|@@SQLGREYUSER@@|${sqlgreyuser}|g" ${worksrcpath}/etc/sqlgrey.conf
+ reinplace "s|@@SQLGREYGROUP@@|${sqlgreygroup}|g" ${worksrcpath}/etc/sqlgrey.conf
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/sqlgrey-logstats.pl
+ reinplace "s|@@NAME@@|${name}|g" ${worksrcpath}/sqlgrey
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/sqlgrey
+ reinplace "s|@@SQLGREYUSER@@|${sqlgreyuser}|g" ${worksrcpath}/sqlgrey
+ reinplace "s|@@SQLGREYGROUP@@|${sqlgreygroup}|g" ${worksrcpath}/sqlgrey
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/tester.pl
+}
+
+use_configure no
+
+startupitem.create yes
+startupitem.executable \
+ ${prefix}/sbin/sqlgrey
+
+destroot.keepdirs ${destroot}${prefix}/var/run/${name}
+
+post-destroot {
+ addgroup ${sqlgreygroup} realname=${name}
+ set gid [existsgroup ${sqlgreygroup}]
+ adduser ${sqlgreyuser} gid=${gid} realname=${name}
+ move ${destroot}${prefix}/etc/sqlgrey/sqlgrey.conf ${destroot}${prefix}/etc/sqlgrey/sqlgrey.conf.example
+ xinstall -m 0664 -W ${worksrcpath} FAQ HOWTO README.DBCLUSTER README.DISCRIMINATION README.OPTINOUT README.PERF \
+ ${destroot}${prefix}/etc/sqlgrey
+}
+
+post-activate {
+ touch ${prefix}/etc/sqlgrey/clients_fqdn_whitelist.local
+ touch ${prefix}/etc/sqlgrey/clients_ip_whitelist.local
+}
+
+default_variants +mysql
+
+variant mysql description {add mysql driver support} {
+ depends_lib port:p5-dbd-mysql
+}
+
+variant sqlite description {add sqlite driver support} {
+ depends_lib port:p5-dbd-sqlite
+}
+
+variant postgresql description {add postgres driver support} {
+ depends_lib port:p5-dbd-pg
+}
Property changes on: trunk/dports/mail/sqlgrey/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/mail/sqlgrey/files/patch-Makefile.diff
===================================================================
--- trunk/dports/mail/sqlgrey/files/patch-Makefile.diff (rev 0)
+++ trunk/dports/mail/sqlgrey/files/patch-Makefile.diff 2011-06-18 19:38:20 UTC (rev 79570)
@@ -0,0 +1,17 @@
+--- Makefile.orig 2010-05-17 11:36:13.000000000 -0700
++++ Makefile 2010-05-17 11:36:17.000000000 -0700
+@@ -1,10 +1,10 @@
+ INSTALL = install
+-ETCDIR = $(ROOTDIR)/etc
++ETCDIR = @@PREFIX@@/etc
+ CONFDIR = $(ETCDIR)/sqlgrey
+-SBINDIR = $(ROOTDIR)/usr/sbin
+-BINDIR = $(ROOTDIR)/usr/bin
++SBINDIR = @@PREFIX@@/sbin
++BINDIR = @@PREFIX@@/bin
+ INITDIR = $(ETCDIR)/init.d
+-MANDIR = $(ROOTDIR)/usr/share/man/man1
++MANDIR = @@PREFIX@@/share/man/man1
+
+ VERSION := $(shell cat VERSION)
+
Added: trunk/dports/mail/sqlgrey/files/patch-etc-sqlgrey.conf.diff
===================================================================
--- trunk/dports/mail/sqlgrey/files/patch-etc-sqlgrey.conf.diff (rev 0)
+++ trunk/dports/mail/sqlgrey/files/patch-etc-sqlgrey.conf.diff 2011-06-18 19:38:20 UTC (rev 79570)
@@ -0,0 +1,31 @@
+--- etc/sqlgrey.conf.orig 2010-05-17 12:32:55.000000000 -0700
++++ etc/sqlgrey.conf 2010-05-17 12:33:08.000000000 -0700
+@@ -7,7 +7,7 @@
+ # - SQLgrey uses a specific config file when called with -f <conf_file>
+
+ ## Configuration files
+-# conf_dir = /etc/sqlgrey
++# conf_dir = @@PREFIX@@/etc/sqlgrey
+
+ ## Log level
+ # Uncomment to change the log level (default is normal: 2)
+@@ -59,8 +59,8 @@
+ # log_ident =
+
+ ## username and groupname the daemon runs as
+-# user = sqlgrey
+-# group = sqlgrey
++# user = @@SQLGREYUSER@@
++# group = @@SQLGREYGROUP@@
+
+ ## Socket
+ # On which socket do SQLgrey wait for queries
+@@ -71,7 +71,7 @@
+
+ ## PID
+ # where to store the process PID
+-# pidfile = /var/run/sqlgrey.pid
++# pidfile = @@PREFIX@@/var/run/@@NAME@@/sqlgrey.pid
+
+ ## Greylisting delays
+ # If you want to be really strict (RFC-wise) use these
Added: trunk/dports/mail/sqlgrey/files/patch-sqlgrey-logstats.pl.diff
===================================================================
--- trunk/dports/mail/sqlgrey/files/patch-sqlgrey-logstats.pl.diff (rev 0)
+++ trunk/dports/mail/sqlgrey/files/patch-sqlgrey-logstats.pl.diff 2011-06-18 19:38:20 UTC (rev 79570)
@@ -0,0 +1,8 @@
+--- sqlgrey-logstats.pl.orig 2010-05-17 11:55:47.000000000 -0700
++++ sqlgrey-logstats.pl 2010-05-17 11:55:50.000000000 -0700
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!@@PREFIX@@/bin/perl -w
+
+ # sqlgrey: a postfix greylisting policy server using an SQL backend
+ # based on postgrey
Added: trunk/dports/mail/sqlgrey/files/patch-sqlgrey.diff
===================================================================
--- trunk/dports/mail/sqlgrey/files/patch-sqlgrey.diff (rev 0)
+++ trunk/dports/mail/sqlgrey/files/patch-sqlgrey.diff 2011-06-18 19:38:20 UTC (rev 79570)
@@ -0,0 +1,90 @@
+--- sqlgrey.orig 2010-05-17 12:40:48.000000000 -0700
++++ sqlgrey 2010-05-17 12:40:52.000000000 -0700
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!@@PREFIX@@/bin/perl -w
+
+ # sqlgrey: a postfix greylisting policy server using an SQL backend
+ # based on postgrey
+@@ -56,11 +56,11 @@
+ # defaults
+ my %dflt;
+ $dflt{loglevel} = 2; # used for $dflt{log} entries in read_conffile()
+-$dflt{user} = 'sqlgrey';
+-$dflt{group} = 'sqlgrey';
++$dflt{user} = '@@SQLGREYUSER@@';
++$dflt{group} = '@@SQLGREYGROUP@@';
+ $dflt{inet} = '2501';
+-$dflt{pidfile} = '/var/run/sqlgrey.pid';
+-$dflt{conf_dir} = '/etc/sqlgrey';
++$dflt{pidfile} = '@@PREFIX@@/var/run/@@NAME@@/sqlgrey.pid';
++$dflt{conf_dir} = '@@PREFIX@@/etc/sqlgrey';
+ $dflt{reconnect_delay} = 5; # 5 minutes
+ $dflt{max_connect_age} = 24; # 24 hours
+ $dflt{awl_age} = 60; # 60 days
+@@ -103,7 +103,7 @@
+ };
+
+ # Default configuration file
+-my $config_file = '/etc/sqlgrey/sqlgrey.conf';
++my $config_file = '@@PREFIX@@/etc/sqlgrey/sqlgrey.conf';
+
+ # whitelist files
+ my $stat_ip_whitelist_file = $dflt{conf_dir} . '/clients_ip_whitelist';
+@@ -2703,7 +2703,7 @@
+ close(STDERR);
+ # Ugly hack to prevent perl from complaining
+ # 'warning: Filehandle STDERR reopened as FILE only \
+- # for input at /usr/bin/sqlgrey line 717, <FILE> line 57'
++ # for input at @@PREFIX@@/bin/sqlgrey line 717, <FILE> line 57'
+ open(STDIN,'</dev/null');
+ open(STDOUT,'>/dev/null');
+ open(STDERR,'>/dev/null');
+@@ -2787,15 +2787,15 @@
+ -k, --kill kill a running sqlgrey
+ (identified by 'pidfile' content)
+ -f, --configfile=FILE read config from FILE
+- (default /etc/sqlgrey/sqlgrey.conf)
++ (default @@PREFIX@@/etc/sqlgrey/sqlgrey.conf)
+ expecting config_param=value lines,
+ - spaces are ignored,
+ - '#' is used for comments
+
+-See the default config file at /etc/sqlgrey/sqlgrey.conf for runtime parameters.
++See the default config file at @@PREFIX@@/etc/sqlgrey/sqlgrey.conf for runtime parameters.
+ If you got sqlgrey from sources, read the HOWTO file in the compressed archive.
+ If it came prepackaged, look into the documentation tree for this file:
+-/usr/share/doc/sqlgrey-<version>/ on most Linux distributions for example.
++@@PREFIX@@/share/doc/sqlgrey-<version>/ on most Linux distributions for example.
+
+ =head1 DESCRIPTION
+
+@@ -2903,7 +2903,7 @@
+ =item *
+
+ Start by adding check_policy_service after reject_unauth_destination in
+-/etc/postfix/main.cf :
++@@PREFIX@@/etc/postfix/main.cf :
+
+ smtpd_recipient_restrictions =
+ ...
+@@ -2927,7 +2927,7 @@
+ If you want to disable greylisting for some users you can configure
+ Postfix like this:
+
+-/etc/postfix/sqlgrey_recipient_access:
++@@PREFIX@@/etc/postfix/sqlgrey_recipient_access:
+ i_like_spam at ee.ethz.ch OK
+
+ Then you'll add a check_recipient_access in main.cf before the
+@@ -2935,8 +2935,8 @@
+ smtpd_recipient_restrictions =
+ ...
+ reject_unauth_destination
+- check_client_access hash:/etc/postfix/sqlgrey_client_access
+- check_recipient_access hash:/etc/postfix/sqlgrey_recipient_access
++ check_client_access hash:@@PREFIX@@/etc/postfix/sqlgrey_client_access
++ check_recipient_access hash:@@PREFIX@@/etc/postfix/sqlgrey_recipient_access
+ check_policy_service inet:127.0.0.1:10023
+
+ =head1 SEE ALSO
Added: trunk/dports/mail/sqlgrey/files/patch-tester.pl.diff
===================================================================
--- trunk/dports/mail/sqlgrey/files/patch-tester.pl.diff (rev 0)
+++ trunk/dports/mail/sqlgrey/files/patch-tester.pl.diff 2011-06-18 19:38:20 UTC (rev 79570)
@@ -0,0 +1,8 @@
+--- tester.pl.orig 2010-05-17 11:57:50.000000000 -0700
++++ tester.pl 2010-05-17 11:58:00.000000000 -0700
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl
++#!@@PREFIX@@/bin/perl
+
+ # Tester for SQLgrey
+ # Michal Ludvig <mludvig at logix.net.nz> (c) 2009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110618/e433c38c/attachment-0001.html>
More information about the macports-changes
mailing list