Ticket #4187: Portfile

File Portfile, 3.5 KB (added by dports@…, 19 years ago)

sendpage-1.000001

Line 
1# $Id: Portfile,v 1.4 2004/12/03 19:41:51 jberry Exp $
2
3PortSystem      1.0
4
5name                    sendpage
6version                 1.000001
7categories              net
8maintainers             machowtos@mac.com
9platforms               darwin
10
11description             SNPP client and server that supports send via TAP via modem
12
13long_description        An SNPP client, SNPP server, a queuing engine, \
14                        a modem control engine, a TAP communication system, \
15                        and an email notification system.
16
17homepage                http://www.sendpage.org/
18                                       
19master_sites            sourceforge
20checksums               md5 4dc9115ad984408e0400241341341b99
21
22depends_lib             port:p5-net-snpp \
23                        port:p5-device-serialport \
24                        port:p5-mailtools \
25                        port:p5-dbi
26
27use_configure           no
28build {}
29
30# Maintain empty directories
31destroot.keepdirs       ${destroot}${prefix}/var/sendpage \
32                        ${destroot}${prefix}/var/sendpage/lock
33
34pre-destroot {
35                adduser sendpage
36                reinplace "s|Win32|Device|g" ${worksrcpath}/Makefile.PL
37
38                reinplace "s|/etc/sendpage.cf|${prefix}/etc/sendpage/sendpage.cf|g" ${worksrcpath}/sendpage
39                reinplace "s|/var/lock|${prefix}/var/sendpage/lock|g" ${worksrcpath}/sendpage
40
41                reinplace "s|/usr/local/bin|${prefix}/bin|g" ${worksrcpath}/sendpage.init
42                reinplace "s|/etc/sendpage.cf|${prefix}/etc/sendpage/sendpage.cf|g" ${worksrcpath}/sendpage.init
43
44                reinplace "s|/var/spool|${prefix}/var|g" \
45                        ${worksrcpath}/sendpage.init \
46                        ${worksrcpath}/sendpage
47
48                reinplace "s|/etc|${prefix}/etc/sendpage|g" ${worksrcpath}/snpp
49
50                reinplace "s|#pidfileprefix = /tmp/var/spool/sendpage/sendpage| \
51                        pidfileprefix = ${prefix}/var/sendpage/sendpage|g" ${worksrcpath}/sendpage.cf
52
53                reinplace "s|#lockprefix = /tmp/var/lock/LCK..| \
54                        lockprefix = ${prefix}/var/sendpage/lock/LCK..|g" ${worksrcpath}/sendpage.cf
55
56                reinplace "s|#queuedir = /tmp/var/spool/sendpage| \
57                        queuedir = ${prefix}/var/sendpage|g" ${worksrcpath}/sendpage.cf
58}
59
60destroot {
61                system "cd ${worksrcpath} && perl Makefile.PL"
62                system "cd ${worksrcpath} && make"
63                system "cd ${worksrcpath} && make install"
64}
65
66post-destroot {
67
68# Copy sendpage configuration  files
69                xinstall -m 755 -d ${destroot}${prefix}/etc/sendpage
70                xinstall -m 755 ${worksrcpath}/sendpage.cf ${destroot}${prefix}/etc/sendpage
71                xinstall -m 755 ${worksrcpath}/email2page.conf ${destroot}${prefix}/etc/sendpage
72                xinstall -m 755 ${worksrcpath}/snpp.conf ${destroot}${prefix}/etc/sendpage
73
74# Copy sendpage documentation
75                xinstall -m 755 -d ${destroot}${prefix}/share/doc/sendpage
76                xinstall -m 755 ${worksrcpath}/README ${destroot}${prefix}/share/doc/sendpage
77                xinstall -m 755 ${worksrcpath}/FEATURES ${destroot}${prefix}/share/doc/sendpage
78                xinstall -m 755 ${worksrcpath}/TODO ${destroot}${prefix}/share/doc/sendpage
79
80                xinstall -m 755 -d ${destroot}${prefix}/share/sendpage/examples
81                eval xinstall -m 755 [glob ${worksrcpath}/examples/*] ${destroot}${prefix}/share/sendpage/examples
82
83# Copy sendpage init file
84                 xinstall -m 755 ${worksrcpath}/sendpage.init ${destroot}${prefix}/share/sendpage/examples
85
86# Make the sendpage queue area
87                xinstall -d ${destroot}${prefix}/var/sendpage/lock
88                system "chmod og-rwx ${destroot}${prefix}/var/sendpage"
89                system "chown sendpage ${destroot}${prefix}/var/sendpage"
90                system "chgrp tty ${destroot}${prefix}/var/sendpage"
91
92                system "chown sendpage ${destroot}${prefix}/var/sendpage/lock"
93                system "chgrp uucp ${destroot}${prefix}/var/sendpage/lock"
94}
95
96post-install {
97                ui_msg "\nREADME & docs --> ${prefix}/share/doc/sendpage
98Configuration files --> ${prefix}/etc/sendpage
99Examples & example init file  --> ${prefix}/share/sendpage/examples\n"
100}