1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-20 07:38:40 +02:00
openwrt-packages/net/autossh/Makefile
Adrià Llaudet af31a192f8 autossh: add an 'enabled' option within the uci configuration file
In a tool like this one, you really want an option to establish if the service
should start or not by default on boot time, especially when its configuration
file has to be customized by the user.

In the configuration file, the new 'enabled' option is setted to '0' by default
since the configuration provided by default will not be the one finally used.

In the init script, the new 'enabled' option is setted to '1' by default in
order to support the previous configuration file behaviour.

Signed-off-by: Adrià Llaudet <adria.llaudet@gmail.com>
2018-04-11 20:22:17 +02:00

53 lines
1.3 KiB
Makefile

#
# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=autossh
PKG_VERSION:=1.4e
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://www.harding.motd.ca/autossh/
PKG_HASH:=9e8e10a59d7619176f4b986e256f776097a364d1be012781ea52e08d04679156
PKG_LICENSE:=0BSD
include $(INCLUDE_DIR)/package.mk
define Package/autossh
SECTION:=net
CATEGORY:=Network
TITLE:=Autossh client
URL:=http://www.harding.motd.ca/autossh/
MAINTAINER:=Christian Beier <cb@shoutrlabs.com>
SUBMENU:=SSH
endef
define Build/Compile
$(call Build/Compile/Default, -f Makefile \
CFLAGS="$(TARGET_CFLAGS) -Wall -D\"SSH_PATH=\\\"\$$$$(SSH)\\\"\" -D\"VER=\\\"\$$$$(VER)\\\"\"" \
all \
)
endef
define Package/autossh/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/autossh $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/autossh.init $(1)/etc/init.d/autossh
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/autossh.config $(1)/etc/config/autossh
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DATA) ./files/autossh.hotplug $(1)/etc/hotplug.d/iface/20-autossh
endef
define Package/autossh/conffiles
/etc/config/autossh
endef
$(eval $(call BuildPackage,autossh))