summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-11-10 09:02:40 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-11-10 09:02:40 +0000
commitda4748a3147b2c8d42ff18aa6f7d5cb03d209651 (patch)
tree00736d454c78253fadcf47d8a3b477ad90f45c9f
parentbf988ba9b1b17693a8b776935fb8c2ca35c57510 (diff)
downloadaports-da4748a3147b2c8d42ff18aa6f7d5cb03d209651.tar.bz2
aports-da4748a3147b2c8d42ff18aa6f7d5cb03d209651.tar.xz
testing/tftpd-hpa: new aport
Official tftp server http://www.kernel.org/pub/software/network/tftp/
-rw-r--r--testing/tftpd-hpa/APKBUILD32
-rw-r--r--testing/tftpd-hpa/in.tftpd.confd15
-rw-r--r--testing/tftpd-hpa/in.tftpd.initd21
3 files changed, 68 insertions, 0 deletions
diff --git a/testing/tftpd-hpa/APKBUILD b/testing/tftpd-hpa/APKBUILD
new file mode 100644
index 000000000..c507e2f68
--- /dev/null
+++ b/testing/tftpd-hpa/APKBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=tftp-hpa
+pkgver=5.0
+pkgrel=0
+pkgdesc="Official tftp server"
+url="http://www.kernel.org/pub/software/network/tftp/"
+license="BSD"
+depends=
+makedepends=
+subpackage="$pkgname-doc"
+source="http://www.kernel.org/pub/software/network/tftp/$pkgname-$pkgver.tar.gz
+ in.tftpd.initd
+ in.tftpd.confd
+ "
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man || return 1
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make INSTALLROOT="$pkgdir" install || return 1
+ install -d "$pkgdir"/var/tftpboot
+ install -Dm755 ../in.tftpd.initd "$pkgdir"/etc/init.d/in.tftpd
+ install -Dm755 ../in.tftpd.confd "$pkgdir"/etc/conf.d/in.tftpd
+}
+md5sums="1ae813a94670f0d8c294aafa9f5ecf65 tftp-hpa-5.0.tar.gz
+3430e0b0e42c3321689d2c87e73d0749 in.tftpd.initd
+914b43dd531176a8bb58fdb23d900fef in.tftpd.confd"
diff --git a/testing/tftpd-hpa/in.tftpd.confd b/testing/tftpd-hpa/in.tftpd.confd
new file mode 100644
index 000000000..5d74ac15f
--- /dev/null
+++ b/testing/tftpd-hpa/in.tftpd.confd
@@ -0,0 +1,15 @@
+# /etc/init.d/in.tftpd
+
+# Path to server files from
+# Depending on your application you may have to change this.
+INTFTPD_PATH="/var/tftpboot/"
+#INTFTPD_PATH="/var/tftp/"
+#INTFTPD_PATH="/tftpboot/"
+#INTFTPD_PATH="/tftproot/"
+
+# For more options, see in.tftpd(8)
+# -R 4096:32767 solves problems with ARC firmware, and obsoletes
+# the /proc/sys/net/ipv4/ip_local_port_range hack.
+# -s causes $INTFTPD_PATH to be the root of the TFTP tree.
+# -l is passed by the init script in addition to these options.
+INTFTPD_OPTS="-R 4096:32767 -s ${INTFTPD_PATH}"
diff --git a/testing/tftpd-hpa/in.tftpd.initd b/testing/tftpd-hpa/in.tftpd.initd
new file mode 100644
index 000000000..c8657634b
--- /dev/null
+++ b/testing/tftpd-hpa/in.tftpd.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/tftp-hpa/files/in.tftpd.rc6,v 1.2 2005/07/30 06:29:14 vapier Exp $
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting tftpd"
+ /usr/sbin/in.tftpd -l ${INTFTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tftpd"
+ start-stop-daemon --stop --exec /usr/sbin/in.tftpd
+ eend $?
+}