Ticket #67614: Portfile.opensmtpd7.3.0p1rc2

File Portfile.opensmtpd7.3.0p1rc2, 4.0 KB (added by artkiver (グレェ), 17 months ago)

Portfile for OpenSMTPD 7.3.0p1 RC2, just for testing for now.

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
3PortSystem          1.0
4PortGroup           legacysupport 1.0
5PortGroup           github 1.0
6
7github.setup        OpenSMTPD OpenSMTPD 7.3.0p0-rc2
8
9revision            0
10categories          mail
11platforms           darwin
12license             ISC
13maintainers         {@ryanakca debian.org:rak}
14description         secure, reliable, lean, and easy-to configure SMTP server
15long_description    The OpenSMTPD server seeks to be \
16                    \n* as secure as possible, and uses privilege separation to mitigate \
17                    \n  possible security bugs \
18                    \n* as reliable as possible: any accepted email must not be lost \
19                    \n* lean: it covers typical usage cases instead of every obscure one \
20                    \n* easy to configure, with a configuration syntax reminiscent of the OpenBSD \
21                    \n  Packet Filter's (PF) \
22                    \n* fast and efficient: it can handle large queues with reasonable performance
23homepage            https://www.opensmtpd.org
24
25master_sites        https://github.com/OpenSMTPD/OpenSMTPD/releases/download/$version
26github.tarball_from archive
27
28checksums           rmd160  94559f04b0fb8204d1134216e972f0a817746b5d \
29                    sha256  aabcbcc3fb9db435b816f600dacfaa099e1d6a428e2d2d4440ac5314f09a58c9 \
30                    size    845767
31
32depends_build       port:bison
33
34depends_lib         port:libevent \
35                    path:lib/libssl.dylib:openssl
36
37startupitem.create      yes
38startupitem.executable  ${prefix}/sbin/smtpd -F
39
40add_users           _smtpd group=_smtpd realname=OpenSMTP\ Daemon \
41                    _smtpq group=_smtpq realname=OpenSMTP\ Queue
42
43set sysconfdir ${prefix}/etc/${name}
44
45post-patch {
46    reinplace "s|file:/etc/mail/aliases|file:${sysconfdir}/aliases|g" ${worksrcpath}/usr.sbin/smtpd/smtpd.conf
47}
48
49
50
51depends_build-append \
52                    port:autoconf \
53                    port:automake \
54                    port:libtool
55
56configure.args      --sysconfdir=${sysconfdir} \
57                    --with-auth-pam \
58                    --with-libevent=${prefix} \
59                    --with-mantype=doc \
60                    --with-path-queue=${prefix}/var/spool/smtpd \
61                    --with-table-db
62
63# The spool directory *must* be installed with uid/gid 0.
64# OpenSMTPD checks these permissions at startup (queue_backend.c, using ckdir
65# from util.c), and aborts if they are not correctly set. Consequently,
66# opensmtpd must be installed as root
67destroot.asroot     yes
68destroot.keepdirs   ${destroot}${prefix}/var/spool/smtpd
69
70post-destroot {
71    xinstall -o root -g wheel -m 711 -d ${destroot}${prefix}/var/spool/smtpd
72    file rename ${destroot}${sysconfdir}/smtpd.conf ${destroot}${sysconfdir}/smtpd.conf.dist
73
74    file link -symbolic ${destroot}${prefix}/sbin/sendmail smtpctl
75    file link -symbolic ${destroot}${prefix}/sbin/mailq smtpctl
76    file link -symbolic ${destroot}${prefix}/sbin/makemap smtpctl
77    file link -symbolic ${destroot}${prefix}/sbin/newaliases smtpctl
78}
79
80post-activate {
81    if {![file exists ${sysconfdir}/smtpd.conf]} {
82        file copy ${sysconfdir}/smtpd.conf.dist ${sysconfdir}/smtpd.conf
83    }
84    if {![file exists ${sysconfdir}/aliases] && [file exists /etc/postfix/aliases]} {
85        file copy /etc/postfix/aliases ${sysconfdir}/aliases
86    }
87}
88
89notes "
90    Both OpenSMTPD and the built-in Postfix daemon listen on port 25 by\
91    default. The easiest way to avoid this conflict is to change the\
92    inet_interfaces setting in /etc/postfix/main.cf to keep Postfix from\
93    listening to the same interfaces as OpenSMTPD, and then restarting Postfix.\
94    To keep Postfix from listening on any interfaces, it is sufficient to set:
95
96        inet_interfaces =
97
98    Please see postconf(5) for more details.
99"
100
101livecheck.url       https://opensmtpd.org/archives/
102livecheck.type      regex
103livecheck.regex     opensmtpd-(\[0-9p.\]+)\\.tar\\.gz