Ticket #535: Portfile

File Portfile, 4.6 KB (added by pguyot (Paul Guyot), 21 years ago)

Portfile for 2.0.12

Line 
1# $Id: Portfile,v 1.9 2003/03/03 06:59:15 mij Exp $
2
3PortSystem          1.0
4name                    postfix
5version                 2.0.12
6categories              mail
7maintainers             eric@opendarwin.org
8description         Fast and robust mail transfer agent
9long_description        Postfix attempts to be fast, easy to administer, and secure, while at \
10                                the same time being sendmail-compatible enough to not upset existing \
11                                users. It also offers QMQP and VERP support to let Postfix act as delivery \
12                                daemon for ezmlm-idx.
13platforms           darwin
14master_sites        ftp://ftp.tau.ac.il/pub/unix/mail/postfix/official/ \
15                    http://postfix.problemlos.ch/release/official/ \
16                    ftp://ftp.matrix.com.br/pub/postfix/official/ \
17                    ftp://ftp.its.cz/MIRRORS/ftp.porcupine.org/mirrors/postfix-release/official/ \
18                    ftp://ftp.club-internet.fr/pub/mirrors/ftp.porcupine.org/postfix-release/official/ \
19                    ftp://ftp.doc.cs.univ-paris8.fr/mirrors/ftp.porcupine.org/postfix-release/official/
20checksums           md5 94ce611b6f3e169caee2b4634c6b5370
21patchfiles          patch-access.5.diff \
22                    patch-flush.8.diff \
23                    patch-master.8.diff \
24                    patch-regexp_table.5.diff \
25                    patch-sys_defs.h.diff \
26                    patch-canonical.5.diff \
27                    patch-mail_params.h.diff \
28                    patch-pcre_table.5.diff \
29                    patch-postdrop.1.diff \
30                    patch-postqueue.1.diff \
31                    patch-relocated.5.diff \
32                    patch-transport.5.diff \
33                    patch-cleanup.8.diff \
34                    patch-main.cf.diff \
35                    patch-postfix-install.diff \
36                    patch-proxymap.8.diff \
37                    patch-sample-misc.cf.diff \
38                    patch-sendmail.1.diff \
39                    patch-virtual.5.diff
40
41configure {
42    cd ${worksrcpath}
43    reinplace "s|__PREFIX|${prefix}|g" src/util/sys_defs.h
44    reinplace "s|__PREFIX|${prefix}|g" conf/main.cf
45    reinplace "s|__PREFIX|${prefix}|g" src/global/mail_params.h
46    reinplace "s|__PREFIX|${prefix}|g" conf/sample-misc.cf
47    reinplace "s|__PREFIX|${prefix}|g" man/man1/postdrop.1
48    reinplace "s|__PREFIX|${prefix}|g" man/man1/postqueue.1
49    reinplace "s|__PREFIX|${prefix}|g" man/man1/sendmail.1
50    reinplace "s|__PREFIX|${prefix}|g" man/man5/access.5
51    reinplace "s|__PREFIX|${prefix}|g" man/man5/canonical.5
52    reinplace "s|__PREFIX|${prefix}|g" man/man5/pcre_table.5
53    reinplace "s|__PREFIX|${prefix}|g" man/man5/regexp_table.5
54    reinplace "s|__PREFIX|${prefix}|g" man/man5/relocated.5
55    reinplace "s|__PREFIX|${prefix}|g" man/man5/transport.5
56    reinplace "s|__PREFIX|${prefix}|g" man/man5/virtual.5
57    reinplace "s|__PREFIX|${prefix}|g" man/man8/cleanup.8
58    reinplace "s|__PREFIX|${prefix}|g" man/man8/flush.8
59    reinplace "s|__PREFIX|${prefix}|g" man/man8/master.8
60    reinplace "s|__PREFIX|${prefix}|g" man/man8/proxymap.8
61}
62
63build.target
64
65depends_run         path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
66install {
67    adduser postfix realname=Postfix\ Server
68    addgroup postdrop
69    cd ${worksrcpath}
70    system "install -d ${destroot}${prefix}/bin"
71    system "install -d ${destroot}${prefix}/etc/postfix"
72    system "install -d ${destroot}${prefix}/etc/rc.d"
73    system "install -d ${destroot}${prefix}/libexec"
74    system "install -d ${destroot}${prefix}/sbin"
75    system "install -d ${destroot}${prefix}/man"
76    system "install -d ${destroot}${prefix}/share/postfix"
77    system "install -d -g postdrop ${destroot}${prefix}/var/spool/postfix/public"
78    system "install -d -g postdrop ${destroot}${prefix}/var/spool/postfix/maildrop"
79    system \
80        "/bin/sh postfix-install -non-interactive \
81            install_root=${destroot} \
82            config_directory=${prefix}/etc/postfix \
83            daemon_directory=${prefix}/libexec \
84            command_directory=${prefix}/sbin \
85            queue_directory=${prefix}/var/spool/postfix \
86            manpage_directory=${prefix}/man \
87            sendmail_path=${prefix}/sbin/sendmail \
88            newaliases_path=${prefix}/bin/newaliases \
89            mailq_path=${prefix}/bin/mailq \
90            sample_directory=${prefix}/share/postfix/sample \
91            readme_directory=${prefix}/share/postfix/readme"
92    system "install -o root -m 755 -d ${destroot}${prefix}/etc/rc.d"
93    system \
94        "install -o root -m 755 -c \
95            ${portpath}/files/postfix.sh ${destroot}${prefix}/etc/rc.d"
96    reinplace "s|__PREFIX|${prefix}|g" \
97        ${destroot}${prefix}/etc/rc.d/postfix.sh
98}