40bd40c0d4
With this commit configuration via uci, similiar to the one used for OpenVPN, will be added to tinc. Most of the parameters are working just as described in the official manpages of tincd and tinc.conf as provided by its developer. The only exceptions are 'disabled' which if set to 1 will make the init script completely ignore this tinc network and/or tinc host and 'generate_keys' which if set to 1 will check whether a key pair is already present for the given tinc network and if not will generate them with the key size of "key_size" (default if not present: 2048) - this reduces the "effort" of setting up a tinc VPN on a router to just providing the right uci config file with no need of creating custom initialization scripts for for instance the key generation. Furthermore, similiar to the OpenVPN configuration, also tinc configs of its native format can be used. They just need to be placed in /etc/tinc/NETNAME. The init scripts will always copy the content of /etc/tinc/ to /tmp first and will append any parameters provided in /etc/config/tinc afterwards (the user needs to take care to not specify non-list parameters in both uci and native config). (Trivial note: not working URLs of old repositories have been removed from Makefile for downloading sources) git-svn-id: svn://svn.openwrt.org/openwrt/packages@29137 3c298f89-4303-0410-b956-a3cf2f4a3e73
56 lines
1.4 KiB
Makefile
56 lines
1.4 KiB
Makefile
#
|
|
# Copyright (C) 2007-2011 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:=tinc
|
|
PKG_VERSION:=1.0.16
|
|
PKG_RELEASE:=2
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=http://www.tinc-vpn.org/packages
|
|
PKG_MD5SUM:=f1c7ed94878725fb2cf4efb02bf160da
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/tinc
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
DEPENDS:=+liblzo +libopenssl +kmod-tun
|
|
TITLE:=VPN tunneling daemon
|
|
URL:=http://www.tinc-vpn.org/
|
|
SUBMENU:=VPN
|
|
endef
|
|
|
|
define Package/tinc/description
|
|
tinc is a Virtual Private Network (VPN) daemon that uses tunnelling and
|
|
encryption to create a secure private network between hosts on the Internet.
|
|
endef
|
|
|
|
TARGET_CFLAGS += -std=gnu99
|
|
|
|
CONFIGURE_ARGS += \
|
|
--with-kernel="$(LINUX_DIR)" \
|
|
--with-zlib="$(STAGING_DIR)/usr" \
|
|
--with-lzo-include="$(STAGING_DIR)/usr/include/lzo"
|
|
|
|
define Package/tinc/install
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tincd $(1)/usr/sbin/
|
|
$(INSTALL_DIR) $(1)/etc/init.d/
|
|
$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
$(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
|
|
$(INSTALL_DIR) $(1)/etc/openvpn
|
|
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
|
$(INSTALL_DATA) files/tinc.upgrade $(1)/lib/upgrade/keep.d/tinc
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,tinc))
|