description Enhanced port of the BSD TFTP server
long_description tftp-hpa is an enhanced version of the BSD TFTP client \
and server, possessing a number of bugfixes and enhancements \
over the original. It has been made portable and will work on \
pretty much any modern Unix variant.
homepage http://www.kernel.org/pub/software/network/tftp/
master_sites ${homepage}/tftp-hpa/
checksums rmd160 dc3935af75f2919c55cac6c04b61488af425918c \
sha256 0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269
patchfiles patch-tftpd-recvfrom.c.diff
depends_lib port:readline port:ncurses
set tftp-root ${prefix}/var/${name}/
variant enable_upload description {If invoked with the server variant, tftp uploads \
are enabled; without the server variant, this variant has no effect} {}
variant server description {Install launchd scripts to run tftpd at system boot} {
if { ! [variant_isset enable_upload] } {
startupitem.executable ${prefix}/sbin/tftpd -L -s ${tftp-root}
startupitem.executable ${prefix}/sbin/tftpd -L -c -s ${tftp-root}
configure.args --mandir=\\\${prefix}/share/man
destroot.destdir prefix=${destroot}${prefix}
file rename ${destroot}${prefix}/sbin/in.tftpd \
${destroot}${prefix}/sbin/tftpd
file delete ${destroot}${prefix}/share/man/man8/tftpd.8
file rename ${destroot}${prefix}/share/man/man8/in.tftpd.8 \
${destroot}${prefix}/share/man/man8/tftpd.8
reinplace "s|in.tftpd|tftpd|g" \
${destroot}${prefix}/share/man/man8/tftpd.8
xinstall -m 777 -d ${tftp-root}
destroot.keepdirs ${tftp-root}
# tftp-ha setup instructions