Changeset 98805


Ignore:
Timestamp:
Oct 17, 2012, 5:44:55 AM (12 years ago)
Author:
pixilla@…
Message:

mail/sqlgrey:

  • Make database table names configurable.
Location:
trunk/dports/mail/sqlgrey
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/mail/sqlgrey/Portfile

    r95131 r98805  
    2828checksums           sha1    2359577af0149394d1181e12007f013478148423 \
    2929                    rmd160  0404df3987ceb4732e73fee09388454995754c1c
    30 
     30patch.pre_args      -p1
    3131patchfiles          patch-Makefile.diff \
    3232                    patch-etc-sqlgrey.conf.diff \
     
    3939
    4040post-patch {
    41     reinplace "s|@@PREFIX@@|${prefix}|g" \
     41    reinplace "s|@PREFIX@|${prefix}|g" \
    4242        ${worksrcpath}/etc/sqlgrey.conf \
    4343        ${worksrcpath}/sqlgrey \
     
    4545        ${worksrcpath}/tester.pl \
    4646        ${worksrcpath}/Makefile
    47     reinplace "s|@@DESTROOT@@|${destroot}|g" \
     47    reinplace "s|@DESTROOT@|${destroot}|g" \
    4848        ${worksrcpath}/Makefile
    49     reinplace "s|@@NAME@@|${name}|g" \
     49    reinplace "s|@NAME@|${name}|g" \
    5050        ${worksrcpath}/etc/sqlgrey.conf \
    5151        ${worksrcpath}/sqlgrey
    52     reinplace "s|@@SQLGREYUSER@@|${sqlgreyuser}|g" \
     52    reinplace "s|@SQLGREYUSER@|${sqlgreyuser}|g" \
    5353        ${worksrcpath}/etc/sqlgrey.conf \
    5454        ${worksrcpath}/sqlgrey
    55     reinplace "s|@@SQLGREYGROUP@@|${sqlgreygroup}|g" \
     55    reinplace "s|@SQLGREYGROUP@|${sqlgreygroup}|g" \
    5656        ${worksrcpath}/etc/sqlgrey.conf \
    5757        ${worksrcpath}/sqlgrey
     
    7070    set gid [existsgroup ${sqlgreygroup}]
    7171    adduser ${sqlgreyuser} gid=${gid} realname=${name}
    72     move ${destroot}${prefix}/etc/sqlgrey/sqlgrey.conf ${destroot}${prefix}/etc/sqlgrey/sqlgrey.conf.example
     72    move ${destroot}${prefix}/etc/${name}/sqlgrey.conf ${destroot}${prefix}/etc/${name}/sqlgrey.conf.example
     73    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    7374    xinstall -m 0664 -W ${worksrcpath} FAQ HOWTO README.DBCLUSTER README.DISCRIMINATION README.OPTINOUT README.PERF \
    74         ${destroot}${prefix}/etc/sqlgrey
     75        ${destroot}${prefix}/share/doc/${name}
    7576}
    7677
    7778post-activate {
    78     touch ${prefix}/etc/sqlgrey/clients_fqdn_whitelist.local
    79     touch ${prefix}/etc/sqlgrey/clients_ip_whitelist.local
     79    touch ${prefix}/etc/${name}/clients_fqdn_whitelist.local
     80    touch ${prefix}/etc/${name}/clients_ip_whitelist.local
    8081}
    8182
     
    9495}
    9596
     97variant table_names description {Make table names configurable} {
     98    patchfiles-append   patch-table-names.diff
     99}
     100
    96101livecheck.version   ${version}
    97102livecheck.regex     "(?!${name}).*${name}-((?!${extract.suffix}).*)${extract.suffix}"
  • trunk/dports/mail/sqlgrey/files/patch-Makefile.diff

    r79572 r98805  
    1 --- Makefile.orig       2010-05-17 11:36:13.000000000 -0700
    2 +++ Makefile    2010-05-17 11:36:17.000000000 -0700
     1--- a/Makefile  2012-08-24 18:05:39.000000000 -0700
     2+++ b/Makefile  2012-08-24 18:06:42.000000000 -0700
    33@@ -1,10 +1,10 @@
    44 INSTALL = install
    55-ETCDIR = $(ROOTDIR)/etc
    6 +ETCDIR = @@DESTROOT@@@@PREFIX@@/etc
     6+ETCDIR = @DESTROOT@@PREFIX@/etc
    77 CONFDIR = $(ETCDIR)/sqlgrey
    88-SBINDIR = $(ROOTDIR)/usr/sbin
    99-BINDIR = $(ROOTDIR)/usr/bin
    10 +SBINDIR = @@DESTROOT@@@@PREFIX@@/sbin
    11 +BINDIR = @@DESTROOT@@@@PREFIX@@/bin
     10+SBINDIR = @DESTROOT@@PREFIX@/sbin
     11+BINDIR = @DESTROOT@@PREFIX@/bin
    1212 INITDIR = $(ETCDIR)/init.d
    1313-MANDIR = $(ROOTDIR)/usr/share/man/man1
    14 +MANDIR = @@DESTROOT@@@@PREFIX@@/share/man/man1
     14+MANDIR = @DESTROOT@@PREFIX@/share/man/man1
    1515 
    1616 VERSION := $(shell cat VERSION)
  • trunk/dports/mail/sqlgrey/files/patch-etc-sqlgrey.conf.diff

    r79570 r98805  
    1 --- etc/sqlgrey.conf.orig       2010-05-17 12:32:55.000000000 -0700
    2 +++ etc/sqlgrey.conf    2010-05-17 12:33:08.000000000 -0700
     1--- a/etc/sqlgrey.conf  2012-08-24 18:05:39.000000000 -0700
     2+++ b/etc/sqlgrey.conf  2012-08-24 18:08:37.000000000 -0700
    33@@ -7,7 +7,7 @@
    44 # - SQLgrey uses a specific config file when called with -f <conf_file>
     
    66 ## Configuration files
    77-# conf_dir = /etc/sqlgrey
    8 +# conf_dir = @@PREFIX@@/etc/sqlgrey
     8+# conf_dir = @PREFIX@/etc/sqlgrey
    99 
    1010 ## Log level
     
    1616-# user = sqlgrey
    1717-# group = sqlgrey
    18 +# user = @@SQLGREYUSER@@
    19 +# group = @@SQLGREYGROUP@@
     18+# user = @SQLGREYUSER@
     19+# group = @SQLGREYGROUP@
    2020 
    2121 ## Socket
     
    2626 # where to store the process PID
    2727-# pidfile = /var/run/sqlgrey.pid
    28 +# pidfile = @@PREFIX@@/var/run/@@NAME@@/sqlgrey.pid
     28+# pidfile = @PREFIX@/var/run/@NAME@/sqlgrey.pid
    2929 
    3030 ## Greylisting delays
  • trunk/dports/mail/sqlgrey/files/patch-sqlgrey-logstats.pl.diff

    r79570 r98805  
    1 --- sqlgrey-logstats.pl.orig    2010-05-17 11:55:47.000000000 -0700
    2 +++ sqlgrey-logstats.pl 2010-05-17 11:55:50.000000000 -0700
     1--- a/sqlgrey-logstats.pl       2012-08-24 18:05:39.000000000 -0700
     2+++ b/sqlgrey-logstats.pl       2012-08-24 18:06:53.000000000 -0700
    33@@ -1,4 +1,4 @@
    44-#!/usr/bin/perl -w
    5 +#!@@PREFIX@@/bin/perl -w
     5+#!@PREFIX@/bin/perl -w
    66 
    77 # sqlgrey: a postfix greylisting policy server using an SQL backend
  • trunk/dports/mail/sqlgrey/files/patch-sqlgrey.diff

    r79570 r98805  
    1 --- sqlgrey.orig        2010-05-17 12:40:48.000000000 -0700
    2 +++ sqlgrey     2010-05-17 12:40:52.000000000 -0700
     1--- a/sqlgrey   2012-08-24 18:05:39.000000000 -0700
     2+++ b/sqlgrey   2012-08-24 18:07:09.000000000 -0700
    33@@ -1,4 +1,4 @@
    44-#!/usr/bin/perl -w
    5 +#!@@PREFIX@@/bin/perl -w
     5+#!@PREFIX@/bin/perl -w
    66 
    77 # sqlgrey: a postfix greylisting policy server using an SQL backend
     
    1313-$dflt{user}               = 'sqlgrey';
    1414-$dflt{group}              = 'sqlgrey';
    15 +$dflt{user}               = '@@SQLGREYUSER@@';
    16 +$dflt{group}              = '@@SQLGREYGROUP@@';
     15+$dflt{user}               = '@SQLGREYUSER@';
     16+$dflt{group}              = '@SQLGREYGROUP@';
    1717 $dflt{inet}               = '2501';
    1818-$dflt{pidfile}            = '/var/run/sqlgrey.pid';
    1919-$dflt{conf_dir}           = '/etc/sqlgrey';
    20 +$dflt{pidfile}            = '@@PREFIX@@/var/run/@@NAME@@/sqlgrey.pid';
    21 +$dflt{conf_dir}           = '@@PREFIX@@/etc/sqlgrey';
     20+$dflt{pidfile}            = '@PREFIX@/var/run/@NAME@/sqlgrey.pid';
     21+$dflt{conf_dir}           = '@PREFIX@/etc/sqlgrey';
    2222 $dflt{reconnect_delay}    = 5;            # 5 minutes
    2323 $dflt{max_connect_age}    = 24;           # 24 hours
     
    2828 # Default configuration file
    2929-my $config_file              = '/etc/sqlgrey/sqlgrey.conf';
    30 +my $config_file              = '@@PREFIX@@/etc/sqlgrey/sqlgrey.conf';
     30+my $config_file              = '@PREFIX@/etc/sqlgrey/sqlgrey.conf';
    3131 
    3232 # whitelist files
     
    3737        # 'warning: Filehandle STDERR reopened as FILE only \
    3838-       # for input at /usr/bin/sqlgrey line 717, <FILE> line 57'
    39 +       # for input at @@PREFIX@@/bin/sqlgrey line 717, <FILE> line 57'
     39+       # for input at @PREFIX@/bin/sqlgrey line 717, <FILE> line 57'
    4040        open(STDIN,'</dev/null');
    4141        open(STDOUT,'>/dev/null');
     
    4646  -f, --configfile=FILE      read config from FILE
    4747-                            (default /etc/sqlgrey/sqlgrey.conf)
    48 +                            (default @@PREFIX@@/etc/sqlgrey/sqlgrey.conf)
     48+                            (default @PREFIX@/etc/sqlgrey/sqlgrey.conf)
    4949                             expecting config_param=value lines,
    5050                             - spaces are ignored,
     
    5252 
    5353-See the default config file at /etc/sqlgrey/sqlgrey.conf for runtime parameters.
    54 +See the default config file at @@PREFIX@@/etc/sqlgrey/sqlgrey.conf for runtime parameters.
     54+See the default config file at @PREFIX@/etc/sqlgrey/sqlgrey.conf for runtime parameters.
    5555 If you got sqlgrey from sources, read the HOWTO file in the compressed archive.
    5656 If it came prepackaged, look into the documentation tree for this file:
    5757-/usr/share/doc/sqlgrey-<version>/ on most Linux distributions for example.
    58 +@@PREFIX@@/share/doc/sqlgrey-<version>/ on most Linux distributions for example.
     58+@PREFIX@/share/doc/sqlgrey-<version>/ on most Linux distributions for example.
    5959 
    6060 =head1 DESCRIPTION
     
    6565 Start by adding check_policy_service after reject_unauth_destination in
    6666-/etc/postfix/main.cf :
    67 +@@PREFIX@@/etc/postfix/main.cf :
     67+@PREFIX@/etc/postfix/main.cf :
    6868 
    6969  smtpd_recipient_restrictions =
     
    7474 
    7575-/etc/postfix/sqlgrey_recipient_access:
    76 +@@PREFIX@@/etc/postfix/sqlgrey_recipient_access:
     76+@PREFIX@/etc/postfix/sqlgrey_recipient_access:
    7777   i_like_spam@ee.ethz.ch                OK
    7878 
     
    8484-       check_client_access    hash:/etc/postfix/sqlgrey_client_access
    8585-       check_recipient_access hash:/etc/postfix/sqlgrey_recipient_access
    86 +       check_client_access    hash:@@PREFIX@@/etc/postfix/sqlgrey_client_access
    87 +       check_recipient_access hash:@@PREFIX@@/etc/postfix/sqlgrey_recipient_access
     86+       check_client_access    hash:@PREFIX@/etc/postfix/sqlgrey_client_access
     87+       check_recipient_access hash:@PREFIX@/etc/postfix/sqlgrey_recipient_access
    8888        check_policy_service inet:127.0.0.1:10023
    8989 
  • trunk/dports/mail/sqlgrey/files/patch-tester.pl.diff

    r79570 r98805  
    1 --- tester.pl.orig      2010-05-17 11:57:50.000000000 -0700
    2 +++ tester.pl   2010-05-17 11:58:00.000000000 -0700
     1--- a/tester.pl 2012-08-24 18:05:39.000000000 -0700
     2+++ b/tester.pl 2012-08-24 18:06:30.000000000 -0700
    33@@ -1,4 +1,4 @@
    44-#!/usr/bin/perl
    5 +#!@@PREFIX@@/bin/perl
     5+#!@PREFIX@/bin/perl
    66 
    77 # Tester for SQLgrey
Note: See TracChangeset for help on using the changeset viewer.