1 | # $Id: Portfile,v 1.4 2004/12/03 19:41:51 jberry Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name sendpage |
---|
6 | version 1.000001 |
---|
7 | categories net |
---|
8 | maintainers machowtos@mac.com |
---|
9 | platforms darwin |
---|
10 | |
---|
11 | description Sendpage sends alphanumeric pages via a modem, receives via SNPP |
---|
12 | |
---|
13 | long_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 | |
---|
17 | homepage http://www.sendpage.org/ |
---|
18 | |
---|
19 | master_sites sourceforge |
---|
20 | checksums md5 4dc9115ad984408e0400241341341b99 |
---|
21 | |
---|
22 | depends_lib port:p5-net-snpp \ |
---|
23 | port:p5-device-serialport \ |
---|
24 | port:p5-mailtools \ |
---|
25 | port:p5-dbi |
---|
26 | |
---|
27 | use_configure no |
---|
28 | build {} |
---|
29 | |
---|
30 | # Maintain empty directories |
---|
31 | destroot.keepdirs ${destroot}${prefix}/var/sendpage \ |
---|
32 | ${destroot}${prefix}/var/sendpage/lock |
---|
33 | |
---|
34 | variant startup { |
---|
35 | depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup |
---|
36 | } |
---|
37 | |
---|
38 | pre-destroot { |
---|
39 | adduser sendpage realname=MySQL |
---|
40 | reinplace "s|Win32|Device|g" ${worksrcpath}/Makefile.PL |
---|
41 | |
---|
42 | reinplace "s|/etc/sendpage.cf|${prefix}/etc/sendpage/sendpage.cf|g" ${worksrcpath}/sendpage |
---|
43 | reinplace "s|/var/lock|${prefix}/var/sendpage/lock|g" ${worksrcpath}/sendpage |
---|
44 | |
---|
45 | reinplace "s|/usr/local/bin|${prefix}/bin|g" ${worksrcpath}/sendpage.init |
---|
46 | reinplace "s|/etc/sendpage.cf|${prefix}/etc/sendpage/sendpage.cf|g" ${worksrcpath}/sendpage.init |
---|
47 | |
---|
48 | reinplace "s|/var/spool|${prefix}/var|g" \ |
---|
49 | ${worksrcpath}/sendpage |
---|
50 | |
---|
51 | reinplace "s|/etc|${prefix}/etc/sendpage|g" ${worksrcpath}/snpp |
---|
52 | |
---|
53 | reinplace "s|#pidfileprefix = /tmp/var/spool/sendpage/sendpage| \ |
---|
54 | pidfileprefix = ${prefix}/var/sendpage/sendpage|g" ${worksrcpath}/sendpage.cf |
---|
55 | |
---|
56 | reinplace "s|#lockprefix = /tmp/var/lock/LCK..| \ |
---|
57 | lockprefix = ${prefix}/var/sendpage/lock/LCK..|g" ${worksrcpath}/sendpage.cf |
---|
58 | |
---|
59 | reinplace "s|#queuedir = /tmp/var/spool/sendpage| \ |
---|
60 | queuedir = ${prefix}/var/sendpage|g" ${worksrcpath}/sendpage.cf |
---|
61 | } |
---|
62 | |
---|
63 | destroot { |
---|
64 | system "cd ${worksrcpath} && perl Makefile.PL" |
---|
65 | system "cd ${worksrcpath} && make" |
---|
66 | system "cd ${worksrcpath} && make install" |
---|
67 | } |
---|
68 | |
---|
69 | post-destroot { |
---|
70 | |
---|
71 | # Copy sendpage configuration files |
---|
72 | xinstall -m 755 -d ${destroot}${prefix}/etc/sendpage |
---|
73 | xinstall -m 755 ${worksrcpath}/sendpage.cf ${destroot}${prefix}/etc/sendpage |
---|
74 | xinstall -m 755 ${worksrcpath}/email2page.conf ${destroot}${prefix}/etc/sendpage |
---|
75 | xinstall -m 755 ${worksrcpath}/snpp.conf ${destroot}${prefix}/etc/sendpage |
---|
76 | |
---|
77 | # Copy sendpage documentation & examples |
---|
78 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/sendpage |
---|
79 | xinstall -m 755 ${worksrcpath}/README ${destroot}${prefix}/share/doc/sendpage |
---|
80 | xinstall -m 755 ${worksrcpath}/FEATURES ${destroot}${prefix}/share/doc/sendpage |
---|
81 | xinstall -m 755 ${worksrcpath}/TODO ${destroot}${prefix}/share/doc/sendpage |
---|
82 | |
---|
83 | xinstall -m 755 -d ${destroot}${prefix}/share/sendpage/examples |
---|
84 | eval xinstall -m 755 [glob ${worksrcpath}/examples/*] ${destroot}${prefix}/share/sendpage/examples |
---|
85 | xinstall -m 755 ${worksrcpath}/${name}.init ${destroot}${prefix}/share/sendpage/examples |
---|
86 | |
---|
87 | # Make the sendpage queue area |
---|
88 | xinstall -d ${destroot}${prefix}/var/sendpage/lock |
---|
89 | system "chmod og-rwx ${destroot}${prefix}/var/sendpage" |
---|
90 | system "chown sendpage ${destroot}${prefix}/var/sendpage" |
---|
91 | system "chgrp tty ${destroot}${prefix}/var/sendpage" |
---|
92 | |
---|
93 | system "chown sendpage ${destroot}${prefix}/var/sendpage/lock" |
---|
94 | system "chgrp uucp ${destroot}${prefix}/var/sendpage/lock" |
---|
95 | |
---|
96 | # Use sendpage startup script & DarwinPortsStartup to startup sendpage at boot |
---|
97 | if { [variant_isset startup] } { |
---|
98 | |
---|
99 | xinstall -o root -m 755 -d ${destroot}${prefix}/etc/rc.d |
---|
100 | xinstall -o root -m 755 -c ${worksrcpath}/${name}.init ${destroot}${prefix}/etc/rc.d/${name}.sh |
---|
101 | reinplace "s|/var/spool|${prefix}/var|g" ${destroot}${prefix}/etc/rc.d/${name}.sh |
---|
102 | } |
---|
103 | } |
---|
104 | |
---|
105 | post-install { |
---|
106 | ui_msg "\nREADME & docs --> ${prefix}/share/doc/sendpage |
---|
107 | Configuration files --> ${prefix}/etc/sendpage |
---|
108 | Examples --> ${prefix}/share/sendpage/examples\n" |
---|
109 | } |
---|