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

Last change on this file was 139469, checked in by jmr@…, 2 years ago

ncurses: update to 6.0, rev bump dependents due to new ABI

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