source: trunk/dports/net/sendpage/Portfile

Last change on this file was 151859, checked in by mojca@…, 11 months ago

sendpage: switch to perl5.24 (#52081)

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