[30693] trunk/dports/net/tftp-hpa/Portfile

source_changes at macosforge.org source_changes at macosforge.org
Sun Nov 4 09:57:04 PST 2007

Revision: 30693
Author:   digdog at macports.org
Date:     2007-11-04 09:57:03 -0800 (Sun, 04 Nov 2007)

Log Message:
bug: #13115

update to 0.48
add new maintainer

Modified Paths:

Modified: trunk/dports/net/tftp-hpa/Portfile
--- trunk/dports/net/tftp-hpa/Portfile	2007-11-04 11:04:18 UTC (rev 30692)
+++ trunk/dports/net/tftp-hpa/Portfile	2007-11-04 17:57:03 UTC (rev 30693)
@@ -1,10 +1,11 @@
 # $Id$
 PortSystem 1.0
 name		tftp-hpa
-version		0.40
+version		0.48
 categories	net
-maintainers	digdog at macports.org
+maintainers	markd at macports.org digdog at macports.org
 description	Enhanced port of the BSD TFTP server
 platforms	darwin freebsd
 long_description	tftp-hpa is an enhanced version of the BSD TFTP client \
@@ -15,8 +16,23 @@
 homepage	http://www.kernel.org/pub/software/network/tftp/
 master_sites	${homepage}
 use_bzip2	yes
-checksums	md5 bfcdd49bf94900e610f2cc937d8980ef
+checksums	md5 f2e0a1ca0c49ae46ecad26a54df3e887
+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 } {
+	startupitem.create	yes
+	startupitem.name	tftpd
+		if { ! [variant_isset enable_upload] } {
+			startupitem.executable	${prefix}/sbin/tftpd -L -s ${tftp-root}
+		} else {
+			startupitem.executable  ${prefix}/sbin/tftpd -L -c -s ${tftp-root}
+		}
 configure.args	--mandir=\\\${prefix}/share/man
 destroot.destdir	prefix=${destroot}${prefix}
@@ -28,21 +44,42 @@
 	file delete ${destroot}${prefix}/share/man/man8/tftpd.8
 	file rename ${destroot}${prefix}/share/man/man8/in.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}
-# Tell the user that the server needs to be used through (x)inetd/launchd
+# tftp-ha setup instructions
 post-install {
-        ui_msg "\nTo use tftpd, you'll need to modify settings in inetd.conf/xinetd.d/launchd"
-        ui_msg "depending on what you use on your system.\n\n"
-        ui_msg "For inetd, something like:"
-        ui_msg "tftp  dgram   udp  wait    nobody  ${prefix}/sbin/in.tftd  tftpd /private/tftpboot"
-        ui_msg "should do it. And tell inetd to reload its configuration.\n\n"
-        ui_msg "For xinetd (the default on Mac OS X 10.3), you should edit the file /etc/xinetd.d/tftp\n"
-        ui_msg "and change the server setting from /usr/libexec/tftpd to ${prefix}/sbin/in.tftd\n"
-        ui_msg "Then, use service(8) command to reload the xinetd configuration.\n\n"
-        ui_msg "For launchd (the default on Mac OS X 10.4 Tiger), you'll need to change the \n"
-        ui_msg "tftp.plist file in /System/Library/LaunchDaemons/. By changing the first string\n"
-        ui_msg "value inside the ProgramArguments key from /usr/libexec/tftpd to ${prefix}/sbin/in.tftd\n"
-        ui_msg "And start the server with the service(8) command.\n"
+	ui_msg "\n
+***** Setup Instructions *****
+To run tftpd manually for download only access, use this command:
+	sudo ${prefix}/sbin/tftpd -L -s <tftp-root-dir>
+To run tftpd manually and support tftp uploads, add \"-c\" to the command:
+	sudo ${prefix}/sbin/tftpd -L -c -s <tftp-root-dir>
+You may run tftpd at system boot on OS X 10.4 or 10.5 if you installed tftp-hpa
+using the server variant; if so, you may load it using launchctl:
+	sudo launchctl load -w /Library/LaunchDaemons/org.macports.tftpd.plist
+By default, tftp-hpa listens to the tftp port specified in /etc/services (port 69)
+on all local addresses.
+NOTE: When loading tftp-hpa using launchctl, make sure to place the files you want to serve
+in ${tftp-root}, because that is the location set by the StartupItem.
+If you wish to run tftpd in inetd mode, you may make an inetd compatible .plist
+file and replace the one installed by MacPorts in /Library/LaunchDaemons.  You
+may use /System/Library/LaunchDaemons/tftp.plist as a template.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071104/2ff3b4d4/attachment.html

More information about the macports-changes mailing list