mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
115 lines
3.7 KiB
Tcl
115 lines
3.7 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
PortGroup perl5 1.0
|
|
|
|
name sqlgrey
|
|
version 1.8.0
|
|
categories mail
|
|
license GPL-2
|
|
maintainers nomaintainer
|
|
description SQLgrey is a postfix policy service implementing a grey-listing policy
|
|
long_description {*}${description}
|
|
homepage http://sqlgrey.sourceforge.net/
|
|
master_sites sourceforge
|
|
|
|
checksums rmd160 503ff9487154506e2f550d931654822f014e6d20 \
|
|
sha256 94e0fa191b30d672b748e934728ca73383bf9b36e4b17618b01adaaba40280e2 \
|
|
size 69476
|
|
|
|
perl5.require_variant yes
|
|
perl5.conflict_variants yes
|
|
perl5.branches 5.28 5.30 5.32 5.34
|
|
perl5.default_branch 5.34
|
|
perl5.create_variants ${perl5.branches}
|
|
|
|
supported_archs noarch
|
|
platforms {darwin any}
|
|
|
|
depends_lib port:perl${perl5.major} \
|
|
port:p${perl5.major}-dbi \
|
|
port:p${perl5.major}-io-multiplex \
|
|
port:p${perl5.major}-net-dns \
|
|
port:p${perl5.major}-net-server
|
|
|
|
depends_run port:postfix
|
|
|
|
patch.pre_args-replace -p0 -p1
|
|
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}
|
|
|
|
add_users ${sqlgreyuser} group=${sqlgreygroup} realname=${name}
|
|
|
|
post-patch {
|
|
reinplace "s|@PERL_BIN@|${perl5.bin}|" \
|
|
${worksrcpath}/sqlgrey \
|
|
${worksrcpath}/sqlgrey-logstats.pl
|
|
reinplace "s|@PREFIX@|${prefix}|g" \
|
|
${worksrcpath}/etc/sqlgrey.conf \
|
|
${worksrcpath}/sqlgrey \
|
|
${worksrcpath}/tester.pl \
|
|
${worksrcpath}/Makefile
|
|
reinplace "s|@DESTROOT@|${destroot}|g" \
|
|
${worksrcpath}/Makefile
|
|
reinplace "s|@NAME@|${name}|g" \
|
|
${worksrcpath}/etc/sqlgrey.conf \
|
|
${worksrcpath}/sqlgrey
|
|
reinplace "s|@SQLGREYUSER@|${sqlgreyuser}|g" \
|
|
${worksrcpath}/etc/sqlgrey.conf \
|
|
${worksrcpath}/sqlgrey
|
|
reinplace "s|@SQLGREYGROUP@|${sqlgreygroup}|g" \
|
|
${worksrcpath}/etc/sqlgrey.conf \
|
|
${worksrcpath}/sqlgrey
|
|
}
|
|
|
|
use_configure no
|
|
|
|
build.env-append LC_CTYPE=C
|
|
destroot.env-append LC_CTYPE=C
|
|
|
|
destroot.keepdirs ${destroot}${prefix}/var/run/${name}
|
|
|
|
post-destroot {
|
|
move ${destroot}${prefix}/etc/${name}/sqlgrey.conf ${destroot}${prefix}/etc/${name}/sqlgrey.conf.example
|
|
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
|
|
xinstall -m 0664 -W ${worksrcpath} FAQ HOWTO README.DBCLUSTER README.DISCRIMINATION README.OPTINOUT README.PERF \
|
|
${destroot}${prefix}/share/doc/${name}
|
|
}
|
|
|
|
post-activate {
|
|
touch ${prefix}/etc/${name}/clients_fqdn_whitelist.local
|
|
touch ${prefix}/etc/${name}/clients_ip_whitelist.local
|
|
}
|
|
|
|
startupitem.create yes
|
|
startupitem.executable \
|
|
${prefix}/sbin/sqlgrey
|
|
|
|
default_variants-append \
|
|
+mysql
|
|
|
|
variant mysql description {Add mysql driver support} {
|
|
depends_lib-append port:p${perl5.major}-dbd-mysql
|
|
}
|
|
|
|
variant sqlite description {Add sqlite driver support} {
|
|
depends_lib-append port:p${perl5.major}-dbd-sqlite
|
|
}
|
|
|
|
variant postgresql description {Add postgres driver support} {
|
|
depends_lib-append port:p${perl5.major}-dbd-pg
|
|
}
|
|
|
|
variant table_names description {Make table names configurable} {
|
|
patchfiles-append patch-table-names.diff
|
|
}
|
|
|
|
livecheck.version ${version}
|
|
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
|