source: trunk/dports/net/tftp-hpa/Portfile @ 119200

Last change on this file since 119200 was 119200, checked in by cal@…, 5 years ago

tftp-hpa: update to 5.2, closes #43256, #31740, maintainer timeout

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1# $Id: Portfile 119200 2014-04-20 07:05:05Z cal@macports.org $
2
3PortSystem 1.0
4
5name                tftp-hpa
6version             5.2
7categories          net
8maintainers         markd
9description         Enhanced port of the BSD TFTP server
10platforms           darwin
11long_description    tftp-hpa is an enhanced version of the BSD TFTP client \
12                    and server,  possessing a number of bugfixes and enhancements \
13                    over the  original. It has been made portable and will work on \
14                    pretty much any modern Unix variant.
15license             BSD
16homepage            http://www.kernel.org/pub/software/network/tftp/
17master_sites        ${homepage}/tftp-hpa/
18use_bzip2           yes
19
20checksums           rmd160  dc3935af75f2919c55cac6c04b61488af425918c \
21                    sha256  0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269
22
23patchfiles          patch-tftpd-recvfrom.c.diff
24
25depends_lib         port:readline port:ncurses
26
27set tftp-root    ${prefix}/var/${name}/
28
29variant enable_upload description {If invoked with the server variant, tftp uploads \
30    are enabled; without the server variant, this variant has no effect} {}
31
32startupitem.name    tftpd
33
34variant server description {Install launchd scripts to run tftpd at system boot} {
35    startupitem.create    yes
36        if { ! [variant_isset enable_upload] } {
37            startupitem.executable    ${prefix}/sbin/tftpd -L -s ${tftp-root}
38        } else {
39            startupitem.executable  ${prefix}/sbin/tftpd -L -c -s ${tftp-root}
40        }
41}
42
43configure.args    --mandir=\\\${prefix}/share/man
44
45destroot.destdir    prefix=${destroot}${prefix}
46
47post-destroot    {
48    file rename ${destroot}${prefix}/sbin/in.tftpd \
49        ${destroot}${prefix}/sbin/tftpd
50
51    file delete ${destroot}${prefix}/share/man/man8/tftpd.8
52    file rename ${destroot}${prefix}/share/man/man8/in.tftpd.8 \
53        ${destroot}${prefix}/share/man/man8/tftpd.8
54
55    reinplace "s|in.tftpd|tftpd|g" \
56        ${destroot}${prefix}/share/man/man8/tftpd.8
57
58    xinstall -m 777 -d ${tftp-root}
59    destroot.keepdirs ${tftp-root}
60}
61
62# tftp-ha setup instructions
63notes "
64
65***** Setup Instructions *****
66
67NOTE: By default, tftp-hpa listens to the tftp port specified in /etc/services (port 69)
68      on all local addresses.
69
70To run tftpd manually for download only access, use this command:
71    sudo tftpd -L -s <tftp-root-dir>
72
73To run tftpd manually and support tftp uploads, add \"-c\" to the command:
74    sudo tftpd -L -c -s <tftp-root-dir>
75
76You may run tftpd at system boot using the startupitem if you installed tftp-hpa
77using the server variant.  To load the startupitem using launchctl:
78    sudo launchctl load -w /Library/LaunchDaemons/org.macports.tftpd.plist
79
80NOTE: When loading tftp-hpa using launchctl, make sure to place the files you want to serve
81in ${tftp-root}, because that is the location set in the StartupItem.
82
83*******************************
84
85If you wish to run tftpd in inetd mode, you may make an inetd compatible .plist
86file and replace the one installed by MacPorts in /Library/LaunchDaemons.  You
87may use /System/Library/LaunchDaemons/tftp.plist as a template.
88
89"
90
Note: See TracBrowser for help on using the repository browser.