source: trunk/dports/mail/sqlgrey/Portfile

Last change on this file was 154088, checked in by mojca@…, 13 months ago

sqlgrey: switch to perl5.24 (#52081)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 154088 2016-10-20 02:48:27Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6
7name                sqlgrey
8version             1.8.0-rc2
9revision            5
10categories          mail
11license             GPL-2
12maintainers         pixilla openmaintainer
13platforms           darwin
14description         SQLgrey is a postfix policy service implementing a grey-listing policy
15long_description    ${description}
16homepage            http://sqlgrey.sourceforge.net/
17master_sites        sourceforge
18
19checksums           rmd160  0404df3987ceb4732e73fee09388454995754c1c \
20                    sha256  c109aab28c9dcf798beb708d1efa37facfb3dfacd0f15fa87b5f6c1f023d2068
21
22perl5.require_variant   yes
23perl5.conflict_variants yes
24perl5.branches          5.24
25perl5.create_variants   ${perl5.branches}
26
27supported_archs     noarch
28depends_lib         port:p${perl5.major}-dbi \
29                    port:p${perl5.major}-io-multiplex \
30                    port:p${perl5.major}-net-dns \
31                    port:p${perl5.major}-net-server
32
33depends_run         port:postfix
34
35patch.pre_args      -p1
36patchfiles          patch-Makefile.diff \
37                    patch-etc-sqlgrey.conf.diff \
38                    patch-sqlgrey-logstats.pl.diff \
39                    patch-sqlgrey.diff \
40                    patch-tester.pl.diff
41
42set sqlgreyuser     _${name}
43set sqlgreygroup    ${sqlgreyuser}
44
45add_users ${sqlgreyuser} group=${sqlgreygroup} realname=${name}
46
47post-patch {
48    reinplace "s|@PREFIX@|${prefix}|g" \
49        ${worksrcpath}/etc/sqlgrey.conf \
50        ${worksrcpath}/sqlgrey \
51        ${worksrcpath}/sqlgrey-logstats.pl \
52        ${worksrcpath}/tester.pl \
53        ${worksrcpath}/Makefile
54    reinplace "s|@DESTROOT@|${destroot}|g" \
55        ${worksrcpath}/Makefile
56    reinplace "s|@NAME@|${name}|g" \
57        ${worksrcpath}/etc/sqlgrey.conf \
58        ${worksrcpath}/sqlgrey
59    reinplace "s|@SQLGREYUSER@|${sqlgreyuser}|g" \
60        ${worksrcpath}/etc/sqlgrey.conf \
61        ${worksrcpath}/sqlgrey
62    reinplace "s|@SQLGREYGROUP@|${sqlgreygroup}|g" \
63        ${worksrcpath}/etc/sqlgrey.conf \
64        ${worksrcpath}/sqlgrey
65}
66
67use_configure           no
68
69build.env-append    LC_CTYPE=C
70destroot.env-append LC_CTYPE=C
71
72destroot.keepdirs   ${destroot}${prefix}/var/run/${name}
73
74post-destroot {
75    move ${destroot}${prefix}/etc/${name}/sqlgrey.conf ${destroot}${prefix}/etc/${name}/sqlgrey.conf.example
76    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
77    xinstall -m 0664 -W ${worksrcpath} FAQ HOWTO README.DBCLUSTER README.DISCRIMINATION README.OPTINOUT README.PERF \
78        ${destroot}${prefix}/share/doc/${name}
79}
80
81post-activate {
82    touch ${prefix}/etc/${name}/clients_fqdn_whitelist.local
83    touch ${prefix}/etc/${name}/clients_ip_whitelist.local
84}
85
86startupitem.create  yes
87startupitem.executable \
88                    ${prefix}/sbin/sqlgrey
89
90default_variants-append \
91                    +mysql
92
93variant mysql description {Add mysql driver support} {
94    depends_lib-append  port:p${perl5.major}-dbd-mysql
95}
96
97variant sqlite description {Add sqlite driver support} {
98    depends_lib-append  port:p${perl5.major}-dbd-sqlite
99}
100
101variant postgresql description {Add postgres driver support} {
102    depends_lib-append  port:p${perl5.major}-dbd-pg
103}
104
105variant table_names description {Make table names configurable} {
106    patchfiles-append   patch-table-names.diff
107}
108
109livecheck.version   ${version}
110livecheck.regex     "(?!${name}).*${name}-((?!${extract.suffix}).*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.