]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Added tftp-hpa as a package.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 16 Jul 2008 13:55:31 +0000 (13:55 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 16 Jul 2008 13:55:31 +0000 (13:55 +0000)
config/rootfiles/packages/tftp-hpa [new file with mode: 0644]
lfs/tftp-hpa [new file with mode: 0644]
make.sh
src/initscripts/init.d/tftpd [new file with mode: 0644]
src/paks/tftp-hpa/install.sh [new file with mode: 0644]
src/paks/tftp-hpa/uninstall.sh [new file with mode: 0644]
src/paks/tftp-hpa/update.sh [new file with mode: 0644]

diff --git a/config/rootfiles/packages/tftp-hpa b/config/rootfiles/packages/tftp-hpa
new file mode 100644 (file)
index 0000000..98e78d8
--- /dev/null
@@ -0,0 +1,6 @@
+etc/init.d/tftpd
+#usr/man/man1/tftp.1
+#usr/man/man8/in.tftpd.8
+#usr/man/man8/tftpd.8
+usr/sbin/tftpd
+var/tftpboot
diff --git a/lfs/tftp-hpa b/lfs/tftp-hpa
new file mode 100644 (file)
index 0000000..c82747a
--- /dev/null
@@ -0,0 +1,86 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 0.48
+
+THISAPP    = tftp-hpa-$(VER)
+DL_FILE    = $(THISAPP).tar.bz2
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = tftp-hpa
+PAK_VER    = 1
+
+DEPS       = ""
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = f2e0a1ca0c49ae46ecad26a54df3e887
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+dist: 
+       @$(PAK)
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+       @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+       @$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+       @$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && ./configure --prefix=/usr --without-tcpwrappers
+       cd $(DIR_APP) && make $(MAKETUNING)
+       cd $(DIR_APP) && make install
+       mv -fv /usr/sbin/in.tftpd /usr/sbin/tftpd
+       -mkdir /var/tftpboot
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index d777da4b379e03140ae54fe80e3bbd10dc0bf41d..daeb45444ce0c0abd58fe2422ab9de8ffc8faafa 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -585,6 +585,7 @@ buildipfire() {
   ipfiremake wpa_supplicant
   ipfiremake hostapd
   ipfiremake urlgrabber
+  ipfiremake tftp-hpa
   echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild
   cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild
   echo >> $BASEDIR/build/var/ipfire/firebuild
diff --git a/src/initscripts/init.d/tftpd b/src/initscripts/init.d/tftpd
new file mode 100644 (file)
index 0000000..3abf00c
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/tftpd
+#
+# Description : This script controls the tftpd server
+#
+# Authors     : Michael Tremer <ms@ipfire.org>
+#
+# Version     : 01.00
+#
+# Notes       :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+       start)
+               boot_mesg "Starting tftpd-hpa Server..."
+               loadproc /usr/sbin/tftpd -l -s /var/tftpboot
+               ;;
+
+       stop)
+               boot_mesg "Stopping tftpd-hpa Server..."
+               killproc /usr/sbin/tftpd
+               ;;
+
+       restart)
+               ${0} stop
+               sleep 1
+               ${0} start
+               ;;
+
+       status)
+               statusproc /usr/sbin/tftpd
+               ;;
+
+       *)
+               echo "Usage: ${0} {start|stop|restart|status}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/tftpd
diff --git a/src/paks/tftp-hpa/install.sh b/src/paks/tftp-hpa/install.sh
new file mode 100644 (file)
index 0000000..6930b90
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+extract_files
+restore_backup ${NAME}
+start_service --background ${NAME}
+ln -svf  ../init.d/tftpd /etc/rc.d/rc0.d/K00tftpd
+ln -svf  ../init.d/tftpd /etc/rc.d/rc3.d/S99tftpd
+ln -svf  ../init.d/tftpd /etc/rc.d/rc6.d/K00tftpd
diff --git a/src/paks/tftp-hpa/uninstall.sh b/src/paks/tftp-hpa/uninstall.sh
new file mode 100644 (file)
index 0000000..95e70be
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+stop_service ${NAME}
+make_backup ${NAME}
+remove_files
+rm -rf /etc/rc.d/rc*.d/*tftpd
diff --git a/src/paks/tftp-hpa/update.sh b/src/paks/tftp-hpa/update.sh
new file mode 100644 (file)
index 0000000..89c40d0
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh