source: trunk/dports/net/sendfile/Portfile

Last change on this file was 104567, checked in by jmr@…, 4 years ago

sendfile: license

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# $Id: Portfile 104567 2013-03-28 17:01:34Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                    sendfile
6# upstream doesn't change the filename for revision changes
7set up_version  2.1b
8set up_revision 20091007
9version                 ${up_version}-${up_revision}
10categories              net
11# Contains some code under the "Frontier Artistic License", which is based on
12# Artistic-1, which FSF considers to be GPL-incompatible
13license                 GPL Artistic-1 Restrictive
14platforms               darwin
15maintainers             nomaintainer
16homepage                http://fex.rus.uni-stuttgart.de/saft/sendfile.html
17description             A saft suite for asynchronous transfers
18
19long_description        Sendfile is a SAFT implementation for UNIX and serves as a tool for \
20                        asynchronous sending of files in the internet, conserving their file \
21                        attributes. It consists of the following parts: \
22                        sendfiled - the server daemon \
23                        sendfile - a client for sending files \
24                        sendmsg - a client for sending one-line text messages \
25                        receive - a client for receiving spooled files
26
27distname        ${name}-${up_version}
28dist_subdir             ${name}/${version}
29master_sites            http://fex.rus.uni-stuttgart.de/download/
30checksums               md5 ea87edf5923f41efbe40dab5b4ef38b0 \
31                        sha1 cd0ee8eb2865c3320529b45812f96805c357bc35 \
32                        rmd160 2095f4252db0f15f358e969460d61f29d90e8fad
33
34patchfiles              patch-makeconfig.diff patch-sendfiled.c.diff
35
36use_configure           no
37
38pre-build {             reinplace "s|/var/spool|${prefix}/var/spool|" ${worksrcpath}/makeconfig
39                        reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/makeconfig
40                        reinplace "s|/var/log|${prefix}/var/log|" ${worksrcpath}/makeconfig
41                        reinplace "s|/opt/bin|${prefix}/bin|" ${worksrcpath}/etc/sendfile.cf
42                        }
43
44build.args              config
45
46post-build {            reinplace "s|/var/spool|${prefix}/var/spool|" ${worksrcpath}/etc/sfconf
47                        reinplace "s|/var/spool|${prefix}/var/spool|g" ${worksrcpath}/etc/sfdconf
48                        reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/etc/sfdconf
49                        }
50
51destroot.destdir        ${destroot}${prefix}
52destroot.target
53
54destroot {              xinstall -m 755 -v -W ${worksrcpath}/src \
55                        sendfile sendmsg receive fetchfile utf7encode wlock \
56                        ${destroot}${prefix}/bin
57                        xinstall -m 755 -v -W ${worksrcpath}/etc \
58                        sfconf sfdconf check_sendfile \
59                        ${destroot}${prefix}/bin
60                        xinstall -m 644 -v -W ${worksrcpath}/etc \
61                        sendfile.cf sendfile.deny \
62                        ${destroot}${prefix}/etc
63                        xinstall -m 644 -v -W ${worksrcpath}/doc \
64                        sendmsg.1 sendfile.1 receive.1 fetchfile.1 utf7encode.1 wlock.1 \
65                        ${destroot}${prefix}/share/man/man1
66                        xinstall -m 755 ${worksrcpath}/src/sendfiled ${destroot}${prefix}/sbin
67                        file mkdir ${destroot}${prefix}/share/doc/${name}
68                        file copy ${worksrcpath}/doc/README ${destroot}${prefix}/share/doc/${name}
69                        file copy ${worksrcpath}/doc/fetchfile.7 ${destroot}${prefix}/share/man/man7
70                        file copy ${worksrcpath}/doc/sendfiled.8 ${destroot}${prefix}/share/man/man8
71                        }
72
73
74post-destroot {         system "cd '${destroot}${prefix}/bin' && ln -s utf7encode utf7decode"
75                        xinstall -m 755 -d ${destroot}${prefix}/var/spool/sendfile
76                        xinstall -m 700 -d ${destroot}${prefix}/var/spool/sendfile/LOG
77                        xinstall -m 1777 -d ${destroot}${prefix}/var/spool/sendfile/OUTGOING
78                        destroot.keepdirs-append ${destroot}${prefix}/var/spool/sendfile
79                        destroot.keepdirs-append ${destroot}${prefix}/var/spool/sendfile/LOG
80                        destroot.keepdirs-append ${destroot}${prefix}/var/spool/sendfile/OUTGOING
81                        }
82
83# Notify the user how to launch the sendfile daemon
84notes "For being able to receive files, you'll have to use either
85xinetd or inetd, depending on what you are using.\n
86Use the following line if you'll go for inetd:
87saft stream tcp nowait root /path/to/sendfiled sendfiled\n
88For xinetd, just take a service file as an example."
Note: See TracBrowser for help on using the repository browser.