Ticket #68573: Portfile

File Portfile, 3.8 KB (added by artkiver (グレェ), 10 months ago)

full Portfile for OpenSMTPD 7.4.0p1 (in case of confusion of diffs)

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