summaryrefslogtreecommitdiffstats
path: root/abs/core/tftp-hpa
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/tftp-hpa
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/core/tftp-hpa')
-rw-r--r--abs/core/tftp-hpa/LICENSE32
-rw-r--r--abs/core/tftp-hpa/PKGBUILD29
-rw-r--r--abs/core/tftp-hpa/tftpd.conf4
-rwxr-xr-xabs/core/tftp-hpa/tftpd.rc38
4 files changed, 103 insertions, 0 deletions
diff --git a/abs/core/tftp-hpa/LICENSE b/abs/core/tftp-hpa/LICENSE
new file mode 100644
index 0000000..6dade69
--- /dev/null
+++ b/abs/core/tftp-hpa/LICENSE
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 1983, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
diff --git a/abs/core/tftp-hpa/PKGBUILD b/abs/core/tftp-hpa/PKGBUILD
new file mode 100644
index 0000000..cf1c9e0
--- /dev/null
+++ b/abs/core/tftp-hpa/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 37555 2009-05-02 22:51:20Z eric $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Contributor: Jose Javier <jojapa@terra.es>
+pkgname=tftp-hpa
+pkgver=5.0
+pkgrel=2
+pkgdesc="Official tftp server"
+arch=('i686' 'x86_64')
+url="http://www.kernel.org/pub/software/network/tftp/"
+license=('BSD')
+depends=('tcp_wrappers')
+conflicts=('netkit-tftp')
+backup=('etc/conf.d/tftpd')
+source=(http://www.kernel.org/pub/software/network/tftp/$pkgname-$pkgver.tar.gz tftpd.rc tftpd.conf LICENSE)
+md5sums=('1ae813a94670f0d8c294aafa9f5ecf65' 'a974d02526f19222146c8e3d3b598871'\
+ '414a79dc891bced056d99a9bb790fc9e' '6ce21e27b6fdc1a1adf85c81e42aeecf')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --mandir=/usr/share/man || return 1
+ make || return 1
+ make INSTALLROOT="${pkgdir}" install || return 1
+ install -d "${pkgdir}/etc/rc.d"
+ install -d "${pkgdir}/var/tftpboot"
+ install -m755 "${srcdir}/tftpd.rc" "${pkgdir}/etc/rc.d/tftpd" || return 1
+ install -D -m644 "${srcdir}/tftpd.conf" "${pkgdir}/etc/conf.d/tftpd" || return 1
+ rm "${pkgdir}/usr/share/man/man8/tftpd.8"
+ install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/abs/core/tftp-hpa/tftpd.conf b/abs/core/tftp-hpa/tftpd.conf
new file mode 100644
index 0000000..4705cc3
--- /dev/null
+++ b/abs/core/tftp-hpa/tftpd.conf
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to TFTPD
+#
+TFTPD_ARGS="-l -s /var/tftpboot"
diff --git a/abs/core/tftp-hpa/tftpd.rc b/abs/core/tftp-hpa/tftpd.rc
new file mode 100755
index 0000000..b21f87f
--- /dev/null
+++ b/abs/core/tftp-hpa/tftpd.rc
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+TFTPD_ARGS=
+[ -f /etc/conf.d/tftpd ] && . /etc/conf.d/tftpd
+
+PID=$(pidof -o %PPID /usr/sbin/in.tftpd)
+case "$1" in
+ start)
+ stat_busy "Starting TFTPD"
+ [ -z "$PID" ] && /usr/sbin/in.tftpd ${TFTPD_ARGS}
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon in.tftpd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping TFTPD"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon in.tftpd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0