* An optional PKG_LICENSE_FILES tag including the filenames of the license-files in the source-package.
(E.g.: PKG_LICENSE_FILES:=COPYING)
* PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE.
+* Avoid reuse of PKG_NAME in call, define and eval lines to improve readability.
#### Commits in your pull-requests should:
--- /dev/null
+# openwisp.org
+#
+# This is free software, licensed under the GNU General Public License v3.
+# See /LICENSE for more information.
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=openwisp-config
+PKG_VERSION:=0.4.5
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/openwisp/openwisp-config.git
+PKG_SOURCE_VERSION:=0.4.5
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_MIRROR_HASH:=017a8ed35ebfda2805426e7da02559d5cc2845ee9ded60fdae8e848d377424fb
+PKG_LICENSE:=GPL-3.0
+PKGARCH:=all
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/openwisp-config/default
+ TITLE:=Remote configuration management agent ($(2) variant)
+ CATEGORY:=Administration
+ SECTION:=admin
+ SUBMENU:=openwisp
+ DEPENDS:=+curl +lua +libuci-lua +luafilesystem $(3)
+ VARIANT:=$(1)
+ MAINTAINER:=Federico Capoano <f.capoano@cineca.it>
+ URL:=http://openwisp.org
+endef
+
+Package/openwisp-config-openssl=$(call Package/openwisp-config/default,openssl,OpenSSL,+ca-certificates +libopenssl)
+Package/openwisp-config-mbedtls=$(call Package/openwisp-config/default,mbedtls,mbedTLS,+ca-certificates +libmbedtls)
+Package/openwisp-config-cyassl=$(call Package/openwisp-config/default,cyassl,CyaSSL,+ca-certificates +libcyassl)
+# deprecated on recent versions of OpenWRT (>= Designated Driver) and LEDE (>= 17.01)
+Package/openwisp-config-polarssl=$(call Package/openwisp-config/default,polarssl,PolarSSL,+ca-certificates +libpolarssl)
+Package/openwisp-config-nossl=$(call Package/openwisp-config/default,nossl,No SSL)
+
+define Build/Compile
+endef
+
+define Package/openwisp-config-$(BUILD_VARIANT)/conffiles
+/etc/config/openwisp
+endef
+
+ifeq ($(BUILD_VARIANT),openssl)
+CONFIG_OPENWISP_UCI:=ssl
+endif
+ifeq ($(BUILD_VARIANT),mbedtls)
+CONFIG_OPENWISP_UCI:=ssl
+endif
+ifeq ($(BUILD_VARIANT),cyassl)
+CONFIG_OPENWISP_UCI:=ssl
+endif
+ifeq ($(BUILD_VARIANT),polarssl)
+CONFIG_OPENWISP_UCI:=ssl
+endif
+ifeq ($(BUILD_VARIANT),nossl)
+CONFIG_OPENWISP_UCI:=nossl
+endif
+
+
+define Package/openwisp-config-$(BUILD_VARIANT)/install
+ $(INSTALL_DIR) \
+ $(1)/usr/sbin \
+ $(1)/etc/init.d \
+ $(1)/etc/config \
+ $(1)/etc/openwisp \
+ $(1)/usr/lib/lua/openwisp
+
+ $(INSTALL_BIN) \
+ $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \
+ $(1)/usr/sbin/openwisp_config
+
+ $(INSTALL_BIN) \
+ $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \
+ $(1)/etc/init.d/openwisp_config
+
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwisp-config/files/openwisp-$(CONFIG_OPENWISP_UCI).config \
+ $(1)/etc/config/openwisp
+
+ $(INSTALL_BIN) \
+ $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-reload-config \
+ $(1)/usr/sbin/openwisp-reload-config
+
+ $(INSTALL_BIN) \
+ $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/utils.lua \
+ $(1)/usr/lib/lua/openwisp/utils.lua
+
+ $(INSTALL_BIN) \
+ $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-store-unmanaged.lua \
+ $(1)/usr/sbin/openwisp-store-unmanaged
+
+ $(INSTALL_BIN) \
+ $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-restore-unmanaged.lua \
+ $(1)/usr/sbin/openwisp-restore-unmanaged
+
+ $(INSTALL_BIN) \
+ $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-remove-default-wifi.lua \
+ $(1)/usr/sbin/openwisp-remove-default-wifi
+
+ $(INSTALL_BIN) \
+ $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-uci-autoname.lua \
+ $(1)/usr/sbin/openwisp-uci-autoname
+
+ $(INSTALL_BIN) \
+ $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-update-config.lua \
+ $(1)/usr/sbin/openwisp-update-config
+
+ $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/etc/openwisp/
+endef
+
+$(eval $(call BuildPackage,openwisp-config-openssl))
+$(eval $(call BuildPackage,openwisp-config-mbedtls))
+$(eval $(call BuildPackage,openwisp-config-cyassl))
+$(eval $(call BuildPackage,openwisp-config-polarssl))
+$(eval $(call BuildPackage,openwisp-config-nossl))
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)
+define Package/lua-mosquitto
SUBMENU:=Lua
SECTION:=lang
CATEGORY:=Languages
MAINTAINER:=Karl Palsson <karlp@remake.is>
endef
-define Package/$(PKG_NAME)/description
+define Package/lua-mosquitto/description
Lua bindings to libmosquitto
endef
-define Package/$(PKG_NAME)/install
+define Package/lua-mosquitto/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mosquitto.so $(1)/usr/lib/lua
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,lua-mosquitto))
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)
+define Package/lua-openssl
SUBMENU:=Lua
SECTION:=lang
CATEGORY:=Languages
A free, MIT-licensed OpenSSL binding for Lua.
endef
-define Package/$(PKG_NAME)/install
+define Package/lua-openssl/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openssl.so $(1)/usr/lib/lua/
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,lua-openssl))
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)
+define Package/lua-penlight
SUBMENU:=Lua
SECTION:=lang
CATEGORY:=Languages
MAINTAINER:= Karl Palsson <karlp@remake.is>
endef
-define Package/$(PKG_NAME)/description
+define Package/lua-penlight/description
It is often said of Lua that it does not include batteries.
Penlight is the batteries.
endef
echo "Nothing to compile, pure lua package"
endef
-define Package/$(PKG_NAME)/install
+define Package/lua-penlight/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(CP) $(PKG_BUILD_DIR)/lua/pl $(1)/usr/lib/lua
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,lua-penlight))
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)/Default
+define Package/libarchive/Default
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+zlib +liblzma +libbz2 +libexpat
URL:=http://www.libarchive.org/
endef
-define Package/$(PKG_NAME)
- $(call Package/$(PKG_NAME)/Default)
+define Package/libarchive
+ $(call Package/libarchive/Default)
DEPENDS += +libopenssl
endef
-define Package/$(PKG_NAME)-noopenssl
- $(call Package/$(PKG_NAME)/Default)
+define Package/libarchive-noopenssl
+ $(call Package/libarchive/Default)
TITLE += (without OpenSSL dependency)
VARIANT:=noopenssl
endef
$(CP) $(PKG_INSTALL_DIR)/usr/bin/bsdtar $(1)/usr/bin
endef
-Package/$(PKG_NAME)-noopenssl/install = $(Package/$(PKG_NAME)/install)
+Package/libarchive-noopenssl/install = $(Package/libarchive/install)
$(eval $(call BuildPackage,libarchive))
$(eval $(call BuildPackage,libarchive-noopenssl))
# CMAKE_OPTIONS += -DLWS_WITHOUT_DEBUG=ON
-define Package/$(PKG_NAME)/Default
+define Package/libwebsockets/Default
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libwebsockets
endef
define Package/libwebsockets-openssl
- $(call Package/$(PKG_NAME)/Default)
+ $(call Package/libwebsockets/Default)
TITLE += (OpenSSL)
DEPENDS += +libopenssl
VARIANT:=openssl
endef
define Package/libwebsockets-cyassl
- $(call Package/$(PKG_NAME)/Default)
+ $(call Package/libwebsockets/Default)
TITLE += (CyaSSL)
DEPENDS += +libcyassl
VARIANT:=cyassl
endef
define Package/libwebsockets-full
- $(call Package/$(PKG_NAME)/Default)
+ $(call Package/libwebsockets/Default)
TITLE += (Full - OpenSSL, libuv, plugins, CGI)
DEPENDS += +libopenssl +libuv
VARIANT:=full
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebsockets.so* $(1)/usr/lib/
endef
-Package/$(PKG_NAME)-cyassl/install = $(Package/$(PKG_NAME)/install)
-Package/$(PKG_NAME)-openssl/install = $(Package/$(PKG_NAME)/install)
-Package/$(PKG_NAME)-full/install = $(Package/$(PKG_NAME)/install)
+Package/libwebsockets-cyassl/install = $(Package/libwesockets/install)
+Package/libwebsockets-openssl/install = $(Package/libwebsockets/install)
+Package/libwesockets-full/install = $(Package/libwebsockets/install)
$(eval $(call BuildPackage,libwebsockets-openssl))
$(eval $(call BuildPackage,libwebsockets-cyassl))
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)
+define Package/musl-fts
SECTION:=libs
CATEGORY:=Libraries
TITLE:=fts implementation for musl libc
DEPENDS:= +libpthread
endef
-define Package/$(PKG_NAME)/description
+define Package/musl-fts/description
The musl-fts package implements the fts(3) functions fts_open, fts_read, fts_children, fts_set and fts_close, which are missing in musl libc.
endef
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/musl-fts.pc $(1)/usr/lib/pkgconfig/
endef
-define Package/$(PKG_NAME)/install
+define Package/musl-fts/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfts.so* $(1)/usr/lib/
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,musl-fts))
include $(TOPDIR)/rules.mk
PKG_NAME:=dovecot
-PKG_VERSION:=2.2.26.0
+PKG_VERSION:=2.2.28
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2
-PKG_MD5SUM:=85bc42328de41d1eb8d6d3f1db666db8
+PKG_HASH:=e0288f59e326ab87cb3881fdabadafe542f4dc7ab9996db13863a439ebbc1f25
PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
define Package/dovecot
SECTION:=mail
CATEGORY:=Mail
- DEPENDS:=+DOVECOT_LDAP:libopenldap +libopenssl +librt +zlib +libbz2 +libcap
+ DEPENDS:=+DOVECOT_LDAP:libopenldap +DOVECOT_SQLITE:libsqlite3 +libopenssl +librt +zlib +libbz2 +libcap
TITLE:=An IMAP and POP3 daemon
- MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+ MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
URL:=http://www.dovecot.org/
USERID:=dovecot=59:dovecot=59
endef
default n
help
Implements LDAP support in dovecot.
+ config DOVECOT_SQLITE
+ bool "SQLite support"
+ default n
+ help
+ Implements SQLite DB support in dovecot.
endmenu
endef
--with-moduledir=/usr/lib/dovecot/modules \
--with-notify=dnotify \
--without-lzma \
- --without-lz4
-
-ifneq ($(strip $(CONFIG_DOVECOT_LDAP)),)
- CONFIGURE_ARGS+= \
- --with-ldap=yes
-else
- CONFIGURE_ARGS+= \
- --with-ldap=no
-endif
+ --without-lz4 \
+ --with-icu=no \
+ $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
+ $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no)
CONFIGURE_VARS += \
RPCGEN= \
include $(TOPDIR)/rules.mk
PKG_NAME:=postfix
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=ftp://ftp.porcupine.org/mirrors/postfix-release/official/
PKG_VERSION:=3.1.4
PKG_MD5SUM:=878a059d92ee3b093d7d3e97248c915d
CATEGORY:=Mail
TITLE:=Postfix Mail Transmit Agent
URL:=http://www.postfix.org/
- DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_EAI:icu +libpcre
+ DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_SQLITE:libsqlite3 +POSTFIX_EAI:icu +libpcre
endef
define Package/postfix/description
default y
help
Implements support for cdb files using tinycdb
+ config POSTFIX_SQLITE
+ bool "SQLITE support"
+ default y
+ help
+ Implements support for SQLite3 DB
config POSTFIX_EAI
bool "SMTPUTF8 support"
default n
CCARGS+=-DNO_DB
endif
+ifdef CONFIG_POSTFIX_SQLITE
+ CCARGS+=-DHAS_SQLITE -I$(STAGING_DIR)/usr/include/
+ AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lsqlite3 -lpthread
+endif
+
ifdef CONFIG_POSTFIX_EAI
AUXLIBS+=-licuuc
CCARGS+=-DHAS_EAI
--- /dev/null
+--- a/src/posttls-finger/posttls-finger.c
++++ b/src/posttls-finger/posttls-finger.c
+@@ -318,6 +318,7 @@
+ #include <sys/un.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
++#include <stdio.h>
+
+ #ifdef STRCASECMP_IN_STRINGS_H
+ #include <strings.h>
TARGET_CFLAGS += $(TARGET_CPPFLAGS)
-define Package/$(PKG_NAME)
+define Package/ssmtp
SECTION:=mail
CATEGORY:=Mail
DEPENDS:=+libopenssl
URL:=http://packages.debian.org/ssmtp
endef
-define Package/$(PKG_NAME)/description
+define Package/ssmtp/description
A secure, effective and simple way of getting mail off a system to your mail hub.
Mail is simply forwarded to the configured mailhost, no daemons running in the background.
Extremely easy configuration.
endef
-define Package/$(PKG_NAME)/conffiles
+define Package/ssmtp/conffiles
/etc/ssmtp/ssmtp.conf
/etc/ssmtp/revaliases
endef
CONFIGURE_ARGS += \
--enable-ssl
-define Package/$(PKG_NAME)/install
+define Package/ssmtp/install
$(INSTALL_DIR) $(1)/etc/ssmtp
$(INSTALL_CONF) $(PKG_BUILD_DIR)/ssmtp.conf $(1)/etc/ssmtp/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/revaliases $(1)/etc/ssmtp/
ln -s /usr/sbin/ssmtp $(1)/usr/sbin/sendmail
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,ssmtp))
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)
+define Package/adblock
SECTION:=net
CATEGORY:=Network
TITLE:=Powerful adblock script to block ad/abuse domains
PKGARCH:=all
endef
-define Package/$(PKG_NAME)/description
+define Package/adblock/description
Powerful adblock script to block ad/abuse domains via dnsmasq or unbound dns backend.
The script supports many domain blacklist sites plus manual black- and whitelist overrides.
Please see https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md for further information.
endef
-define Package/$(PKG_NAME)/conffiles
+define Package/adblock/conffiles
/etc/config/adblock
/etc/adblock/adblock.whitelist
/etc/adblock/adblock.blacklist
define Build/Compile
endef
-define Package/$(PKG_NAME)/install
+define Package/adblock/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) ./files/adblock.sh $(1)/usr/bin/
$(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock/
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,adblock))
# no default dependencies
PKG_DEFAULT_DEPENDS=
-define Package/$(PKG_NAME)/Default
+define Package/ddns-scripts/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=IP Addresses and Names
endef
###### *************************************************************************
-define Package/$(PKG_NAME)
- $(call Package/$(PKG_NAME)/Default)
+define Package/ddns-scripts
+ $(call Package/ddns-scripts/Default)
TITLE:=Dynamic DNS Client scripts (with IPv6 support)
endef
# shown in LuCI package description
-define Package/$(PKG_NAME)/description
+define Package/ddns-scripts/description
Dynamic DNS Client scripts (with IPv6 support) - Info: http://wiki.openwrt.org/doc/howto/ddns.client
endef
# shown in menuconfig <Help>
-define Package/$(PKG_NAME)/config
+define Package/ddns-scripts/config
help
A highly configurable set of scripts for doing dynamic dns updates.
- IPv6 support
endef
###### *************************************************************************
-define Package/$(PKG_NAME)_cloudflare
- $(call Package/$(PKG_NAME)/Default)
+define Package/ddns-scripts_cloudflare
+ $(call Package/ddns-scripts/Default)
TITLE:=CloudFlare.com API v1 (deprecated)
- DEPENDS:=$(PKG_NAME)
+ DEPENDS:=ddns-scripts
endef
-define Package/$(PKG_NAME)_cloudflare/description
+define Package/ddns-scripts_cloudflare/description
Dynamic DNS Client scripts extension for CloudFlare.com API-v1 (deprecated)
endef
###### *************************************************************************
-define Package/$(PKG_NAME)_cloudflare.com-v4
- $(call Package/$(PKG_NAME)/Default)
+define Package/ddns-scripts_cloudflare.com-v4
+ $(call Package/ddns-scripts/Default)
TITLE:=CloudFlare.com API v4 (require cURL)
- DEPENDS:=$(PKG_NAME) +curl
+ DEPENDS:=ddns-scripts +curl
endef
-define Package/$(PKG_NAME)_cloudflare.com-v4/description
+define Package/ddns-scripts_cloudflare.com-v4/description
Dynamic DNS Client scripts extension for CloudFlare.com API-v4 (require/install cURL)
endef
###### *************************************************************************
-define Package/$(PKG_NAME)_godaddy.com-v1
- $(call Package/$(PKG_NAME)/Default)
+define Package/ddns-scripts_godaddy.com-v1
+ $(call Package/ddns-scripts/Default)
TITLE:=GoDaddy.com (require cURL)
- DEPENDS:=$(PKG_NAME) +curl
+ DEPENDS:=ddns-scripts +curl
endef
-define Package/$(PKG_NAME)_godaddy.com-v1/description
+define Package/ddns-scripts_godaddy.com-v1/description
Dynamic DNS Client scripts extension for GoDaddy.com (require/install cURL)
endef
###### *************************************************************************
-define Package/$(PKG_NAME)_no-ip_com
- $(call Package/$(PKG_NAME)/Default)
+define Package/ddns-scripts_no-ip_com
+ $(call Package/ddns-scripts/Default)
TITLE:=DDNS extension for No-IP.com
- DEPENDS:=$(PKG_NAME)
+ DEPENDS:=ddns-scripts
endef
-define Package/$(PKG_NAME)_no-ip_com/description
+define Package/ddns-scripts_no-ip_com/description
Dynamic DNS Client scripts extension for No-IP.com
endef
###### *************************************************************************
-define Package/$(PKG_NAME)_nsupdate
- $(call Package/$(PKG_NAME)/Default)
+define Package/ddns-scripts_nsupdate
+ $(call Package/ddns-scripts/Default)
TITLE:=DDNS extension using Bind nsupdate
- DEPENDS:=$(PKG_NAME) +bind-client
+ DEPENDS:=ddns-scripts +bind-client
endef
-define Package/$(PKG_NAME)_nsupdate/description
+define Package/ddns-scripts_nsupdate/description
Dynamic DNS Client scripts extension for direct updates using Bind nsupdate
endef
-define Package/$(PKG_NAME)_nsupdate/config
+define Package/ddns-scripts_nsupdate/config
help
The script directly updates a PowerDNS (or maybe bind server) via nsupdate
from bind-client package. It requires
gzip -f9 $(PKG_BUILD_DIR)/files/public_suffix_list.dat
endef
-define Package/$(PKG_NAME)/conffiles
+define Package/ddns-scripts/conffiles
/etc/config/ddns
endef
###### *************************************************************************
-define Package/$(PKG_NAME)/preinst
+define Package/ddns-scripts/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)/install
+define Package/ddns-scripts/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dynamic_dns_*.sh $(1)/usr/lib/ddns
endef
-define Package/$(PKG_NAME)/postinst
+define Package/ddns-scripts/postinst
#!/bin/sh
# if NOT run buildroot and PKG_UPGRADE then (re)start service if enabled
[ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] && {
}
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)/prerm
+define Package/ddns-scripts/prerm
#!/bin/sh
# if run within buildroot exit
[ -n "$${IPKG_INSTROOT}" ] && exit 0
endef
###### *************************************************************************
-define Package/$(PKG_NAME)_cloudflare/preinst
+define Package/ddns-scripts_cloudflare/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)_cloudflare/install
+define Package/ddns-scripts_cloudflare/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare
$(INSTALL_DIR) $(1)/usr/share
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v1.sh $(1)/usr/lib/ddns
endef
-define Package/$(PKG_NAME)_cloudflare/postinst
+define Package/ddns-scripts_cloudflare/postinst
#!/bin/sh
# remove old services file entries
/bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
}
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)_cloudflare/prerm
+define Package/ddns-scripts_cloudflare/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
endef
###### *************************************************************************
-define Package/$(PKG_NAME)_cloudflare.com-v4/preinst
+define Package/ddns-scripts_cloudflare.com-v4/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)_cloudflare.com-v4/install
+define Package/ddns-scripts_cloudflare.com-v4/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare.com-v4
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v4.sh $(1)/usr/lib/ddns
endef
-define Package/$(PKG_NAME)_cloudflare.com-v4/postinst
+define Package/ddns-scripts_cloudflare.com-v4/postinst
#!/bin/sh
# remove old services file entries
/bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
}
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)_cloudflare.com-v4/prerm
+define Package/ddns-scripts_cloudflare.com-v4/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
endef
###### *************************************************************************
-define Package/$(PKG_NAME)_godaddy.com-v1/preinst
+define Package/ddns-scripts_godaddy.com-v1/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)_godaddy.com-v1/install
+define Package/ddns-scripts_godaddy.com-v1/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_godaddy.com-v1
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_godaddy_com_v1.sh $(1)/usr/lib/ddns
endef
-define Package/$(PKG_NAME)_godaddy.com-v1/postinst
+define Package/ddns-scripts_godaddy.com-v1/postinst
#!/bin/sh
# remove old services file entries
/bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
}
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)_godaddy.com-v1/prerm
+define Package/ddns-scripts_godaddy.com-v1/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
endef
###### *************************************************************************
-define Package/$(PKG_NAME)_no-ip_com/preinst
+define Package/ddns-scripts_no-ip_com/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)_no-ip_com/install
+define Package/ddns-scripts_no-ip_com/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_no-ip_com
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_no-ip_com.sh $(1)/usr/lib/ddns
endef
-define Package/$(PKG_NAME)_no-ip_com/postinst
+define Package/ddns-scripts_no-ip_com/postinst
#!/bin/sh
# remove old services file entries
/bin/sed -i '/no-ip\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
}
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)_no-ip_com/prerm
+define Package/ddns-scripts_no-ip_com/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
endef
###### *************************************************************************
-define Package/$(PKG_NAME)_nsupdate/preinst
+define Package/ddns-scripts_nsupdate/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)_nsupdate/install
+define Package/ddns-scripts_nsupdate/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_nsupdate
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_nsupdate.sh $(1)/usr/lib/ddns
endef
-define Package/$(PKG_NAME)_nsupdate/postinst
+define Package/ddns-scripts_nsupdate/postinst
#!/bin/sh
# remove old services file entries
/bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
}
exit 0 # suppress errors
endef
-define Package/$(PKG_NAME)_nsupdate/prerm
+define Package/ddns-scripts_nsupdate/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
endef
###### *************************************************************************
-$(eval $(call BuildPackage,$(PKG_NAME)))
-$(eval $(call BuildPackage,$(PKG_NAME)_cloudflare))
-$(eval $(call BuildPackage,$(PKG_NAME)_cloudflare.com-v4))
-$(eval $(call BuildPackage,$(PKG_NAME)_godaddy.com-v1))
-$(eval $(call BuildPackage,$(PKG_NAME)_no-ip_com))
-$(eval $(call BuildPackage,$(PKG_NAME)_nsupdate))
+$(eval $(call BuildPackage,ddns-scripts))
+$(eval $(call BuildPackage,ddns-scripts_cloudflare))
+$(eval $(call BuildPackage,ddns-scripts_cloudflare.com-v4))
+$(eval $(call BuildPackage,ddns-scripts_godaddy.com-v1))
+$(eval $(call BuildPackage,ddns-scripts_no-ip_com))
+$(eval $(call BuildPackage,ddns-scripts_nsupdate))
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)
+define Package/dynapoint
SECTION:=net
CATEGORY:=Network
SUBMENU:=wireless
TITLE:=Dynamic access point manager
endef
-define Package/$(PKG_NAME)/description
+define Package/dynapoint/description
Dynapoint uses LUA scripts to allow dynamic access point creation
and deletion depending on changes of certain network conditions.
endef
-define Package/$(PKG_NAME)/conffiles
+define Package/dynapoint/conffiles
/etc/config/dynapoint
endef
define Build/Compile
endef
-define Package/$(PKG_NAME)/install
+define Package/dynapoint/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./src/dynapoint.lua $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DATA) ./src/dynapoint.config $(1)/etc/config/dynapoint
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,dynapoint))
PKG_NAME:=mwan3
PKG_VERSION:=2.0
-PKG_RELEASE:=3
-PKG_MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com>
+PKG_RELEASE:=4
+PKG_MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com>, \
+ Florian Eckert <fe@dev.tdt.de>
PKG_LICENSE:=GPLv2
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Routing and Redirection
DEPENDS:=+ip +ipset +iptables +iptables-mod-conntrack-extra +iptables-mod-ipopt
TITLE:=Multiwan hotplug script with connection tracking support
- MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com>
+ MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com>, \
+ Florian Eckert <fe@dev.tdt.de>
PKGARCH:=all
endef
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)
+define Package/privoxy
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
endef
# shown in LuCI package description
-define Package/$(PKG_NAME)/description
+define Package/privoxy/description
$(TITLE) - Homepage: www.privoxy.org
endef
# shown in make menuconfig <Help>
-define Package/$(PKG_NAME)/config
+define Package/privoxy/config
help
Privoxy is a web proxy with advanced filtering capabilities for protecting
privacy, modifying web page content, managing cookies, controlling access,
# needed otherwise errors during compile
MAKE_FLAGS:=
-define Package/$(PKG_NAME)/conffiles
+define Package/privoxy/conffiles
/etc/config/privoxy
/etc/privoxy/user.action
/etc/privoxy/user.filter
/etc/privoxy/user.trust
endef
-define Package/$(PKG_NAME)/preinst
+define Package/privoxy/preinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] && exit 0 # if run within buildroot exit
exit 0 # suppress errors from stop command
endef
-define Package/$(PKG_NAME)/install
+define Package/privoxy/install
if [ -f $(PKG_INSTALL_DIR)/etc/privoxy/trust ]; then \
mv -f $(PKG_INSTALL_DIR)/etc/privoxy/trust $(PKG_INSTALL_DIR)/etc/privoxy/user.trust; \
fi
$(INSTALL_CONF) ./files/privoxy.config $(1)/etc/config/privoxy
endef
-define Package/$(PKG_NAME)/postinst
+define Package/privoxy/postinst
#!/bin/sh
grep -i privoxy $${IPKG_INSTROOT}/etc/services >/dev/null 2>&1 || \
echo -e "privoxy\t8118" >> $${IPKG_INSTROOT}/etc/services
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,privoxy))
# no default dependencies
PKG_DEFAULT_DEPENDS:=
-define Package/$(PKG_NAME)/Default
+define Package/radicale/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
PKGARCH:=all
USERID:=radicale=5232:radicale=5232
endef
-define Package/$(PKG_NAME)-py2
- $(call Package/$(PKG_NAME)/Default)
+define Package/radicale-py2
+ $(call Package/radicale/Default)
TITLE+= (Python 2)
VARIANT:=2
DEPENDS:=+python-logging +python-openssl +python-xml +python-codecs
endef
-define Package/$(PKG_NAME)-py3
- $(call Package/$(PKG_NAME)/Default)
+define Package/radicale-py3
+ $(call Package/radicale/Default)
TITLE+= (Python 3)
VARIANT:=3
DEPENDS:=+python3-logging +python3-openssl +python3-xml +python3-codecs +python3-email
endef
# shown in LuCI package description
-define Package/$(PKG_NAME)-py2/description
+define Package/radicale-py2/description
Radicale CalDAV/CardDAV server (Python 2) - Homepage: http://radicale.org/
endef
-define Package/$(PKG_NAME)-py3/description
+define Package/radicale-py3/description
Radicale CalDAV/CardDAV server (Python 3) - Homepage: http://radicale.org/
endef
# shown in make menuconfig <Help>
-define Package/$(PKG_NAME)-py2/config
+define Package/radicale-py2/config
help
The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server.
It aims to be a light solution, easy to use, easy to install, easy to configure.
Version : $(PKG_VERSION)
Homepage: http://radicale.org/
endef
-Package/$(PKG_NAME)-py3/config = $(Package/$(PKG_NAME)-py2/config)
+Package/radicale-py3/config = $(Package/radicale-py2/config)
-define Package/$(PKG_NAME)-py2/conffiles
+define Package/radicale-py2/conffiles
/etc/config/radicale
/etc/radicale/users
/etc/radicale/rights
endef
-Package/$(PKG_NAME)-py3/conffiles = $(Package/$(PKG_NAME)-py2/conffiles)
+Package/radicale-py3/conffiles = $(Package/radicale-py2/conffiles)
define Build/Configure
# nothing to configure
# nothing to compile
endef
-define Package/$(PKG_NAME)-py2/preinst
+define Package/radicale-py2/preinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] && exit 0 # if run within buildroot exit
exit 0 # suppress errors from stop command
endef
-define Package/$(PKG_NAME)-py3/preinst
-$(call Package/$(PKG_NAME)-py2/preinst)
+define Package/radicale-py3/preinst
+$(call Package/radicale-py2/preinst)
endef
-define Package/$(PKG_NAME)/inst_all
+define Package/radicale/inst_all
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/radicale.init $(1)/etc/init.d/radicale
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/radicale $(1)/usr/bin/
endef
-define Package/$(PKG_NAME)-py2/install
- $(call Package/$(PKG_NAME)/inst_all, $(1))
+define Package/radicale-py2/install
+ $(call Package/radicale/inst_all, $(1))
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/radicale
$(CP) $(PKG_BUILD_DIR)/radicale/* $(1)$(PYTHON_PKG_DIR)/radicale
endef
-define Package/$(PKG_NAME)-py3/install
- $(call Package/$(PKG_NAME)/inst_all, $(1))
+define Package/radicale-py3/install
+ $(call Package/radicale/inst_all, $(1))
$(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)/radicale
$(CP) $(PKG_BUILD_DIR)/radicale/* $(1)$(PYTHON3_PKG_DIR)/radicale
endef
-define Package/$(PKG_NAME)-py2/postinst
+define Package/radicale-py2/postinst
#!/bin/sh
# patch /usr/bin/radicale force run using python2
/bin/sed -i 's/python/python2/' $${IPKG_INSTROOT}/usr/bin/radicale
endef
-define Package/$(PKG_NAME)-py3/postinst
+define Package/radicale-py3/postinst
#!/bin/sh
# patch /usr/bin/radicale force run using python3
/bin/sed -i 's/python/python3/' $${IPKG_INSTROOT}/usr/bin/radicale
endef
-$(eval $(call BuildPackage,$(PKG_NAME)-py2))
-$(eval $(call BuildPackage,$(PKG_NAME)-py3))
+$(eval $(call BuildPackage,radicale-py2))
+$(eval $(call BuildPackage,radicale-py3))
PKG_NAME:=strongswan
PKG_VERSION:=5.5.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.strongswan.org/ http://download2.strongswan.org/
START=90
STOP=10
+. $IPKG_INSTROOT/lib/functions.sh
+
+UCI_IPSEC_CONFIG=/etc/config/ipsec
+
+IPSEC_SECRETS_FILE=/etc/ipsec.secrets
+IPSEC_CONN_FILE=/etc/ipsec.conf
+STRONGSWAN_CONF_FILE=/etc/strongswan.conf
+
+IPSEC_VAR_SECRETS_FILE=/var/ipsec/ipsec.secrets
+IPSEC_VAR_CONN_FILE=/var/ipsec/ipsec.conf
+STRONGSWAN_VAR_CONF_FILE=/var/ipsec/strongswan.conf
+
+ENABLED_REMOTE_PEERS=0
+
+file_reset() {
+ : > "$1"
+}
+
+xappend() {
+ local file="$1"
+ shift
+
+ echo "${@}" >> "${file}"
+}
+
+remove_include() {
+ local file="$1"
+ local include="$2"
+
+ sed -i "\_${include}_d" "${file}"
+}
+
+remove_includes() {
+ remove_include "${IPSEC_CONN_FILE}" "${IPSEC_VAR_CONN_FILE}"
+ remove_include "${IPSEC_SECRETS_FILE}" "${IPSEC_VAR_SECRETS_FILE}"
+ remove_include "${STRONGSWAN_CONF_FILE}" "${STRONGSWAN_VAR_CONF_FILE}"
+}
+
+do_include() {
+ local conf="$1"
+ local uciconf="$2"
+ local backup=`mktemp -t -p /tmp/ ipsec-init-XXXXXX`
+
+ [ ! -f "${conf}" ] && rm -rf "${conf}"
+ touch "${conf}"
+
+ cat "${conf}" | grep -v "${uciconf}" > "${backup}"
+ mv "${backup}" "${conf}"
+ xappend "${conf}" "include ${uciconf}"
+ file_reset "${uciconf}"
+}
+
+ipsec_reset() {
+ do_include "${IPSEC_CONN_FILE}" "${IPSEC_VAR_CONN_FILE}"
+}
+
+ipsec_xappend() {
+ xappend "${IPSEC_VAR_CONN_FILE}" "$@"
+}
+
+swan_reset() {
+ do_include "${STRONGSWAN_CONF_FILE}" "${STRONGSWAN_VAR_CONF_FILE}"
+}
+
+swan_xappend() {
+ xappend "${STRONGSWAN_VAR_CONF_FILE}" "$@"
+}
+
+secret_reset() {
+ do_include "${IPSEC_SECRETS_FILE}" "${IPSEC_VAR_SECRETS_FILE}"
+}
+
+secret_xappend() {
+ xappend "${IPSEC_VAR_SECRETS_FILE}" "$@"
+}
+
+warning() {
+ echo "WARNING: $@" >&2
+}
+
+add_crypto_proposal() {
+ local encryption_algorithm
+ local hash_algorithm
+ local dh_group
+
+ config_get encryption_algorithm "$1" encryption_algorithm
+ config_get hash_algorithm "$1" hash_algorithm
+ config_get dh_group "$1" dh_group
+
+ [ -n "${encryption_algorithm}" ] && \
+ crypto="${crypto:+${crypto},}${encryption_algorithm}${hash_algorithm:+-${hash_algorithm}}${dh_group:+-${dh_group}}"
+}
+
+set_crypto_proposal() {
+ local conf="$1"
+ local proposal
+
+ crypto=""
+
+ config_get crypto_proposal "$conf" crypto_proposal ""
+ for proposal in $crypto_proposal; do
+ add_crypto_proposal "$proposal"
+ done
+
+ [ -n "${crypto}" ] && {
+ local force_crypto_proposal
+
+ config_get_bool force_crypto_proposal "$conf" force_crypto_proposal
+
+ [ "${force_crypto_proposal}" = "1" ] && crypto="${crypto}!"
+ }
+
+ crypto_proposal="${crypto}"
+}
+
+config_conn() {
+ # Generic ipsec conn section shared by tunnel and transport
+ local mode
+ local local_subnet
+ local local_nat
+ local local_sourceip
+ local local_updown
+ local local_firewall
+ local remote_subnet
+ local remote_sourceip
+ local remote_updown
+ local remote_firewall
+ local ikelifetime
+ local lifetime
+ local margintime
+ local keyingtries
+ local dpdaction
+ local dpddelay
+ local inactivity
+ local keyexchange
+
+ config_get mode "$1" mode "route"
+ config_get local_subnet "$1" local_subnet ""
+ config_get local_nat "$1" local_nat ""
+ config_get local_sourceip "$1" local_sourceip ""
+ config_get local_updown "$1" local_updown ""
+ config_get local_firewall "$1" local_firewall ""
+ config_get remote_subnet "$1" remote_subnet ""
+ config_get remote_sourceip "$1" remote_sourceip ""
+ config_get remote_updown "$1" remote_updown ""
+ config_get remote_firewall "$1" remote_firewall ""
+ config_get ikelifetime "$1" ikelifetime "3h"
+ config_get lifetime "$1" lifetime "1h"
+ config_get margintime "$1" margintime "9m"
+ config_get keyingtries "$1" keyingtries "3"
+ config_get dpdaction "$1" dpdaction "none"
+ config_get dpddelay "$1" dpddelay "30s"
+ config_get inactivity "$1" inactivity
+ config_get keyexchange "$1" keyexchange "ikev2"
+
+ [ -n "$local_nat" ] && local_subnet=$local_nat
+
+ ipsec_xappend "conn $config_name-$1"
+ ipsec_xappend " left=%any"
+ ipsec_xappend " right=$remote_gateway"
+
+ [ -n "$local_sourceip" ] && ipsec_xappend " leftsourceip=$local_sourceip"
+ [ -n "$local_subnet" ] && ipsec_xappend " leftsubnet=$local_subnet"
+
+ [ -n "$local_firewall" ] && ipsec_xappend " leftfirewall=$local_firewall"
+ [ -n "$remote_firewall" ] && ipsec_xappend " rightfirewall=$remote_firewall"
+
+ ipsec_xappend " ikelifetime=$ikelifetime"
+ ipsec_xappend " lifetime=$lifetime"
+ ipsec_xappend " margintime=$margintime"
+ ipsec_xappend " keyingtries=$keyingtries"
+ ipsec_xappend " dpdaction=$dpdaction"
+ ipsec_xappend " dpddelay=$dpddelay"
+
+ [ -n "$inactivity" ] && ipsec_xappend " inactivity=$inactivity"
+
+ if [ "$auth_method" = "psk" ]; then
+ ipsec_xappend " leftauth=psk"
+ ipsec_xappend " rightauth=psk"
+
+ [ "$remote_sourceip" != "" ] && ipsec_xappend " rightsourceip=$remote_sourceip"
+ [ "$remote_subnet" != "" ] && ipsec_xappend " rightsubnet=$remote_subnet"
+
+ ipsec_xappend " auto=$mode"
+ else
+ warning "AuthenticationMethod $auth_method not supported"
+ fi
+
+ [ -n "$local_identifier" ] && ipsec_xappend " leftid=$local_identifier"
+ [ -n "$remote_identifier" ] && ipsec_xappend " rightid=$remote_identifier"
+ [ -n "$local_updown" ] && ipsec_xappend " leftupdown=$local_updown"
+ [ -n "$remote_updown" ] && ipsec_xappend " rightupdown=$remote_updown"
+ ipsec_xappend " keyexchange=$keyexchange"
+
+ set_crypto_proposal "$1"
+ [ -n "${crypto_proposal}" ] && ipsec_xappend " esp=$crypto_proposal"
+ [ -n "${ike_proposal}" ] && ipsec_xappend " ike=$ike_proposal"
+}
+
+config_tunnel() {
+ config_conn "$1"
+
+ # Specific for the tunnel part
+ ipsec_xappend " type=tunnel"
+}
+
+config_transport() {
+ config_conn "$1"
+
+ # Specific for the transport part
+ ipsec_xappend " type=transport"
+}
+
+config_remote() {
+ local enabled
+ local gateway
+ local pre_shared_key
+ local auth_method
+
+ config_name=$1
+
+ config_get_bool enabled "$1" enabled 0
+ [ "$enabled" = "0" ] && return
+
+ ENABLED_REMOTE_PEERS=$((ENABLED_REMOTE_PEERS + 1))
+
+ config_get gateway "$1" gateway
+ config_get pre_shared_key "$1" pre_shared_key
+ config_get auth_method "$1" authentication_method
+ config_get local_identifier "$1" local_identifier ""
+ config_get remote_identifier "$1" remote_identifier ""
+
+ [ "$gateway" = "any" ] && remote_gateway="%any" || remote_gateway="$gateway"
+
+ [ -z "$local_identifier" ] && {
+ local ipdest
+
+ [ "$remote_gateway" = "%any" ] && ipdest="1.1.1.1" || ipdest="$remote_gateway"
+ local_gateway=`ip route get $ipdest | awk -F"src" '/src/{gsub(/ /,"");print $2}'`
+ }
+
+ [ -n "$local_identifier" ] && secret_xappend -n "$local_identifier " || secret_xappend -n "$local_gateway "
+ [ -n "$remote_identifier" ] && secret_xappend -n "$remote_identifier " || secret_xappend -n "$remote_gateway "
+
+ secret_xappend ": PSK \"$pre_shared_key\""
+
+ set_crypto_proposal "$1"
+ ike_proposal="$crypto_proposal"
+
+ config_list_foreach "$1" tunnel config_tunnel
+
+ config_list_foreach "$1" transport config_transport
+
+ ipsec_xappend ""
+}
+
+config_ipsec() {
+ local debug
+ local rtinstall_enabled
+ local routing_tables_ignored
+ local routing_table
+ local routing_table_id
+ local interface
+ local device_list
+
+ ipsec_reset
+ secret_reset
+ swan_reset
+
+ ipsec_xappend "# generated by /etc/init.d/ipsec"
+ ipsec_xappend "version 2"
+ ipsec_xappend ""
+
+ secret_xappend "# generated by /etc/init.d/ipsec"
+
+ config_get debug "$1" debug 0
+ config_get_bool rtinstall_enabled "$1" rtinstall_enabled 1
+ [ $rtinstall_enabled = "1" ] && install_routes=yes || install_routes=no
+
+ # prepare extra charon config option ignore_routing_tables
+ for routing_table in $(config_get "$1" "ignore_routing_tables"); do
+ if [ "$routing_table" -ge 0 ] 2>/dev/null; then
+ routing_table_id=$routing_table
+ else
+ routing_table_id=$(sed -n '/[ \t]*[0-9]\+[ \t]\+'$routing_table'[ \t]*$/s/[ \t]*\([0-9]\+\).*/\1/p' /etc/iproute2/rt_tables)
+ fi
+
+ [ -n "$routing_table_id" ] && append routing_tables_ignored "$routing_table_id"
+ done
+
+ swan_xappend "# generated by /etc/init.d/ipsec"
+ swan_xappend "charon {"
+ swan_xappend " load_modular = yes"
+ swan_xappend " install_routes = $install_routes"
+ [ -n "$routing_tables_ignored" ] && swan_xappend " ignore_routing_tables = $routing_tables_ignored"
+ swan_xappend " plugins {"
+ swan_xappend " include /etc/strongswan.d/charon/*.conf"
+ swan_xappend " }"
+ swan_xappend " syslog {"
+ swan_xappend " identifier = ipsec"
+ swan_xappend " daemon {"
+ swan_xappend " default = $debug"
+ swan_xappend " }"
+ swan_xappend " auth {"
+ swan_xappend " default = $debug"
+ swan_xappend " }"
+ swan_xappend " }"
+ swan_xappend "}"
+}
+
+prepare_env() {
+ mkdir -p /var/ipsec
+ remove_includes
+ config_load ipsec
+ config_foreach config_ipsec ipsec
+ config_foreach config_remote remote
+}
+
start() {
- ipsec start
+ prepare_env
+ [ $ENABLED_REMOTE_PEERS != 0 -o ! -f $UCI_IPSEC_CONFIG ] && ipsec start
}
stop() {
}
restart() {
- ipsec restart
+ prepare_env
+ [ $ENABLED_REMOTE_PEERS != 0 -o ! -f $UCI_IPSEC_CONFIG ] && ipsec restart || ipsec stop
}
reload() {
- ipsec update
+ prepare_env
+ [ $ENABLED_REMOTE_PEERS != 0 -o ! -f $UCI_IPSEC_CONFIG ] && {
+ ipsec secrets
+ if [[ ! -z "$(ipsec status)" ]]; then
+ ipsec reload
+ else
+ ipsec start
+ fi
+ } || ipsec stop
}
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=0.4.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.4.2
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)
+define Package/travelmate
SECTION:=net
CATEGORY:=Network
TITLE:=A wlan connection manager for travel router
PKGARCH:=all
endef
-define Package/$(PKG_NAME)/description
+define Package/travelmate/description
A wlan connection manager for travel router.
Please see https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md for further information.
endef
-define Package/$(PKG_NAME)/conffiles
+define Package/travelmate/conffiles
/etc/config/travelmate
endef
define Build/Compile
endef
-define Package/$(PKG_NAME)/install
+define Package/travelmate/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) ./files/travelmate.sh $(1)/usr/bin/
$(INSTALL_CONF) ./files/travelmate.conf $(1)/etc/config/travelmate
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,travelmate))
option trm_enabled '0'
option trm_debug '0'
option trm_active '0'
- option trm_maxwait '20'
+ option trm_maxwait '30'
option trm_maxretry '3'
option trm_timeout '60'
option trm_iw '1'
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="0.4.1-2"
+trm_ver="0.4.2"
trm_sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')"
trm_enabled=1
trm_debug=0
trm_active=0
-trm_maxwait=20
+trm_maxwait=30
trm_maxretry=3
trm_timeout=60
trm_iw=1
logger -t "travelmate-[${trm_ver}] ${class}" "${log_msg}"
if [ "${class}" = "error" ]
then
- logger -t "travelmate-[${trm_ver}] ${class}" "Please check the readme 'https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md' (${trm_sysver})"
+ logger -t "travelmate-[${trm_ver}] ${class}" "Please check 'https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md' (${trm_sysver})"
f_active
exit 255
fi
if [ -n "$(printf "${ssid_list}" | grep -Fo "${ssid}")" ] && [ "${ap_radio}" = "${sta_radio}" ]
then
uci -q set wireless."${config}".disabled=0
- uci -q commit wireless
ubus call network reload
f_check "sta"
if [ "${trm_ifstatus}" = "true" ]
then
- f_log "info " "wwan interface connected to uplink ${ssid} (${cnt}/${trm_maxretry}, ${trm_sysver})"
+ uci -q commit wireless
+ f_log "info " "wwan interface connected to uplink ${ssid} (${trm_sysver})"
sleep 5
return 0
else
- uci -q set wireless."${config}".disabled=1
- uci -q commit wireless
+ uci -q revert wireless
ubus call network reload
- f_log "info " "wwan interface can't connect to uplink ${ssid} (${cnt}/${trm_maxretry}, ${trm_sysver})"
+ f_log "info " "wwan interface can't connect to uplink ${ssid} (${trm_sysver})"
fi
fi
done
- else
- f_log "info " "empty uplink list (${cnt}/${trm_maxretry}, ${trm_sysver})"
fi
cnt=$((cnt+1))
sleep 5
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)
+define Package/vpnbypass
SECTION:=net
CATEGORY:=Network
DEPENDS:=+ip-full +ipset +iptables +ubox +dnsmasq-full
PKGARCH:=all
endef
-define Package/$(PKG_NAME)/description
+define Package/vpnbypass/description
This service can be used to enable simple VPN split tunnelling.
Supports accessing domains, IP ranges outside of your VPN tunnel.
Also supports dedicating local ports/IP ranges for direct internet access (outside of your VPN tunnel).
Please see the README for further information.
endef
-define Package/$(PKG_NAME)/conffiles
+define Package/vpnbypass/conffiles
/etc/config/vpnbypass
endef
define Build/Compile
endef
-define Package/$(PKG_NAME)/install
+define Package/vpnbypass/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/vpnbypass.init $(1)/etc/init.d/vpnbypass
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/vpnbypass.hotplug $(1)/etc/hotplug.d/firewall/94-vpnbypass
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,vpnbypass))
PKG_NAME:=xinetd
PKG_VERSION:=2.3.15
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.xinetd.org
define Package/xinetd/conffiles
/etc/xinetd.conf
+/etc/xinetd.d/
endef
TARGET_CFLAGS += -DNO_RPC
#
-# Copyright (C) 2006-2016 OpenWrt.org
+# Copyright (C) 2006-2017 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:=mc
-PKG_VERSION:=4.8.18
+PKG_VERSION:=4.8.19
PKG_RELEASE:=1
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
PKG_LICENSE:=GPL-3.0+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
-PKG_MD5SUM:=f7636815c987c1719c4f5de2dcd156a0e7d097b1d10e4466d2bdead343d5bece
+PKG_HASH:=eb9e56bbb5b2893601d100d0e0293983049b302c5ab61bfb544ad0ee2cc1f2df
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf gettext-version
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
-define Package/$(PKG_NAME)
+define Package/mc
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+glib2 +libncurses +libmount +MC_VFS:libssh2 $(LIBRPC_DEPENDS) $(ICONV_DEPENDS)
MENU:=1
endef
-define Package/$(PKG_NAME)/config
+define Package/mc/config
source "$(SOURCE)/Config.in"
endef
-define Package/$(PKG_NAME)/description
+define Package/mc/description
GNU Midnight Commander is a visual file manager.
It's a feature rich full-screen text mode application that allows you to copy,
move and delete files and whole directory trees, search for files and run commands in the subshell.
endef
CONFIGURE_ARGS += \
+ --enable-silent-rules \
+ --disable-tests \
--disable-doxygen-doc \
--with-homedir=/etc/mc \
--with-screen=ncurses \
--disable-vfs
endif
-define Package/$(PKG_NAME)/install
+define Package/mc/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin
$(INSTALL_DIR) $(1)/etc/mc
$(INSTALL_DIR) $(1)/etc/mc/mcedit/Syntax
endef
-define Package/$(PKG_NAME)/conffiles
+define Package/mc/conffiles
/etc/mc/mc.menu
/etc/mc/skins/default.ini
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,mc))
--- a/src/subshell/common.c
+++ b/src/subshell/common.c
-@@ -849,7 +849,7 @@ init_subshell_precmd (char *precmd, size
- "else "
- "[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; "
- "fi; "
+@@ -843,16 +843,9 @@ init_subshell_precmd (char *precmd, size
+ * "PS1='$($PRECMD)$ '\n",
+ */
+ g_snprintf (precmd, buff_size,
+- "precmd() { "
+- "if [ ! \"${PWD##$HOME}\" ]; then "
+- "MC_PWD=\"~\"; "
+- "else "
+- "[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; "
+- "fi; "
- "echo \"$USER@$(hostname -s):$MC_PWD\"; "
-+ "echo \"$USER@$HOSTNAME:$MC_PWD\"; "
- "pwd>&%d; "
- "kill -STOP $$; "
- "}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]);
+- "pwd>&%d; "
+- "kill -STOP $$; "
+- "}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]);
++ "precmd() { pwd>&%d; kill -STOP $$; }; "
++ "PRECMD=precmd; "
++ "PS1='$(eval $PRECMD)\\u@\\h:\\w\\$ '\n", subshell_pipe[WRITE]);
+ break;
+
+ case SHELL_ZSH:
define Package/$(addprefix open-plc-utils-,$(1))
$(call Package/open-plc-utils/Default)
DEPENDS:=open-plc-utils
- TITLE:=Utility $(2) from the Open PLC utilities
+ TITLE:=Utility $(1) from the Open PLC utilities
endef
define Package/$(addprefix open-plc-utils-,$(1))/description
- Utility $(2) from the Open PLC utilities package.
+ Utility $(1) from the Open PLC utilities package.
endef
endef
# templates
#
-define Package/$(PKG_NAME)/Default
+define Package/owfs/Default
TITLE:=OWFS (1-Wire File System)
URL:=http://owfs.sourceforge.net/
SECTION:=net
SUBMENU:=Filesystem
endef
-define Package/$(PKG_NAME)/Default/description
+define Package/owfs/Default/description
OWFS is a suite of programs that designed to make the 1-wire bus and its
devices easily accessible. The underlying principle is to create a virtual
filesystem, with the unique ID being the directory, and the individual
endef
define Package/libow/description
- $(call Package/$(PKG_NAME)/Default/description)
+ $(call Package/owfs/Default/description)
This package contains the OWFS library.
endef
endef
define Package/libow-capi/description
- $(call Package/$(PKG_NAME)/Default/description)
+ $(call Package/owfs/Default/description)
This package contains the OWFS C-API library.
endef
endef
define Package/owshell/description
- $(call Package/$(PKG_NAME)/Default/description)
+ $(call Package/owfs/Default/description)
This package contains the OWFS shell utilities.
endef
endef
define Package/owfs/description
- $(call Package/$(PKG_NAME)/Default/description)
+ $(call Package/owfs/Default/description)
This package contains the OWFS fuse filesystem.
endef
endef
define Package/owhttpd/description
- $(call Package/$(PKG_NAME)/Default/description)
+ $(call Package/owfs/Default/description)
This package contains the OWFS http server.
endef
endef
define Package/owftpd/description
- $(call Package/$(PKG_NAME)/Default/description)
+ $(call Package/owfs/Default/description)
This package contains the OWFS ftp server.
endef
endef
define Package/owserver/description
- $(call Package/$(PKG_NAME)/Default/description)
+ $(call Package/owfs/Default/description)
This package contains the OWFS network server.
endef