add autossh from Robert Berkowitz
add autossh from Robert Berkowitz

git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3547 3c298f89-4303-0410-b956-a3cf2f4a3e73

--- a/package/Config.in
+++ b/package/Config.in
@@ -15,6 +15,7 @@
 endmenu
 
 menu "Applications"
+source "package/autossh/Config.in"
 source "package/bitchx/Config.in"
 source "package/collectd/Config.in"
 source "package/cbtt/Config.in"

--- a/package/Makefile
+++ b/package/Makefile
@@ -11,6 +11,7 @@
 package-$(BR2_PACKAGE_ARPWATCH) += arpwatch
 package-$(BR2_PACKAGE_ASTERISK) += asterisk
 package-$(BR2_COMPILE_ATFTP) += atftp
+package-$(BR2_PACKAGE_AUTOSSH) += autossh
 package-$(BR2_COMPILE_AVAHI) += avahi
 package-$(BR2_COMPILE_BC) += bc
 package-$(BR2_COMPILE_BIND) += bind

--- /dev/null
+++ b/package/autossh/Config.in
@@ -1,1 +1,10 @@
+config BR2_PACKAGE_AUTOSSH
+	prompt "autossh........................... Auto handle ssh tunnels"
+	tristate
+	default m if CONFIG_DEVEL
+	help
+	      autossh is a program to start a copy of ssh and monitor it,
+	      restarting it as necessary should it die or stop passing traffic.
 
+	      http://www.harding.motd.ca/autossh/
+

--- /dev/null
+++ b/package/autossh/Makefile
@@ -1,1 +1,40 @@
+# $Id$
+#
+# Adjust SSH below to suit.
+#
+include $(TOPDIR)/rules.mk
 
+PKG_NAME:=autossh
+PKG_VERSION:=1.3
+PKG_RELEASE:=1
+PKG_MD5SUM:=0e7ec62eeca5d1b197f3ef2d0f0d417f
+PKG_SOURCE_URL:=http://www.harding.motd.ca/autossh
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+VER=1.3
+SSH=/usr/bin/ssh
+
+include $(TOPDIR)/package/rules.mk
+
+$(eval $(call PKG_template,AUTOSSH,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+
+$(PKG_BUILD_DIR)/.configured:
+	cp $(PKG_BUILD_DIR)/Makefile.linux $(PKG_BUILD_DIR)/Makefile
+	touch $@
+
+$(PKG_BUILD_DIR)/.built:
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) -Wall -D\"SSH_PATH=\\\"$(SSH)\\\"\" -D\"VER=\\\"$(PKG_VERSION)\\\"\"" \
+		BINDIR=/usr/bin MANDIR=/usr/man
+	touch $@
+
+$(IPKG_AUTOSSH):
+	mkdir -p $(IDIR_AUTOSSH)/usr/bin
+	cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_AUTOSSH)/usr/bin/
+	$(RSTRIP) $(IDIR_AUTOSSH)
+	$(IPKG_BUILD) $(IDIR_AUTOSSH) $(PACKAGE_DIR)
+

--- /dev/null
+++ b/package/autossh/ipkg/autossh.control
@@ -1,1 +1,6 @@
+Package: autossh
+Priority: optional
+Section: net
+Depends: openssh-client
+Description: Autossh client
 

comments