source: trunk/dports/net/sendpage/Portfile @ 125738

Last change on this file since 125738 was 125738, checked in by mf2k@…, 4 years ago

adodb argus-monitor base blt cacti cdpr doclifter eventlog expect gkrellm honeyd iwidgets kchmviewer libdnsres monarch moodss moomps nagios nagios-plugins nedi netmrg network-weathermap nfdump nfsen nrg nrpe nsca ntop p5-archive-zip p5-cgi p5-cgi-speedycgi p5-convert-asn1 p5-libintl-perl p5-mhonarc p5-net p5-perl-ldap rancid rrdtool scotty sendpage smokeping snort sympa syslog-ng tclx tftp-hpa tktable uplog vm-pop3d xserve-raid-tools zabbix: Ports abandoned by markd. (#44782)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1# $Id: Portfile 125738 2014-09-25 14:43:03Z mf2k@macports.org $
2
3PortSystem      1.0
4
5name                    sendpage
6version                 1.000003
7revision        1
8categories              net
9maintainers             nomaintainer
10platforms               darwin
11
12description             Sendpage sends alphanumeric pages via a modem, receives via SNPP
13
14long_description        An SNPP client, SNPP server, a queuing engine, \
15                        a modem control engine, a TAP communication system, \
16                        and an email notification system.
17
18homepage                http://www.sendpage.org/
19
20master_sites    sourceforge
21checksums               md5 586afe41d6cd82d045fdc34ccf99cab3
22
23depends_lib port:p5.12-net-snpp \
24                        port:p5.12-device-serialport \
25                        port:p5.12-mailtools \
26                        port:p5.12-dbi
27
28use_configure           no
29build {}
30
31# Maintain empty directories
32destroot.keepdirs       ${destroot}${prefix}/var/sendpage \
33                                        ${destroot}${prefix}/var/sendpage/lock
34
35variant server  {
36# Create a startupitem to start/stop the server
37    startupitem.create    yes
38    startupitem.start    "${prefix}/share/${name}/sendpage.init start"
39    startupitem.stop    "${prefix}/share/${name}/sendpage.init stop"
40}
41
42pre-destroot {
43        adduser sendpage
44        addgroup sendpage
45
46                reinplace "s|Win32|Device|g" ${worksrcpath}/Makefile.PL
47
48                reinplace "s|/etc/sendpage.cf|${prefix}/etc/sendpage/sendpage.cf|g" ${worksrcpath}/sendpage
49                reinplace "s|/var/lock|${prefix}/var/sendpage/lock|g" ${worksrcpath}/sendpage
50
51                reinplace "s|/etc/sendpage.cf|${prefix}/etc/sendpage/sendpage.cf|g" ${worksrcpath}/sendpage.init
52        reinplace "s|/var/spool|${prefix}/var|g" ${worksrcpath}/sendpage.init
53        reinplace "s|/usr/local/bin|${prefix}/bin|g" ${worksrcpath}/sendpage.init
54
55                reinplace "s|/var/spool|${prefix}/var|g" \
56                        ${worksrcpath}/sendpage
57
58                reinplace "s|/etc|${prefix}/etc/sendpage|g" ${worksrcpath}/snpp
59
60                reinplace "s|#pidfileprefix = /tmp/var/spool/sendpage/sendpage| \
61                        pidfileprefix = ${prefix}/var/sendpage/sendpage|g" ${worksrcpath}/sendpage.cf
62
63                reinplace "s|#lockprefix = /tmp/var/lock/LCK..| \
64                        lockprefix = ${prefix}/var/sendpage/lock/LCK..|g" ${worksrcpath}/sendpage.cf
65
66                reinplace "s|#queuedir = /tmp/var/spool/sendpage| \
67                        queuedir = ${prefix}/var/sendpage|g" ${worksrcpath}/sendpage.cf
68}
69
70destroot {
71                system "cd ${worksrcpath} && ${prefix}/bin/perl5.12 Makefile.PL"
72                system "cd ${worksrcpath} && make"
73                system "cd ${worksrcpath} && make install"
74}
75
76post-destroot {
77
78# Copy sendpage configuration files
79                xinstall -m 755 -d ${destroot}${prefix}/etc/sendpage
80                xinstall -m 755 ${worksrcpath}/sendpage.cf ${destroot}${prefix}/etc/sendpage
81                xinstall -m 755 ${worksrcpath}/email2page.conf ${destroot}${prefix}/etc/sendpage
82                xinstall -m 755 ${worksrcpath}/snpp.conf ${destroot}${prefix}/etc/sendpage
83
84# Copy sendpage documentation & examples
85                xinstall -m 755 -d ${destroot}${prefix}/share/doc/sendpage
86                xinstall -m 755 ${worksrcpath}/README ${destroot}${prefix}/share/doc/sendpage
87                xinstall -m 755 ${worksrcpath}/FEATURES ${destroot}${prefix}/share/doc/sendpage
88                xinstall -m 755 ${worksrcpath}/TODO ${destroot}${prefix}/share/doc/sendpage
89
90                xinstall -m 755 -d ${destroot}${prefix}/share/sendpage/examples
91                eval xinstall -m 755 [glob ${worksrcpath}/examples/*] ${destroot}${prefix}/share/sendpage/examples
92                xinstall -m 755 ${worksrcpath}/${name}.init ${destroot}${prefix}/share/sendpage/examples
93
94# Make the sendpage queue area
95                xinstall -d ${destroot}${prefix}/var/sendpage/lock
96                system "chmod og-rwx ${destroot}${prefix}/var/sendpage"
97                system "chown sendpage ${destroot}${prefix}/var/sendpage"
98                system "chgrp tty ${destroot}${prefix}/var/sendpage"
99
100                system "chown sendpage ${destroot}${prefix}/var/sendpage/lock"
101                system "chgrp uucp ${destroot}${prefix}/var/sendpage/lock"
102
103# Install sendpage start script
104                xinstall -o root -m 755 -c ${worksrcpath}/${name}.init ${destroot}${prefix}/share/${name}
105
106}
107
108post-install {
109                ui_msg "\n
110README & docs -->       ${prefix}/share/doc/sendpage
111Config files -->        ${prefix}/etc/sendpage
112Start script -->        ${prefix}/share/sendpage/sendpage.init
113Examples  -->           ${prefix}/share/sendpage/examples\n"
114}
Note: See TracBrowser for help on using the repository browser.