include $(INCLUDE_DIR)/package.mk
-CONFIGURE_VARS += M4=m4
+CONFIGURE_VARS += M4=m4 EMACS=no
define Package/autoconf
SECTION:=devel
PKG_NAME:=libtool
PKG_VERSION:=2.4.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/libtool
-PKG_MD5SUM:=addf44b646ddb4e3919805aa88fa7c5e
+PKG_MD5SUM:=1bfb9b923f2c1339b4d2ce1807064aa5
PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
PKG_LICENSE:=GPL-2.0+
PKG_BUILD_DIR = $(BUILD_DIR)/libtool-bin/$(PKG_NAME)-$(PKG_VERSION)
--- /dev/null
+#
+# Copyright (C) 2016 Amnon Paz <pazamnon@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-openssl
+PKG_VERSION:=0.6.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Amnon Paz <pazamnon@gmail.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/zhaozg/lua-openssl.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=1b950e6ff8617205cda1a1b612637ef21b9daf96
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua openSSL binding
+ URL:=http://github.com/zhaozg/lua-openssl
+ DEPENDS:=+lua +libopenssl +librt
+endef
+
+define Package/lua-openssl/description
+ A free, MIT-licensed OpenSSL binding for Lua.
+endef
+
+define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/openssl.so $(1)/usr/lib/lua/
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
--- /dev/null
+diff --git a/Makefile b/Makefile
+index 6cb1176..6605879 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,85 +1,45 @@
+-T=openssl
+-
+-PREFIX ?=/usr/local
+-LIB_OPTION ?= -shared
+-
+-#Lua auto detect
+-LUA_VERSION ?= $(shell pkg-config luajit --print-provides)
+-ifeq ($(LUA_VERSION),) ############ Not use luajit
+-LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")
+-LUA_CFLAGS ?= -I$(PREFIX)/include/lua$(LUAV)
+-LUA_LIBS ?= -L$(PREFIX)/lib
+-LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV)
+-else
+-LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")
+-LUA_CFLAGS ?= $(shell pkg-config luajit --cflags)
+-LUA_LIBS ?= $(shell pkg-config luajit --libs)
+-LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV)
+-endif
+-
+-#OS auto detect
+-SYS := $(shell gcc -dumpmachine)
+-
+-ifneq (, $(findstring linux, $(SYS)))
+-# Do linux things
+-LDFLAGS = -fPIC -lrt -ldl
+-OPENSSL_LIBS ?= $(shell pkg-config openssl --libs)
+-OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags)
+-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+-endif
+-ifneq (, $(findstring apple, $(SYS)))
+-# Do darwin things
+-LDFLAGS = -fPIC -lrt -ldl
+-OPENSSL_LIBS ?= $(shell pkg-config openssl --libs)
+-OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags)
+-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+-endif
+-ifneq (, $(findstring mingw, $(SYS)))
+-# Do mingw things
+-V = $(shell lua -e "v=string.gsub('$(LUAV)','%.','');print(v)")
+-LDFLAGS = -mwindows -lcrypt32 -lssl -lcrypto -lws2_32 $(PREFIX)/bin/lua$(V).dll
+-LUA_CFLAGS = -DLUA_LIB -DLUA_BUILD_AS_DLL -I$(PREFIX)/include/
+-CFLAGS = $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+-endif
+-ifneq (, $(findstring cygwin, $(SYS)))
+-# Do cygwin things
+-OPENSSL_LIBS ?= $(shell pkg-config openssl --libs)
+-OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags)
+-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+-endif
+-#custome config
+-ifeq (.config, $(wildcard .config))
+-include .config
+-endif
+-
+-LIBNAME= $T.so.$V
+-
+-#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
+-
+-# Compilation directives
+-WARN_MOST = -Wall -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic
+-WARN = -Wall -Wno-unused-value
+-WARN_MIN =
+-CFLAGS += $(WARN_MIN) -DPTHREADS
+-CC= gcc -g $(CFLAGS) -Ideps
+-
+-
+-OBJS=src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o \
+-src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o \
+-src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o
+-
+-.c.o:
+- $(CC) -c -o $@ $?
+-
+-all: $T.so
+- echo $(SYS)
+-
+-$T.so: $(OBJS)
+- MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o $T.so $(OBJS) $(OPENSSL_LIBS) $(LUA_LIBS) $(LDFLAGS)
+-
+-install: all
+- mkdir -p $(LUA_LIBDIR)
+- cp $T.so $(LUA_LIBDIR)
+-
+-clean:
+- rm -f $T.so $(OBJS)
++.PHONY: install clean
++
++PKGC ?= pkg-config
++
++LIBNAME = openssl.so
++LIB_OPTION = -shared
++
++# lua's package config can be under various names
++LUAPKGC := $(shell for pc in lua lua5.1 lua5.2 lua5.3; do \
++ $(PKGC) --exists $$pc && echo $$pc && break; \
++ done)
++
++BUILD_DIR = $(shell pwd)
++
++# LUA include/libraries build flags
++LUA_LIBDIR := $(shell $(PKGC) --variable=libdir $(LUAPKGC))
++LUA_CFLAGS := $(shell $(PKGC) --cflags $(LUAPKGC))
++LUA_LIBS := $(shell $(PKGC) --libs-only-L $(LUAPKGC))
++
++# openssl include/libraries build flags
++OPENSSL_LIBS = $(shell $(PKGC) openssl --libs)
++OPENSSL_CFLAGS = $(shell $(PKGC) openssl --cflags)
++
++# openssl include/libraries build flags
++LOCAL_INCLUDE = -I$(BUILD_DIR)/deps
++
++CFLAGS += -fPIC -DPTHREADS -g $(LOCAL_INCLUDE) $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
++LDFLAGS += -lrt -ldl $(OPENSSL_LIBS) $(LUA_LIBS)
++
++OBJS = src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o
++
++all: clean $(LIBNAME)
++
++$(LIBNAME): $(OBJS)
++ $(CC) $(LDFLAGS) $(LIB_OPTION) $(OBJS) -o $@
++
++%.o: %.c
++ $(CC) $(CFLAGS) -c $< -o $@
++
++install: all
++ mkdir -p $(LUA_LIBDIR)
++ cp $(LIBNAME) $(LUA_LIBDIR)
++
++clean:
++ rm -f $(LIBNAME) $(OBJS)
--- /dev/null
+diff --git a/deps/lua-compat/c-api/compat-5.3.c b/deps/lua-compat/c-api/compat-5.3.c
+index 4395bbc..4a8877c 100644
+--- a/deps/lua-compat/c-api/compat-5.3.c
++++ b/deps/lua-compat/c-api/compat-5.3.c
+@@ -491,17 +491,6 @@ COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i) {
+ }
+
+
+-COMPAT53_API int lua_isinteger (lua_State *L, int index) {
+- if (lua_type(L, index) == LUA_TNUMBER) {
+- lua_Number n = lua_tonumber(L, index);
+- lua_Integer i = lua_tointeger(L, index);
+- if (i == n)
+- return 1;
+- }
+- return 0;
+-}
+-
+-
+ static void compat53_reverse (lua_State *L, int a, int b) {
+ for (; a < b; ++a, --b) {
+ lua_pushvalue(L, a);
+diff --git a/deps/lua-compat/c-api/compat-5.3.h b/deps/lua-compat/c-api/compat-5.3.h
+index 2309294..8e67bae 100644
+--- a/deps/lua-compat/c-api/compat-5.3.h
++++ b/deps/lua-compat/c-api/compat-5.3.h
+@@ -244,9 +244,6 @@ typedef int (*lua_KFunction)(lua_State *L, int status, lua_KContext ctx);
+ #define lua_geti COMPAT53_CONCAT(COMPAT53_PREFIX, _geti)
+ COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i);
+
+-#define lua_isinteger COMPAT53_CONCAT(COMPAT53_PREFIX, _isinteger)
+-COMPAT53_API int lua_isinteger (lua_State *L, int index);
+-
+ #define lua_numbertointeger(n, p) \
+ ((*(p) = (lua_Integer)(n)), 1)
+
--- /dev/null
+--- lua-openssl-0.6.0.old/src/ssl.c 2016-09-19 08:30:43.735075695 +0200
++++ lua-openssl-0.6.0/src/ssl.c 2016-09-19 09:02:45.733813437 +0200
+@@ -24,12 +24,17 @@
+ SSL_METHOD* method = NULL;
+ const char* ciphers;
+ SSL_CTX* ctx;
+- if (strcmp(meth, "SSLv3") == 0)
++ if (0);
++
++#ifndef OPENSSL_NO_SSL3
++ else if (strcmp(meth, "SSLv3") == 0)
+ method = SSLv3_method(); /* SSLv3 */
+ else if (strcmp(meth, "SSLv3_server") == 0)
+ method = SSLv3_server_method(); /* SSLv3 */
+ else if (strcmp(meth, "SSLv3_client") == 0)
+ method = SSLv3_client_method(); /* SSLv3 */
++#endif
++
+ else if (strcmp(meth, "SSLv23") == 0)
+ method = SSLv23_method(); /* SSLv3 but can rollback to v2 */
+ else if (strcmp(meth, "SSLv23_server") == 0)
+@@ -79,15 +84,15 @@
+ #endif
+ else
+ luaL_error(L, "#1:%s not supported\n"
+- "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
+- "default is SSLv3",
++ "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
++ "default is TLSv1",
+ meth);
+ ciphers = luaL_optstring(L, 2, SSL_DEFAULT_CIPHER_LIST);
+ ctx = SSL_CTX_new(method);
+ if (!ctx)
+ luaL_error(L, "#1:%s not supported\n"
+- "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
+- "default is SSLv3",
++ "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
++ "default is TLSv1",
+ meth);
+ openssl_newvalue(L, ctx);
+ SSL_CTX_set_cipher_list(ctx, ciphers);
--- /dev/null
+--- lua-openssl-0.6.0.old/src/ssl.c 2016-09-19 08:30:43.735075695 +0200
++++ lua-openssl-0.6.0/src/ssl.c 2016-09-19 08:48:37.393737125 +0200
+@@ -1245,7 +1250,7 @@
+ lua_pushinteger(L, st);
+ return 2;
+ }
+-#ifndef LIBRESSL_VERSION_NUMBER
++#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER)
+ static int openssl_ssl_current_compression(lua_State *L)
+ {
+ SSL* s = CHECK_OBJECT(1, SSL, "openssl.ssl");
+@@ -1803,7 +1808,7 @@
+ {"getfd", openssl_ssl_getfd},
+
+ {"current_cipher", openssl_ssl_current_cipher},
+-#ifndef LIBRESSL_VERSION_NUMBER
++#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER)
+ {"current_compression", openssl_ssl_current_compression},
+ #endif
+ {"getpeerverification", openssl_ssl_getpeerverification},
endef
define Host/Compile
- $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host")
+ $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
endef
define Host/Install
endef
define Host/Compile
- $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host")
+ $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
endef
define Host/Install
endef
define Host/Compile
- $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR)/host")
+ $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)")
endef
define Host/Install
define Host/Compile
$(call Build/Compile/HostPyMod,,\
- install --root="$(STAGING_DIR)/host" --prefix="" \
+ install --root="$(HOST_BUILD_PREFIX)" --prefix="" \
--single-version-externally-managed \
)
endef
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/
$(CP) \
- $(STAGING_DIR)/host/lib/python$(PYTHON_VERSION) \
+ $(HOST_BUILD_PREFIX)/lib/python$(PYTHON_VERSION) \
$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
$(1)/usr/lib/
$(CP) \
- $(STAGING_DIR)/host/lib/pkgconfig/python.pc \
- $(STAGING_DIR)/host/lib/pkgconfig/python2.pc \
- $(STAGING_DIR)/host/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
+ $(HOST_BUILD_PREFIX)/lib/pkgconfig/python.pc \
+ $(HOST_BUILD_PREFIX)/lib/pkgconfig/python2.pc \
+ $(HOST_BUILD_PREFIX)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
$(1)/usr/lib/pkgconfig
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
--without-cxx-main \
--without-pymalloc \
--with-threads \
- --prefix=$(STAGING_DIR)/host \
- --exec-prefix=$(STAGING_DIR)/host \
- --sysconfdir=$(STAGING_DIR_HOST)/host/etc \
- --localstatedir=$(STAGING_DIR)/host/var \
- --sbindir=$(STAGING_DIR)/host/bin \
- --with-system-expat=$(STAGING_DIR)/host \
- --with-system-ffi=$(STAGING_DIR)/host \
+ --prefix=$(HOST_BUILD_PREFIX) \
+ --exec-prefix=$(HOST_BUILD_PREFIX) \
+ --sysconfdir=$(HOST_BUILD_PREFIX)/etc \
+ --localstatedir=$(HOST_BUILD_PREFIX)/var \
+ --sbindir=$(HOST_BUILD_PREFIX)/bin \
+ --with-system-expat=$(HOST_BUILD_PREFIX) \
+ --with-system-ffi=$(HOST_BUILD_PREFIX) \
CONFIG_SITE= \
CFLAGS="$(HOST_CFLAGS)"
define Host/Install
- $(INSTALL_DIR) $(STAGING_DIR)/host/bin/
$(MAKE) -C $(HOST_BUILD_DIR) install
- $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR)/host/bin/pgen2
+ $(INSTALL_DIR) $(HOST_BUILD_PREFIX)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_BUILD_PREFIX)/bin/pgen2
endef
$(eval $(call HostBuild))
# See /LICENSE for more information.
#
-HOST_PYTHON_DIR:=$(STAGING_DIR)/host
+HOST_PYTHON_DIR:=$(HOST_BUILD_PREFIX)
HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION)
HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)
HOST_PYTHON_BIN:=$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)
-HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(STAGING_DIR)/host/$(HOST_PYTHON_PKG_DIR)
+HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(HOST_BUILD_PREFIX)/$(HOST_PYTHON_PKG_DIR)
define HostPython
if [ "$(strip $(3))" == "HOST" ]; then \
LDSHARED="$(HOSTCC) -shared" \
CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \
- LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR)/host/lib" \
+ LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(HOST_BUILD_PREFIX)/lib" \
_PYTHON_HOST_PLATFORM=linux2 \
$(3) \
, \
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/
$(CP) \
- $(STAGING_DIR)/host/lib/python$(PYTHON_VERSION) \
+ $(HOST_BUILD_PREFIX)/lib/python$(PYTHON_VERSION) \
$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
$(1)/usr/lib/
$(CP) \
--without-cxx-main \
--without-pymalloc \
--with-threads \
- --prefix=$(STAGING_DIR)/host \
- --exec-prefix=$(STAGING_DIR)/host \
- --sysconfdir=$(STAGING_DIR_HOST)/host/etc \
- --localstatedir=$(STAGING_DIR)/host/var \
- --sbindir=$(STAGING_DIR)/host/bin \
- --with-system-expat=$(STAGING_DIR)/host \
- --with-system-ffi=$(STAGING_DIR)/host \
+ --prefix=$(HOST_BUILD_PREFIX) \
+ --exec-prefix=$(HOST_BUILD_PREFIX) \
+ --sysconfdir=$(HOST_BUILD_PREFIX)/etc \
+ --localstatedir=$(HOST_BUILD_PREFIX)/var \
+ --sbindir=$(HOST_BUILD_PREFIX)/bin \
+ --with-system-expat=$(HOST_BUILD_PREFIX) \
+ --with-system-ffi=$(HOST_BUILD_PREFIX) \
--with-ensurepip=upgrade \
CONFIG_SITE= \
CFLAGS="$(HOST_CFLAGS)"
endef
define Host/Install
- $(INSTALL_DIR) $(STAGING_DIR)/host/bin/
$(MAKE) -C $(HOST_BUILD_DIR) install
- $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR)/host/bin/pgen3
- $(INSTALL_BIN) $(HOST_BUILD_DIR)/Programs/_freeze_importlib $(STAGING_DIR)/host/bin/_freeze_importlib
+
+ $(INSTALL_DIR) $(HOST_BUILD_PREFIX)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_BUILD_PREFIX)/bin/pgen3
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/Programs/_freeze_importlib $(HOST_BUILD_PREFIX)/bin/_freeze_importlib
endef
$(eval $(call HostBuild))
PYTHON3:=python$(PYTHON3_VERSION)
-HOST_PYTHON3_LIB_DIR:=$(STAGING_DIR)/host/lib/python$(PYTHON3_VERSION)
-HOST_PYTHON3_BIN:=$(STAGING_DIR)/host/bin/python3
+HOST_PYTHON3_LIB_DIR:=$(HOST_BUILD_PREFIX)/lib/python$(PYTHON3_VERSION)
+HOST_PYTHON3_BIN:=$(HOST_BUILD_PREFIX)/bin/python3
PYTHON3PATH:=$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
define HostPython3
include $(INCLUDE_DIR)/target.mk
PKG_NAME:=boost
-PKG_VERSION:=1.61.0
-PKG_SOURCE_VERSION=1_61_0
-PKG_RELEASE:=2
+PKG_VERSION:=1.62.0
+PKG_SOURCE_VERSION:=1_62_0
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/boost/$(PKG_NAME)/$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://sourceforge.net/projects/boost/files/boost/$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
-PKG_MD5SUM:=874805ba2e2ee415b1877ef3297bf8ad
+PKG_MD5SUM:=36c96b0f6155c98404091d8ceb48319a28279ca0333fba1ad8611eb90afb2ca0
PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
endef
define Package/boost/description
-This package provides the Boost v1.61 libraries.
+This package provides the Boost v1.62 libraries.
Boost is a set of free, peer-reviewed, portable C++ source libraries.
+
+-----------------------------------------------------------------------------
+| Warning |
+| In order to build all of the Boost Libraries, it is necessary |
+| to use, at least, GCC version 5 (C++14 support) and, it is necessary to |
+| compile the kernel with Full Language Support. |
+| Without these requirerements, the following libs will not be available: |
+| - Boost.Locale |
+| - Boost.Coroutine2 |
+| - Boost.Fiber |
+-----------------------------------------------------------------------------
+
This package provides the following run-time libraries:
- atomic
- chrono
- container
- context
- - coroutine
- - - coroutine2 (requires GCC v5 and up)
+ - coroutine (Deprecated - use Coroutine2)
+ - - coroutine2 (Requires GCC v5 and up)
- date_time
- exception
- filesystem
+ - fiber (Requires GCC v5 and up) - BROKEN
- graph
- - graph-parallel
- iostreams
- - locale (requires kernel being compiled with full language support)
+ - locale (Requires kernel being compiled with full language support)
- log
- math
- program_options
- thread
- timer
- wave
- There are many more header-only libraries supported by Boost.
- See more at http://www.boost.org/doc/libs/1_61_0/
+
+There are many more header-only libraries supported by Boost.
+See more at http://www.boost.org/doc/libs/1_62_0/
endef
BOOST_LIBS =
endef
define Package/boost/config
- menu "Select Boost Options"
- depends on PACKAGE_boost
- comment "Boost compilation options."
-
- choice
- prompt "Compile Boost libraries."
- default boost-static-and-shared-libs
- help
- Choose which version to compile.
- -> Shared:
- - Only Shared libs will be compiled.
- -> Static:
- - Only Static libs will be compiled.
- -> Both:
- - Both Static and Shared libs will be compiled.
-
- config boost-shared-libs
- bool "Shared"
+ menu "Select Boost Options"
+ depends on PACKAGE_boost
+ comment "Boost compilation options."
+
+ choice
+ prompt "Compile Boost libraries."
+ default boost-static-and-shared-libs
+ help
+ Choose which version to compile.
+ -> Shared:
+ - Only Shared libs will be compiled.
+ -> Static:
+ - Only Static libs will be compiled.
+ -> Both:
+ - Both Static and Shared libs will be compiled.
+
+ config boost-shared-libs
+ bool "Shared"
config boost-static-libs
- bool "Static"
+ bool "Static"
config boost-static-and-shared-libs
- bool "Both"
- endchoice
-
- choice
- prompt "Selects Boost Runtime linkage."
- default boost-runtime-shared
- help
- Choose which C and C++ runtimes to use:
- -> Use Shared runtimes.
- -> Use Static runtimes.
- - Not available if Shared libs are to be built.
- -> Use both runtimes.
- - Not available if Shared libs are to be built.
- - Two separate versions of Boost are built, linking each to a different runtime.
- - This option requires "Use tagged names" option to be active.
-
- config boost-runtime-shared
- bool "Shared"
-
- config boost-runtime-static
- depends on @(!boost-shared-libs&&!boost-static-and-shared-libs)
- bool "Static"
-
- config boost-runtime-static-and-shared
- depends on @(boost-use-name-tags&&!boost-shared-libs&&!boost-static-and-shared-libs)
- bool "Both"
- endchoice
-
- choice
- prompt "Select a Variant."
- default boost-variant-release
- help
- Chooses which boost variant should be selected:
- -> Release: Optimizes Boost for release.
- - Optimization: Speed; Debug Symbols: Off; Inlining: Full; Runtime Debugging: Off.
- -> Debug:
- - Optimization: Off; Debug Symbols: On; Inlining: Off; Runtime Debugging: On.
- -> Profile:
- - Profiling: On; Debug Symbols: On.
-
- config boost-variant-release
- bool "Release"
-
- config boost-variant-debug
- bool "Debug"
-
- config boost-variant-profile
- bool "Profile"
- endchoice
-
- config boost-use-name-tags
- bool "Use tagged names."
- help
- Add name tags the lib files, to diferentiate each library version:
- "-mt" for multi-threading.
- "-d" for debugging.
- "-s" for runtime static link".
- Might break compatibility with libraries that expect boost libs with default names.
- default n
-
- config boost-single-thread
- depends on @boost-use-name-tags
- bool "Single thread Support."
- help
- Compile Boost libraries in single-thread mode.
- default n
+ bool "Both"
+ endchoice
+
+ choice
+ prompt "Selects Boost Runtime linkage."
+ default boost-runtime-shared
+ help
+ Choose which C and C++ runtimes to use:
+ -> Use Shared runtimes.
+ -> Use Static runtimes.
+ - Not available if Shared libs are to be built.
+ -> Use both runtimes.
+ - Not available if Shared libs are to be built.
+ - Two separate versions of Boost are built, linking each to a different runtime.
+ - This option requires "Use tagged names" option to be active.
+
+ config boost-runtime-shared
+ bool "Shared"
+
+ config boost-runtime-static
+ depends on @(!boost-shared-libs&&!boost-static-and-shared-libs)
+ bool "Static"
+
+ config boost-runtime-static-and-shared
+ depends on @(boost-use-name-tags&&!boost-shared-libs&&!boost-static-and-shared-libs)
+ bool "Both"
+ endchoice
+
+ choice
+ prompt "Select a Variant."
+ default boost-variant-release
+ help
+ Chooses which boost variant should be selected:
+ -> Release: Optimizes Boost for release.
+ - Optimization: Speed; Debug Symbols: Off; Inlining: Full; Runtime Debugging: Off.
+ -> Debug:
+ - Optimization: Off; Debug Symbols: On; Inlining: Off; Runtime Debugging: On.
+ -> Profile:
+ - Profiling: On; Debug Symbols: On.
+
+ config boost-variant-release
+ bool "Release"
+
+ config boost-variant-debug
+ bool "Debug"
+
+ config boost-variant-profile
+ bool "Profile"
+ endchoice
+
+ config boost-use-name-tags
+ bool "Use tagged names."
+ help
+ Add name tags the lib files, to diferentiate each library version:
+ "-mt" for multi-threading.
+ "-d" for debugging.
+ "-s" for runtime static link".
+ Might break compatibility with libraries that expect boost libs with default names.
+ default n
+
+ config boost-single-thread
+ depends on @boost-use-name-tags
+ bool "Single thread Support."
+ help
+ Compile Boost libraries in single-thread mode.
+ default n
- config boost-build-type-complete
- depends on @boost-use-name-tags
- bool "Complete Boost Build."
- help
- Builds both release and debug libs. It will take much longer to compile.
- default n
- endmenu
-
- menu "Select Boost libraries"
- depends on PACKAGE_boost
+ config boost-build-type-complete
+ depends on @boost-use-name-tags
+ bool "Complete Boost Build."
+ help
+ Builds both release and debug libs. It will take much longer to compile.
+ default n
+ endmenu
+
+ menu "Select Boost libraries"
+ depends on PACKAGE_boost
comment "Libraries"
config boost-libs-all
- bool "Include all Boost libraries."
- select PACKAGE_boost-libs
+ bool "Include all Boost libraries."
+ select PACKAGE_boost-libs
+ select boost-test-pkg
+ select boost-coroutine2
+ select boost-graph-parallel
config boost-test-pkg
- bool "Boost test package."
- select PACKAGE_boost-test
-
+ bool "Boost test package."
+ select PACKAGE_boost-test
+
config boost-coroutine2
- depends on @(GCC_VERSION_5 || GCC_VERSION_6)
- bool "Boost couroutine2 support."
- select PACKAGE_boost-coroutine
- default n
+ depends on !@GCC_VERSION_4_8
+ bool "Boost couroutine2 support."
+ select PACKAGE_boost-coroutine
+ default n
config boost-graph-parallel
- bool "Boost parallel graph support."
- select PACKAGE_boost-graph
- default n
+ bool "Boost parallel graph support."
+ select PACKAGE_boost-graph
+ default n
$(foreach lib,$(BOOST_LIBS), \
- config PACKAGE_boost-$(lib)
- prompt "Boost $(lib) library."
- $(if $(findstring locale,$(lib)),depends on @BUILD_NLS,)
+ config PACKAGE_boost-$(lib)
+ prompt "Boost $(lib) library."
+ $(if $(findstring locale,$(lib)),depends on @BUILD_NLS,)
+ $(if $(findstring fiber,$(lib)),depends on BROKEN,)
)
- endmenu
+ endmenu
endef
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_boost-test
define Package/boost-test
- $(call Package/boost/Default)
- TITLE+= (test)
- HIDDEN:=1
- DEPENDS+=+boost-system +boost-timer
+ $(call Package/boost/Default)
+ TITLE+= (test)
+ HIDDEN:=1
+ DEPENDS+=+boost-system +boost-timer
endef
define Build/Configure
$(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,))
$(eval $(call DefineBoostLibrary,date_time,,))
#$(eval $(call DefineBoostLibrary,exception,,))
+$(eval $(call DefineBoostLibrary,fiber,coroutine,))
$(eval $(call DefineBoostLibrary,filesystem,system,))
$(eval $(call DefineBoostLibrary,graph,regex,))
$(eval $(call DefineBoostLibrary,iostreams,,+PACKAGE_boost-iostreams:zlib))
$(if $(CONFIG_PACKAGE_boost-test),,--without-test) \
$(foreach lib,$(BOOST_LIBS), \
$(if $(findstring python,$(lib)), \
- $(if $(or $(CONFIG_PACKAGE_boost-python),$(CONFIG_PACKAGE_boost-python3)),,--without-python), \
- $(if $(CONFIG_PACKAGE_boost-$(lib)),,--without-$(lib))) \
+ $(if $(or $(CONFIG_PACKAGE_boost-python),$(CONFIG_PACKAGE_boost-python3)),,--without-python), \
+ $(if $(CONFIG_PACKAGE_boost-$(lib)),,--without-$(lib))) \
) \
$(if $(CONFIG_PACKAGE_boost-locale),boost.locale.iconv=on -sICONV_PATH=$(ICONV_PREFIX) boost.locale.posix=$(if $(USE_MUSL),on,off), \
boost.locale.iconv=off) \
$(PKG_INSTALL_DIR)/lib/ -name 'libboost_$(2)*.so*' -exec $(CP) {} $(1)/usr/lib/ \;
endef
-define Package/boost-test/install
+define Package/boost-test/install
$(INSTALL_DIR) \
$(1)/usr/lib
define BuildBoostLibrary
define Package/boost-$(1)/install
- $(call Package/boost/Default/install,$$(1),$(1))
+ $(call Package/boost/Default/install,$$(1),$(1))
endef
$$(eval $$(call BuildPackage,boost-$(1)))
$(call Package/gnutls/Default)
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Encryption
TITLE+= (certool utility)
DEPENDS+= +libgnutls
endef
$(call Package/gnutls/Default)
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Encryption
TITLE+= (utilities)
DEPENDS+= +libgnutls
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=libwebsockets
-PKG_VERSION:=2.0.2
+PKG_VERSION:=2.0.3
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/warmcat/libwebsockets.git
+PKG_SOURCE_URL:=https://codeload.github.com/warmcat/libwebsockets/tar.gz/v$(PKG_VERSION)?
+PKG_MD5SUM:=a025156d606d90579e65d53ccd062a94
+
+
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
VARIANT:=cyassl
endef
+define Package/libwebsockets-full
+ $(call Package/$(PKG_NAME)/Default)
+ TITLE += (Full - OpenSSL, libuv, plugins, CGI)
+ DEPENDS += +libopenssl +libuv
+ VARIANT:=full
+endef
+
ifeq ($(BUILD_VARIANT),openssl)
CMAKE_OPTIONS += -DLWS_OPENSSL_CLIENT_CERTS=/etc/ssl/certs
CMAKE_OPTIONS += -DLWS_OPENSSL_SUPPORT=ON
CMAKE_OPTIONS += -DLWS_CYASSL_INCLUDE_DIRS=$(STAGING_DIR)/usr/include
endif
+ifeq ($(BUILD_VARIANT),full)
+ CMAKE_OPTIONS += -DLWS_OPENSSL_CLIENT_CERTS=/etc/ssl/certs
+ CMAKE_OPTIONS += -DLWS_OPENSSL_SUPPORT=ON
+ CMAKE_OPTIONS += -DLWS_WITH_SSL=ON
+ CMAKE_OPTIONS += -DLWS_WITH_LIBUV=ON
+ CMAKE_OPTIONS += -DLWS_WITH_PLUGINS=ON
+ CMAKE_OPTIONS += -DLWS_WITH_SERVER_STATUS=ON
+ CMAKE_OPTIONS += -DLWS_WITH_ACCESS_LOG=ON
+ CMAKE_OPTIONS += -DLWS_WITH_CGI=ON
+endif
+
define Package/libwebsockets/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebsockets.so* $(1)/usr/lib/
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)
$(eval $(call BuildPackage,libwebsockets-openssl))
$(eval $(call BuildPackage,libwebsockets-cyassl))
+$(eval $(call BuildPackage,libwebsockets-full))
--- /dev/null
+#
+# Copyright (C) 2007-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:=loudmouth
+PKG_VERSION:=1.5.3
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_LICENSE:=LGPLv2.1
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/mcabber/loudmouth.git
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_MD5SUM:=7616cf124a8d72d007e7475b5aeb20ad
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/loudmouth
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+glib2 +libopenssl
+ TITLE:=loudmouth
+ URL:=https://github.com/mcabber/loudmouth
+endef
+
+define Package/loudmouth/description
+ Lightweight and easy-to-use C library for programming with the Jabber protocol
+endef
+
+CONFIGURE_ARGS += \
+ --with-ssl=openssl
+
+define Build/Configure
+ ( cd $(PKG_BUILD_DIR); ./autogen.sh )
+ $(call Build/Configure/Default)
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/loudmouth-1.0/ \
+ $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/*.so* \
+ $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
+ $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/loudmouth/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/*.so* \
+ $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,loudmouth))
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
-PKG_VERSION:=1.5.2
+PKG_VERSION:=1.5.3
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_scriptver="1.5.2"
+adb_scriptver="1.5.3"
adb_mincfgver="2.5"
adb_hotplugif=""
adb_lanif="lan"
f_depend "wget -" "true"
if [ "${package_ok}" = "true" ]
then
- adb_fetch="$(which wget)"
+ adb_fetch="$(which /usr/bin/wget* | head -1)"
fetch_parm="--no-config --quiet --tries=1 --no-cache --no-cookies --max-redirect=0 --dns-timeout=${adb_fetchttl} --connect-timeout=${adb_fetchttl} --read-timeout=${adb_fetchttl}"
response_parm="--spider --server-response"
- else
+ fi
+ if [ -z "${adb_fetch}" ]
+ then
rc=-1
f_log "please install 'uclient-fetch' or 'wget' with ssl support to use adblock"
f_exit
# main loop for all block list sources
#
+f_log "use '${adb_fetch}' for list downloads"
+
for src_name in ${adb_sources}
do
# check disabled sources
include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=38151
+PKG_SOURCE_VERSION:=38231
PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
--- /dev/null
+#
+# Copyright (C) 2009-2015 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:=lcdringer
+PKG_VERSION:=0.0.2
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.flyn.org/projects/lcdringer
+PKG_MD5SUM:=ff3fe82593792c9111f957dd533369fb
+PKG_BUILD_DEPENDS:=+vala
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/lcdringer
+ SECTION:=network
+ CATEGORY:=Network
+ DEPENDS:=+libgee +libgstreamer1 +loudmouth @TARGET_brcm2708
+ TITLE:=lcdringer
+ URL:=http://www.flyn.org/projects/lcdringer/
+endef
+
+define Package/lcdringer/decription
+ A simple Jabber-initiated ringer meant to run on a Raspberry Pi with a PiFace CAD
+endef
+
+define Package/lcdringer/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/bin/lcdringer \
+ $(1)/usr/bin/
+ $(INSTALL_BIN) ./files/lcdringer.init $(1)/etc/init.d/lcdringer
+ $(INSTALL_DIR) $(1)/usr/share/lcdringer
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/share/lcdringer/* \
+ $(1)/usr/share/lcdringer
+endef
+
+$(eval $(call BuildPackage,lcdringer))
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2009-2012 OpenWrt.org
+
+START=60
+
+start() {
+ /usr/bin/lcdringer &
+ echo $! > /var/run/lcdringer.pid
+}
+
+stop() {
+ if [ ! -f /var/run/lcdringer.pid ]; then
+ return
+ fi
+ /bin/kill -9 `cat /var/run/lcdringer.pid`
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=lighttpd
-PKG_VERSION:=1.4.41
+PKG_VERSION:=1.4.42
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://download.lighttpd.net/lighttpd/releases-1.4.x
-PKG_MD5SUM:=1df2e4dbc965cfe6f99f008ac3db4d8d
+PKG_MD5SUM:=53c55d7e1dac7adec161cd5490491f6d
PKG_LICENSE:=BSD-3c
PKG_LICENSE_FILES:=COPYING
--without-liblua \
--without-zenmap
-CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-builtin"
+CONFIGURE_VARS += \
+ ac_cv_dnet_bsd_bpf=no \
+ CXXFLAGS="$$$$CXXFLAGS -fno-builtin"
ifeq ($(BUILD_VARIANT),ssl)
CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr"
include $(TOPDIR)/rules.mk
PKG_NAME:=nsd
-PKG_VERSION:=4.1.9
+PKG_VERSION:=4.1.13
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/nsd
-PKG_MD5SUM:=9ac1d5ba51351d3d98b7de765439af57
+PKG_MD5SUM:=a3f2a9885bc8664ba4a25c938d26a587
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_NAME:=privoxy
PKG_VERSION:=3.0.26
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=privoxy-$(PKG_VERSION)-stable-src.tar.gz
PKG_SOURCE_URL:=@SF/ijbswa
$(1)/etc/config
$(INSTALL_DATA) ./files/privoxy.upgrade $(1)/lib/upgrade/keep.d/privoxy
$(INSTALL_BIN) ./files/privoxy.init $(1)/etc/init.d/privoxy
- $(INSTALL_BIN) ./files/privoxy.hotplug $(1)/etc/hotplug.d/iface/80-privoxy
+ $(INSTALL_BIN) ./files/privoxy.hotplug $(1)/etc/hotplug.d/iface/95-privoxy
$(INSTALL_CONF) ./files/privoxy.config $(1)/etc/config/privoxy
endef
#!/bin/sh /etc/rc.common
-START=80
-STOP=20
+START=95
+STOP=10
PIDFILE=/var/run/privoxy.pid
CFGFILE=/var/etc/privoxy.conf
_uci2conf() {
# redefined callback for options when calling config_load
- option_cb()
- {
- # $1 name of variable
- # $2 value
- local __OPT="$1"
- local __VAL="$2"
- case $__OPT in
- confdir|templdir|temporary_directory|logdir|logfile)
- # needs to be handled separately because we need to set permissions
- # AND needs to be defined first because of a BUG inside privoxy
- # require directories to be defined first inside config
- ;;
- debug_*)
- [ $__VAL -eq 0 ] && return # not set ignore
- echo -e "debug\t$(echo $__OPT | sed -e 's#debug_##g')" >> $CFGTEMP ;;
- *)
- # detect list options (LENGTH) and ignore
- echo $__OPT | grep -i "_LENGTH" >/dev/null 2>&1 && return
- # detect list options (ITEM) and ignore
- echo $__OPT | grep -i "_ITEM" >/dev/null 2>&1 && __OPT=$(echo $__OPT | sed -e "s#_ITEM.*##g")
- # uci only accept "_" but we need "-"
- local __OPT=$(echo $__OPT | sed -e "s#_#-#g")
- # write to config
- echo -e "$__OPT\t$__VAL" >> $CFGTEMP
- ;;
- esac
+ config_cb() {
+ if [ ."$2" != ."privoxy" ]; then
+ option_cb() { return 0; }
+ else
+ option_cb()
+ {
+ # $1 name of variable
+ # $2 value
+ local __OPT="$1"
+ local __VAL="$2"
+ case $__OPT in
+ confdir|templdir|temporary_directory|logdir|logfile)
+ # needs to be handled separately because we need to set permissions
+ # AND needs to be defined first because of a BUG inside privoxy
+ # require directories to be defined first inside config
+ ;;
+ debug_*)
+ [ $__VAL -eq 0 ] && return # not set ignore
+ echo -e "debug\t$(echo $__OPT | sed -e 's#debug_##g')" >> $CFGTEMP ;;
+ *)
+ # detect list options (LENGTH) and ignore
+ echo $__OPT | grep -i "_LENGTH" >/dev/null 2>&1 && return
+ # detect list options (ITEM) and ignore
+ echo $__OPT | grep -i "_ITEM" >/dev/null 2>&1 && __OPT=$(echo $__OPT | sed -e "s#_ITEM.*##g")
+ # uci only accept "_" but we need "-"
+ local __OPT=$(echo $__OPT | sed -e "s#_#-#g")
+ # write to config
+ echo -e "$__OPT\t$__VAL" >> $CFGTEMP
+ ;;
+ esac
+ }
+ fi
}
# temporary config file
echo -e "temporary-directory\t$_TMP_DIR" >> $CFGTEMP
fi
- config_load privoxy # calling above option_cb() and write the rest into $CFGTEMP
+ config_load "privoxy" # calling above option_cb() and write the rest into $CFGTEMP
# move temp to final privoxy readable configuration
mv -f $CFGTEMP $CFGFILE
#
-# Copyright (C) 2006-2015 OpenWrt.org
+# 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:=ser2net
-PKG_VERSION:=2.10.0
-PKG_RELEASE:=2
+PKG_VERSION:=3.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/ser2net
-PKG_MD5SUM:=cd937041144de83d41d811521e72158c
+PKG_MD5SUM:=bf8af8cfacd35828a9778d69972f6345
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+++ /dev/null
-ser2net: Fix compilation failures due to missing TIOCSRS485 macro
-
-Patch sent upstream:
- https://sourceforge.net/p/ser2net/mailman/message/32905302/
-
-Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
-
-From: Yegor Yefremov <yegorslists@googlemail.com>
-
-include <asm-generic/ioctls.h> fixes compilations for systems,
-where <asm-generic/ioctls.h> won't be included automatically.
-
-Move special Linux includes to dataxfer.h.
-
-Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
----
- dataxfer.h | 5 +++--
- devcfg.c | 2 --
- 2 files changed, 3 insertions(+), 4 deletions(-)
-
---- a/dataxfer.h
-+++ b/dataxfer.h
-@@ -20,8 +20,6 @@
- #ifndef DATAXFER
- #define DATAXFER
-
--#include <linux/serial.h>
--
- #include "controller.h"
-
- #ifdef USE_UUCP_LOCKING
-@@ -30,6 +28,9 @@ extern int uucp_locking_enabled;
-
- #ifdef linux
-
-+#include <linux/serial.h>
-+#include <asm-generic/ioctls.h>
-+
- #define USE_RS485_FEATURE
-
- /* Check, if the toolchain provides serial_rs485 structure and macros */
---- a/devcfg.c
-+++ b/devcfg.c
-@@ -18,7 +18,6 @@
- */
-
- /* This code handles generating the configuration for the serial port. */
--
- #include <unistd.h>
- #include <termios.h>
- #include <sys/ioctl.h>
-@@ -31,7 +30,6 @@
- #include <signal.h>
- #include <errno.h>
- #include <syslog.h>
--#include <linux/serial.h>
-
- #include "ser2net.h"
- #include "selector.h"
+++ /dev/null
-From fa68debd94d40299dd2a69abd0a820ccfaadcbe8 Mon Sep 17 00:00:00 2001
-From: Michael Heimpold <michael.heimpold@i2se.com>
-Date: Wed, 22 Apr 2015 13:35:43 +0200
-Subject: [PATCH] Add support for triggering LEDs during serial traffic
-
-Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
----
-
-Patch sent upstream:
- http://sourceforge.net/p/ser2net/mailman/message/34064847/
-
- Makefile.am | 4 +--
- dataxfer.c | 20 ++++++++++++
- readconfig.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- ser2net.conf | 13 ++++++++
- sysfs-led.c | 43 +++++++++++++++++++++++++
- sysfs-led.h | 11 +++++++
- utils.c | 30 ++++++++++++++++++
- utils.h | 9 ++++++
- 8 files changed, 228 insertions(+), 2 deletions(-)
- create mode 100644 sysfs-led.c
- create mode 100644 sysfs-led.h
-
-diff --git a/Makefile.am b/Makefile.am
-index d56179f..866eb89 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,9 +2,9 @@ sbin_PROGRAMS = ser2net
- ACLOCAL_AMFLAGS = -I m4
- AM_CFLAGS=-Wall
- ser2net_SOURCES = controller.c dataxfer.c devcfg.c readconfig.c selector.c \
-- ser2net.c utils.c telnet.c buffer.c
-+ ser2net.c utils.c telnet.c buffer.c sysfs-led.c
- noinst_HEADERS = controller.h dataxfer.h devio.h readconfig.h selector.h \
-- utils.h telnet.h buffer.h ser2net.h
-+ utils.h telnet.h buffer.h sysfs-led.h ser2net.h
- man_MANS = ser2net.8
- EXTRA_DIST = $(man_MANS) ser2net.conf ser2net.spec ser2net.init
-
-diff --git a/dataxfer.c b/dataxfer.c
-index 646a71b..b99cabf 100644
---- a/dataxfer.c
-+++ b/dataxfer.c
-@@ -42,6 +42,7 @@
- #include "telnet.h"
- #include "devio.h"
- #include "buffer.h"
-+#include "sysfs-led.h"
-
- #define SERIAL "term"
- #define NET "tcp "
-@@ -230,6 +231,12 @@ typedef struct port_info
- #ifdef USE_RS485_FEATURE
- struct serial_rs485 *rs485conf;
- #endif
-+
-+ /*
-+ * LED names to flash for serial traffic
-+ */
-+ char *led_tx;
-+ char *led_rx;
- } port_info_t;
-
- port_info_t *ports = NULL; /* Linked list of ports. */
-@@ -311,6 +318,8 @@ init_port_data(port_info_t *port)
- #ifdef USE_RS485_FEATURE
- port->rs485conf = NULL;
- #endif
-+ port->led_tx = NULL;
-+ port->led_rx = NULL;
- }
-
- static void
-@@ -530,6 +539,9 @@ handle_dev_fd_read(struct devio *io)
- /* Do both tracing, ignore errors. */
- do_trace(port, port->tb, port->dev_to_tcp.buf, count, SERIAL);
-
-+ if (port->led_rx)
-+ led_blink_kick(port->led_rx);
-+
- port->dev_bytes_received += count;
-
- if (port->enabled == PORT_TELNET) {
-@@ -759,6 +771,8 @@ handle_tcp_fd_read(int fd, void *data)
- return;
- }
- } else {
-+ if (port->led_tx)
-+ led_blink_kick(port->led_tx);
- port->dev_bytes_sent += count;
- port->tcp_to_dev.cursize -= count;
- if (port->tcp_to_dev.cursize != 0) {
-@@ -1854,6 +1868,12 @@ myconfig(void *data, struct absout *eout, const char *pos)
- } else if (strncmp(pos, "tb=", 3) == 0) {
- /* trace both directions. */
- port->trace_both.filename = find_tracefile(pos + 3);
-+ } else if (strncmp(pos, "led-rx=", 7) == 0) {
-+ /* LED for UART RX traffic */
-+ port->led_rx = find_led(pos + 7);
-+ } else if (strncmp(pos, "led-tx=", 7) == 0) {
-+ /* LED for UART TX traffic */
-+ port->led_tx = find_led(pos + 7);
- #ifdef USE_RS485_FEATURE
- } else if (strncmp(pos, "rs485=", 6) == 0) {
- /* get RS485 configuration. */
-diff --git a/readconfig.c b/readconfig.c
-index d4ca0d4..62cff5c 100644
---- a/readconfig.c
-+++ b/readconfig.c
-@@ -31,6 +31,7 @@
- #include "readconfig.h"
- #include "utils.h"
- #include "telnet.h"
-+#include "sysfs-led.h"
-
- #define MAX_LINE_SIZE 256 /* Maximum line length in the config file. */
-
-@@ -361,6 +362,89 @@ free_rs485confs(void)
- }
- #endif
-
-+struct led_s
-+{
-+ char *name;
-+ char *device;
-+ unsigned int duration;
-+ struct led_s *next;
-+};
-+
-+/* all LEDs in the system. */
-+struct led_s *leds = NULL;
-+
-+static void
-+handle_led(char *name, char *cfg)
-+{
-+ struct led_s *new_led;
-+ char devicename[256];
-+
-+ new_led = malloc(sizeof(*new_led));
-+ if (!new_led) {
-+ syslog(LOG_ERR, "Out of memory handling LED on %d", lineno);
-+ return;
-+ }
-+
-+ new_led->name = strdup(name);
-+ if (!new_led->name) {
-+ syslog(LOG_ERR, "Out of memory handling LED on %d", lineno);
-+ free(new_led);
-+ return;
-+ }
-+
-+ if (sscanf(cfg, "%256s %u", devicename, &new_led->duration) != 2) {
-+ syslog(LOG_ERR, "Couldn't parse LED config on %d", lineno);
-+ free(new_led->name);
-+ free(new_led);
-+ return;
-+ }
-+
-+ new_led->device = strdup(devicename);
-+ if (!new_led->device) {
-+ syslog(LOG_ERR, "Out of memory handling LED on %d", lineno);
-+ free(new_led->name);
-+ free(new_led);
-+ return;
-+ }
-+
-+ /* setup the led */
-+ led_blink_prepare(new_led->device, new_led->duration);
-+
-+ new_led->next = leds;
-+ leds = new_led;
-+}
-+
-+char *
-+find_led(const char *name)
-+{
-+ struct led_s *led = leds;
-+
-+ while (led) {
-+ if (strcmp(name, led->name) == 0)
-+ return strdup(led->device);
-+ led = led->next;
-+ }
-+ syslog(LOG_ERR, "LED %s not found, it will be ignored", name);
-+ return NULL;
-+}
-+
-+static void
-+free_leds(void)
-+{
-+ struct led_s *led;
-+
-+ while (leds) {
-+ led = leds;
-+ leds = leds->next;
-+
-+ led_off(led->device);
-+
-+ free(led->name);
-+ free(led->device);
-+ free(led);
-+ }
-+}
-+
- static int
- startswith(char *str, const char *test, char **strtok_data)
- {
-@@ -503,6 +587,21 @@ handle_config_line(char *inbuf)
- return;
- }
-
-+ if (startswith(inbuf, "LED", &strtok_data)) {
-+ char *name = strtok_r(NULL, ":", &strtok_data);
-+ char *str = strtok_r(NULL, "\n", &strtok_data);
-+ if (name == NULL) {
-+ syslog(LOG_ERR, "No LED name given on line %d", lineno);
-+ return;
-+ }
-+ if ((str == NULL) || (strlen(str) == 0)) {
-+ syslog(LOG_ERR, "No LED given on line %d", lineno);
-+ return;
-+ }
-+ handle_led(name, str);
-+ return;
-+ }
-+
- comma = strchr(inbuf, ',');
- if (comma) {
- if (!strtok_r(comma, ":", &strtok_data)) {
-@@ -568,6 +667,7 @@ readconfig(char *filename)
- #ifdef USE_RS485_FEATURE
- free_rs485confs();
- #endif
-+ free_leds();
-
- config_num++;
-
-diff --git a/ser2net.conf b/ser2net.conf
-index 870926c..dc2ba19 100644
---- a/ser2net.conf
-+++ b/ser2net.conf
-@@ -53,6 +53,8 @@
- # specified in TRACEFILE that will take all traced data.
- # tw is data written to the device, tr is data read from
- # the device, and tb is both.
-+# The "led-tx" and "led-rx" options allow to specify
-+# a LED defined above to trigger for traffic.
- #
- # or...
-
-@@ -79,6 +81,12 @@
- # This specifies a filename to trace output into, as tw=/tmp/trace1.
- # This takes the same escape sequences as banners.
- #
-+# LED:<name>:sysfs-filename duration
-+# This specifies a LED which will be configured to use linux's transient trigger.
-+# The LED is always kicked when traffic is detected on serial side. The duration
-+# is given in milliseconds. See Linux's documentation for transient trigger for
-+# details.
-+#
- # OPENSTR:<name>:str
- # This specifies a string to be transmitted to the device when the
- # port is opened. This takes the same escape sequences as banners.
-@@ -108,6 +116,9 @@ SIGNATURE:signature1:ser2net port ttyS2
-
- RS485CONF:rs485port1:0:0:0:0
-
-+LED:rx:duckbill:green:rs485 10
-+LED:tx:duckbill:red:rs485 10
-+
- TRACEFILE:tw1:/tmp/tw-\p-\Y-\M-\D-\H:\i:\s.\U
- TRACEFILE:tr1:/tmp/tr-\p-\Y-\M-\D-\H:\i:\s.\U
-
-@@ -138,3 +149,5 @@ CLOSESTR:close1:close str\r\n
-
- 3020:telnet:0:/dev/ttyUSB0:9600 banner1 remctl asdfasd
- 3021:telnet:0:/dev/ttyUSB1:9600 banner2 open1 close1 remctl
-+
-+5000:telnet:0:/dev/ttyAPP0:9600 NONE 1STOPBIT 8DATABITS -XONXOFF LOCAL -RTSCTS led-tx=tx led-rx=rx
-diff --git a/sysfs-led.c b/sysfs-led.c
-new file mode 100644
-index 0000000..efe0b29
---- /dev/null
-+++ b/sysfs-led.c
-@@ -0,0 +1,43 @@
-+/*
-+ * Copyright (C) 2015 I2SE GmbH
-+ */
-+#include <stdio.h>
-+#include <string.h>
-+
-+#include "utils.h"
-+#include "sysfs-led.h"
-+
-+#define SYSFS_LED_BASE "/sys/class/leds"
-+
-+static int led_write(char *led, char *property, char *buf)
-+{
-+ char fn[255];
-+
-+ snprintf(fn, sizeof(fn), "%s/%s/%s", SYSFS_LED_BASE, led, property);
-+
-+ return file_store(fn, buf, strlen(buf));
-+}
-+
-+int led_off(char *led)
-+{
-+ led_write(led, "trigger", "none");
-+ led_write(led, "brightness", "0");
-+ return 0;
-+}
-+
-+int led_blink_prepare(char *led, unsigned int duration)
-+{
-+ char buffer[10];
-+
-+ snprintf(buffer, sizeof(buffer), "%u", duration);
-+ led_write(led, "trigger", "transient");
-+ msleep(10);
-+ led_write(led, "state", "1");
-+ led_write(led, "duration", buffer);
-+ return 0;
-+}
-+
-+int led_blink_kick(char *led)
-+{
-+ return led_write(led, "activate", "1");
-+}
-diff --git a/sysfs-led.h b/sysfs-led.h
-new file mode 100644
-index 0000000..00b21b6
---- /dev/null
-+++ b/sysfs-led.h
-@@ -0,0 +1,11 @@
-+/*
-+ * Copyright (C) 2015 I2SE GmbH
-+ */
-+#ifndef SYSFS_LED_H
-+#define SYSFS_LED_H
-+
-+int led_off(char *led);
-+int led_blink_prepare(char *led, unsigned int duration);
-+int led_blink_kick(char *led);
-+
-+#endif /* SYSFS_LED_H */
-diff --git a/utils.c b/utils.c
-index c194c4c..c96cedb 100644
---- a/utils.c
-+++ b/utils.c
-@@ -25,6 +25,9 @@
- #include <errno.h>
- #include <unistd.h>
- #include <fcntl.h>
-+#include <time.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-
- #include "ser2net.h"
- #include "utils.h"
-@@ -205,3 +208,30 @@ write_ignore_fail(int fd, const char *data, size_t count)
- count -= written;
- }
- }
-+
-+int
-+msleep(int msec)
-+{
-+ struct timespec req;
-+
-+ req.tv_sec = 0;
-+ req.tv_nsec = msec * 1000000;
-+
-+ return nanosleep(&req, NULL);
-+}
-+
-+int
-+file_store(const char *filename, const char *buf, size_t count)
-+{
-+ int fd;
-+
-+ if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) == -1)
-+ return -1;
-+
-+ if (write(fd, buf, count) != count) {
-+ close(fd);
-+ return -1;
-+ }
-+
-+ return close(fd);
-+}
-diff --git a/utils.h b/utils.h
-index 582ea88..8af65ec 100644
---- a/utils.h
-+++ b/utils.h
-@@ -64,6 +64,9 @@ char *find_tracefile(const char *name);
- /* Search for RS485 configuration by name. */
- struct serial_rs485 *find_rs485conf(const char *name);
-
-+/* Search for a LED by name */
-+char *find_led(const char *name);
-+
- void check_ipv6_only(int family, struct sockaddr *addr, int fd);
-
- /* Make sure the full contents get written, return an error if it occurs. */
-@@ -72,4 +75,10 @@ int write_full(int fd, char *data, size_t count);
- /* Write the data completely out, return without comment on error. */
- void write_ignore_fail(int fd, const char *data, size_t count);
-
-+/* Helper to sleep a given amount of milli-seconds */
-+int msleep(int msec);
-+
-+/* Store the given data to a file */
-+int file_store(const char *filename, const char *buf, size_t count);
-+
- #endif /* UTILS */
---
-1.7.10.4
-
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=0.2.2
+PKG_VERSION:=0.2.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
-# travelmate, a connection manager for travel router
+# travelmate, a wlan connection manager for travel router
## Description
If you’re planning an upcoming vacation or a business trip, taking your laptop, tablet or smartphone give you the ability to connect with friends or complete work on the go. But many hotels don’t have a secure wireless network setup or you’re limited on using a single device at once. Investing in a portable, mini travel router is a great way to connect all of your devices at once while having total control over your own personalized wireless network.
## OpenWrt / LEDE trunk Installation & Usage
* install 'travelmate' (_opkg install travelmate_)
* configure your network to support (multiple) wlan uplinks and set travelmate config options (details see below)
+* set 'trm\_enabled' option in travelmate config to '1'
* travelmate starts automatically during boot, triggered by procd as soon as the wireless subsystem is up & running
## Chaos Calmer installation notes
* 'travelmate' is _not_ available as an ipk package in the Chaos Calmer download repository
-* download the package from a development snapshot package directory:
- * for 'travelmate' look [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages/)
+* download the package from a development snapshot package directory, i.e. look [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages/)
* manually transfer the package to your routers temp directory (with tools like _sshfs_ or _winscp_)
* install the package as described above
* mandatory config options:
* trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled)
* trm\_loop => loop timeout in seconds for wlan monitoring (default: '30')
- * trm\_maxretry => how many times should travelmate try to connect to uplink xyz (default: '3')
+ * trm\_maxretry => how many times should travelmate try to connect to a certain uplink, to disable this check at all set it to '0' (default: '3')
* optional config options:
* trm\_debug => enable/disable debug logging (default: '0', disabled)
- * trm\_device => limit travelmate to a dedicated radio, i.e 'radio0' (default: '', use all radios)
- * trm\_iw => force travelmate to use iwinfo (even if iw is installed) set this option to 'none' (default: '', use iw if found)
+ * trm\_device => limit travelmate to a dedicated radio, i.e 'radio0' (default: use all radios)
+ * trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw)
## Setup
-**1. configure (multiple) wwan interfaces in /etc/config/network:**
+**1. configure a wwan interface in /etc/config/network:**
<pre><code>
[...]
-config interface 'wwan01'
- option proto 'dhcp'
-config interface 'wwan02'
- option proto 'dhcp'
-config interface 'wwan03'
+config interface 'wwan'
option proto 'dhcp'
[...]
</code></pre>
-**2. add these interfaces to your firewall configuration in /etc/config/firewall:**
+**2. add this interface to your firewall configuration in /etc/config/firewall:**
<pre><code>
[...]
config zone
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
- option network 'wan wan6 wwan01 wwan02 wwan03 [...]'
+ option network 'wan wan6 wwan'
[...]
</code></pre>
-**3. add required station interfaces to your wireless configuration in etc/config/wireless:**
+**3. add required wwan stations to your wireless configuration in etc/config/wireless:**
<pre><code>
[...]
config wifi-iface
option device 'radio0'
- option network 'wwan01'
+ option network 'wwan'
option mode 'sta'
option ssid 'example_01'
- option ifname 'wlan1'
+ option ifname 'wwan01'
option encryption 'psk2+ccmp'
option key 'abc'
option disabled '1'
config wifi-iface
option device 'radio0'
- option network 'wwan02'
+ option network 'wwan'
option mode 'sta'
option ssid 'example_02'
- option ifname 'wlan2'
+ option ifname 'wwan02'
option encryption 'psk2+ccmp'
option key 'xyz'
option disabled '1'
config wifi-iface
option device 'radio0'
- option network 'wwan03'
+ option network 'wwan'
option mode 'sta'
- option ssid 'Telekom_ICE'
- option ifname 'wlan3'
+ option ssid 'example_03'
+ option ifname 'wwan03'
option encryption 'none'
option disabled '1'
[...]
</code></pre>
-**4. configure & start travelmate:**
+**4. reload network configuration & start travelmate:**
<pre><code>
/etc/init.d/network reload
/etc/init.d/travelmate start
</code></pre>
-**Common runtime outputs**
+**Common runtime outputs (visible via logread)**
**Success:** Sun Oct 9 17:02:21 2016 user.notice root: travelmate-0.2.1[712] info : wlan interface "wwan06" connected to uplink "blackhole.nl"
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_debug="0"
trm_pid="${$}"
-trm_ver="0.2.2"
+trm_ver="0.2.4"
+trm_debug=0
trm_loop=30
trm_maxretry=3
+trm_iw=1
trm_device=""
-trm_iw="$(which iw)"
# function to prepare all relevant AP and STA interfaces
#
trm_prepare()
{
local config="${1}"
- local device="$(uci -q get wireless."${config}".device)"
local mode="$(uci -q get wireless."${config}".mode)"
+ local device="$(uci -q get wireless."${config}".device)"
local network="$(uci -q get wireless."${config}".network)"
+ local ifname="$(uci -q get wireless."${config}".ifname)"
local disabled="$(uci -q get wireless."${config}".disabled)"
if [ "${mode}" = "ap" ] &&
([ -z "${trm_device}" ] || [ "${trm_device}" = "${device}" ])
then
- ifname="$(uci -q get wireless."${config}".ifname)"
trm_aplist="${trm_aplist} ${ifname}"
if [ -z "${disabled}" ] || [ "${disabled}" = "1" ]
then
fi
}
-# function to set different wlan interface states
+# function to set different wlan interface status
#
trm_set()
{
fi
}
-# function to check interface state on "up" event
+# function to check interface status on "up" event
#
trm_check()
{
while [ $((cnt)) -lt 15 ]
do
json_load "$(ubus -S call network.interface."${interface}" status)"
- json_get_var trm_state up
- if [ "${trm_state}" = "1" ] || [ -n "${trm_uplink}" ]
+ json_get_var trm_status up
+ if [ "${trm_status}" = "1" ] || [ -n "${trm_uplink}" ]
then
- trm_log "debug" "check::: interface: ${interface}, status: ${trm_state}, uplink: ${trm_uplink}, count: ${cnt}"
+ trm_log "debug" "check::: interface: ${interface}, status: ${trm_status}, uplink-sta: ${trm_uplink}, uplink-ssid: ${trm_ssid} count: ${cnt}"
json_cleanup
break
fi
sleep 1
done
done
- if [ -n "${trm_uplink}" ] && [ "${trm_state}" = "0" ]
+ if [ -n "${trm_uplink}" ] && [ "${trm_status}" = "0" ]
then
ubus call network reload
+ eval "trm_count_${trm_uplink}=\$((trm_count_${trm_uplink}+1))"
trm_checklist=""
- trm_log "info" "uplink ${ssid} get lost"
+ trm_log "info" "uplink ${trm_ssid} get lost"
elif [ -z "${trm_uplink}" ] && [ -n "${trm_checklist}" ]
then
trm_checklist=""
local class="${1}"
local log_msg="${2}"
- if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || ([ "${class}" = "debug" ] && [ "${trm_debug}" = "1" ]))
+ if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || ([ "${class}" = "debug" ] && [ $((trm_debug)) -eq 1 ]))
then
logger -t "travelmate-${trm_ver}[${trm_pid}] ${class}" "${log_msg}" 2>&1
fi
local value="${2}"
eval "${option}=\"${value}\""
}
+
config_load travelmate
+
if [ "${trm_enabled}" != "1" ]
then
trm_log "info" "travelmate is currently disabled, please set 'trm_enabled' to '1' to use this service"
# check for preferred wireless tool
#
-if [ ! -f "${trm_iw}" ]
+if [ $((trm_iw)) -eq 1 ]
then
- trm_iwinfo="$(which iwinfo)"
- if [ ! -f "${trm_iwinfo}" ]
- then
- trm_log "error" "no wireless tool for scanning found, please install 'iw' or 'iwinfo'"
- exit 255
- fi
+ trm_scanner="$(which iw)"
+else
+ trm_scanner="$(which iwinfo)"
+fi
+
+if [ -z "${trm_scanner}" ]
+then
+ trm_log "error" "no wireless tool for wlan scanning found, please install 'iw' or 'iwinfo'"
+ exit 255
fi
# infinitive loop to establish and track STA uplink connections
#
while true
do
- if [ -z "${trm_uplink}" ] || [ "${trm_state}" = "0" ]
+ if [ -z "${trm_uplink}" ] || [ "${trm_status}" = "0" ]
then
trm_uplink=""
trm_aplist=""
for ap in ${trm_aplist}
do
ubus -t 10 wait_for hostapd."${ap}"
- if [ -f "${trm_iw}" ]
+ if [ $((trm_iw)) -eq 1 ]
then
- trm_ssidlist="$(${trm_iw} dev "${ap}" scan 2>/dev/null | awk '/SSID: /{if(!seen[$0]++){printf "\"";for(i=2; i<=NF; i++)if(i==2)printf $i;else printf " "$i;printf "\" "}}')"
+ trm_ssidlist="$(${trm_scanner} dev "${ap}" scan 2>/dev/null | awk '/SSID: /{if(!seen[$0]++){printf "\"";for(i=2; i<=NF; i++)if(i==2)printf $i;else printf " "$i;printf "\" "}}')"
else
- trm_ssidlist="$(${trm_iwinfo} "${ap}" scan | awk '/ESSID: ".*"/{ORS=" ";if (!seen[$0]++) for(i=2; i<=NF; i++) print $i}')"
+ trm_ssidlist="$(${trm_scanner} "${ap}" scan | awk '/ESSID: ".*"/{ORS=" ";if (!seen[$0]++) for(i=2; i<=NF; i++) print $i}')"
fi
- trm_log "debug" "main ::: iw: ${trm_iw}, iwinfo: ${trm_iwinfo}, ssidlist: ${trm_ssidlist}"
+ trm_log "debug" "main ::: scan-tool: ${trm_scanner}, ssidlist: ${trm_ssidlist}"
if [ -n "${trm_ssidlist}" ]
then
for sta in ${trm_stalist}
do
- config="${sta%%_*}"
- network="${sta##*_}"
- ssid="\"$(uci -q get wireless."${config}".ssid)\""
- if [ $((trm_count_${network})) -lt $((trm_maxretry)) ]
+ trm_config="${sta%%_*}"
+ trm_network="${sta##*_}"
+ trm_ifname="$(uci -q get wireless."${trm_config}".ifname)"
+ trm_ssid="\"$(uci -q get wireless."${trm_config}".ssid)\""
+ if [ $((trm_count_${trm_config}_${trm_network})) -lt $((trm_maxretry)) ] || [ $((trm_maxretry)) -eq 0 ]
then
- if [ -n "$(printf "${trm_ssidlist}" | grep -Fo "${ssid}")" ]
+ if [ -n "$(printf "${trm_ssidlist}" | grep -Fo "${trm_ssid}")" ]
then
- trm_set "partial" "${config}" "${network}" "up"
- if [ "${trm_state}" = "1" ]
+ trm_set "partial" "${trm_config}" "${trm_network}" "up"
+ if [ "${trm_status}" = "1" ]
then
- trm_uplink="${network}"
- trm_checklist="${trm_uplink}"
+ trm_checklist="${trm_network}"
+ trm_uplink="${trm_config}_${trm_network}"
trm_set "defer"
- trm_log "info" "wlan interface \"${network}\" connected to uplink ${ssid}"
+ trm_log "info" "wwan interface \"${trm_ifname}\" connected to uplink ${trm_ssid}"
break 2
else
trm_set "revert"
- eval "trm_count_${network}=\$((trm_count_${network}+1))"
+ eval "trm_count_${trm_config}_${trm_network}=\$((trm_count_${trm_config}_${trm_network}+1))"
fi
fi
- elif [ $((trm_count_${network})) -eq $((trm_maxretry)) ]
+ elif [ $((trm_count_${trm_config}_${trm_network})) -eq $((trm_maxretry)) ] && [ $((trm_maxretry)) -ne 0 ]
then
- eval "trm_count_${network}=\$((trm_count_${network}+1))"
- trm_log "info" "uplink ${ssid} disabled due to permanent connection failures"
+ eval "trm_count_${trm_config}_${trm_network}=\$((trm_count_${trm_config}_${trm_network}+1))"
+ trm_log "info" "uplink ${trm_ssid} disabled due to permanent connection failures"
fi
done
fi
- sleep 1
+ sleep 5
done
sleep 5
else
PKG_NAME:=unbound
PKG_VERSION:=1.5.10
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
$(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
$(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/unbound
- $(INSTALL_CONF) \
+ $(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
- $(1)/etc/unbound/
- $(INSTALL_CONF) ./files/root.key $(1)/etc/unbound/
+ $(1)/etc/unbound/unbound.conf
+ $(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+ $(INSTALL_BIN) ./files/unbound.iface $(1)/etc/hotplug.d/iface/25-unbound
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
+ $(INSTALL_DIR) $(1)/usr/lib/unbound
+ $(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
+ $(INSTALL_DATA) ./files/rootzone.sh $(1)/usr/lib/unbound/rootzone.sh
endef
define Package/unbound-anchor/install
--- /dev/null
+#!/bin/sh
+##############################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# 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.
+#
+# Copyright (C) 2016 Eric Luehrsen
+#
+##############################################################################
+#
+# This component needs to be used within the unbound.sh as an include. It uses
+# defaults and UCI scope variables defined there. It will copy root.key back
+# to /etc/unbound/ periodically, but avoid ROM flash abuse (UCI option).
+#
+##############################################################################
+
+rootzone_uci() {
+ # TODO: Just structure to real UCI coming soon.
+ echo
+}
+
+##############################################################################
+
+roothints_update() {
+ # TODO: Maybe this will not be implemented.
+ echo
+}
+
+##############################################################################
+
+rootkey_update() {
+ local basekey_date rootkey_date rootkey_age filestuff
+
+ # TODO: Just structure to real UCI coming soon.
+ if [ "$UNBOUND_N_ROOT_AGE" -gt 90 -o "$UNBOUND_B_DNSSEC" -lt 1 ] ; then
+ # Feature disabled
+ return 0
+ fi
+
+
+ if [ -f /etc/unbound/root.key ] ; then
+ basekey_date=$( date -r /etc/unbound/root.key +%s )
+
+ else
+ # No persistent storage key
+ basekey_date=$( date -d 2000-01-01 +%s )
+ fi
+
+
+ if [ -f "$UNBOUND_KEYFILE" ] ; then
+ # Unbound maintains it itself
+ rootkey_date=$( date -r $UNBOUND_KEYFILE +%s )
+ rootkey_age=$(( (rootkey_date - basekey_date) / 86440 ))
+
+ elif [ -x "$UNBOUND_ANCHOR" ] ; then
+ # No tmpfs key - use unbound-anchor
+ rootkey_date=$( date -I +%s )
+ rootkey_age=$(( (rootkey_date - basekey_date) / 86440 ))
+ $UNBOUND_ANCHOR -a $UNBOUND_KEYFILE
+
+ else
+ # give up
+ rootkey_age=0
+ fi
+
+
+ if [ "$rootkey_age" -gt "$UNBOUND_N_ROOT_AGE" ] ; then
+ filestuff=$( cat $UNBOUND_KEYFILE )
+
+
+ case "$filestuff" in
+ *NOERROR*)
+ # Header comment for drill and dig
+ logger -t unbound -s "root.key updated after $rootkey_age days"
+ cp -p $UNBOUND_KEYFILE /etc/unbound/root.key
+ ;;
+
+ *"state=2 [ VALID ]"*)
+ # Comment inline to key for unbound-anchor
+ logger -t unbound -s "root.key updated after $rootkey_age days"
+ cp -p $UNBOUND_KEYFILE /etc/unbound/root.key
+ ;;
+
+ *)
+ logger -t unbound -s "root.key still $rootkey_age days old"
+ ;;
+ esac
+ fi
+}
+
+##############################################################################
+
+rootzone_update() {
+ rootzone_uci
+ roothints_update
+ rootkey_update
+}
+
+##############################################################################
+
--- /dev/null
+#!/bin/sh
+##############################################################################
+#
+# Copyright (C) 2016 Eric Luehrsen
+#
+##############################################################################
+#
+# "Restart" Unbound on hotplug interface up:
+# - Clean rebind of unbound to new interfaces
+# - Some of Unbound conf options to not reload run time
+# - Unbound can grow a bit so this will shrink it back
+#
+##############################################################################
+
+if [ "$ACTION" = ifup ] && /etc/init.d/unbound enabled ; then
+ /etc/init.d/unbound restart
+fi
+
+##############################################################################
+
#!/bin/sh /etc/rc.common
-# Copyright (C) 2016 Michael Hanselmann
-
-START=61
+##############################################################################
+#
+# Copyright (C) 2016 Michael Hanselmann, Eric Luehrsen
+#
+##############################################################################
+#
+# This init script is just the entry point for Unbound UCI.
+#
+##############################################################################
+START=60
USE_PROCD=1
+PROG=/usr/sbin/unbound
+
+##############################################################################
+
+. /usr/lib/unbound/unbound.sh
+
+##############################################################################
start_service() {
- find /etc/unbound \! \( -user unbound -group unbound \) \
- -exec chown unbound:unbound {} \;
+ unbound_prepare
- find /etc/unbound \( -perm +027 -o \! -perm -600 \) \
- -exec chmod u=rwX,g=rX,o= {} \;
+ procd_open_instance
+ procd_set_param command $PROG -d -c $UNBOUND_CONFFILE
+ procd_set_param respawn
+ procd_close_instance
+}
+
+##############################################################################
- procd_open_instance
- procd_set_param command /usr/sbin/unbound
- procd_append_param command -d # don't daemonize
- procd_set_param respawn
- procd_close_instance
+stop_service() {
+ rootzone_update
}
+
+##############################################################################
+
--- /dev/null
+#!/bin/sh
+##############################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# 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.
+#
+# Copyright (C) 2016 Eric Luehrsen
+#
+##############################################################################
+#
+# TODO: This file will build the UCI for Unbound. This iteration only puts
+# our default unbound configuration and root.key into /var/lib/unbound.
+#
+##############################################################################
+
+# TODO: Just default definitions versus real UCI coming soon.
+UNBOUND_B_MAN_CONF=1
+UNBOUND_B_DNSSEC=1
+UNBOUND_N_ROOT_AGE=7
+
+##############################################################################
+
+UNBOUND_ANCHOR=/usr/bin/unbound-anchor
+UNBOUND_CONTROL=/usr/bin/unbound-control
+
+UNBOUND_LIBDIR=/usr/lib/unbound
+
+UNBOUND_PIDFILE=/var/run/unbound.pid
+
+UNBOUND_VARDIR=/var/lib/unbound
+UNBOUND_CONFFILE=$UNBOUND_VARDIR/unbound.conf
+UNBOUND_KEYFILE=$UNBOUND_VARDIR/root.key
+UNBOUND_HINTFILE=$UNBOUND_VARDIR/root.hints
+UNBOUND_CHECKFILE=$UNBOUND_VARDIR/unbound.check
+
+##############################################################################
+
+. /lib/functions.sh
+. /lib/functions/network.sh
+
+. $UNBOUND_LIBDIR/rootzone.sh
+
+##############################################################################
+
+unbound_mkdir() {
+ mkdir -p $UNBOUND_VARDIR
+
+
+ if [ -f /etc/unbound/root.hints ] ; then
+ # Your own local copy of root.hints
+ cp -p /etc/unbound/root.hints $UNBOUND_HINTFILE
+
+ elif [ -f /usr/share/dns/root.hints ] ; then
+ # Debian-like package dns-root-data
+ cp -p /usr/share/dns/root.hints $UNBOUND_HINTFILE
+
+ else
+ logger -t unbound -s "iterator will use built-in root hints"
+ fi
+
+
+ if [ -f /etc/unbound/root.key ] ; then
+ # Your own local copy of a root.key
+ cp -p /etc/unbound/root.key $UNBOUND_KEYFILE
+
+ elif [ -f /usr/share/dns/root.key ] ; then
+ # Debian-like package dns-root-data
+ cp -p /usr/share/dns/root.key $UNBOUND_KEYFILE
+
+ elif [ -x "$UNBOUND_ANCHOR" ] ; then
+ $UNBOUND_ANCHOR -a $UNBOUND_KEYFILE
+
+ else
+ logger -t unbound -s "validator will use built-in trust anchor"
+ fi
+}
+
+##############################################################################
+
+unbound_conf() {
+ # TODO: Just structure to real UCI coming soon.
+ if [ "$UNBOUND_B_MAN_CONF" -gt 0 -a -f /etc/unbound/unbound.conf ] ; then
+ # You don't want UCI and use your own manual configuration
+ cp -p /etc/unbound/unbound.conf $UNBOUND_CONFFILE
+ fi
+}
+
+##############################################################################
+
+unbound_own() {
+ # Debug UCI
+ {
+ echo "# $UNBOUND_CHECKFILE generated by UCI $( date )"
+ echo
+ set | grep ^UNBOUND_
+ } > $UNBOUND_CHECKFILE
+
+
+ if [ ! -f "$UNBOUND_CONFFILE" ] ; then
+ # if somehow this happened
+ touch $UNBOUND_CONFFILE
+ fi
+
+
+ # Ensure Access
+ chown -R unbound:unbound $UNBOUND_VARDIR
+ chmod 775 $UNBOUND_VARDIR
+ chmod 664 $UNBOUND_VARDIR/*
+}
+
+##############################################################################
+
+unbound_prepare() {
+ unbound_mkdir
+ unbound_conf
+ unbound_own
+}
+
+##############################################################################
+
diff --git a/doc/example.conf.in b/doc/example.conf.in
-index c520c88..af92a87 100644
+index c520c88..98a148a 100644
--- a/doc/example.conf.in
+++ b/doc/example.conf.in
-@@ -1,20 +1,81 @@
+@@ -1,20 +1,82 @@
-#
-# Example configuration file.
-#
+ # verbosity 1 is default
verbosity: 1
-+ # prevent any upstream core surprises (OpenWrt assumptions)
++ # Self jail Unbound with user "unbound" to /var/lib/unbound
++ # The script /etc/init.d/unbound will setup the location
+ username: "unbound"
++ directory: "/var/lib/unbound"
++ chroot: "/var/lib/unbound"
++
++ # The pid file is created before privleges drop so no concern
+ pidfile: "/var/run/unbound.pid"
-+ directory: "/etc/unbound"
-+ chroot: ""
+
+ # no threads and no memory slabs for threads
+ num-threads: 1
+ # use somewhat higher port numbers versus possible NAT issue
+ outgoing-port-permit: "10240-65335"
+
-+ # uses less memory, but less performance
++ # uses less memory but less performance
+ outgoing-range: 60
+ num-queries-per-thread: 30
+
+ harden-large-queries: yes
+ harden-short-bufsize: yes
+
-+ # Enable a trust anchor and modules "validator iterator." However, Unbound
-+ # RFC5011 "auto-trust-anchor-" activity can be busy and harmful to flash ROM.
-+ # "/etc/unbound" (directory & files) needs chown for write access. Else, use
-+ # plain "trust-anchor-" to treat the key file as static.
++ # DNSSEC enable by removing comments on "module-config:" and "auto-trust-
++ # -anchor-file:" The init script will copy root key to /var/lib/unbound.
++ # See package documentation for crontab entry to copy RFC5011 results back.
+ #module-config: "validator iterator"
-+ #auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@"
-+ #trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@"
++ #auto-trust-anchor-file: "/var/lib/unbound/root.key"
+
+ # DNSSEC needs real time to validate signatures. If your device does not
+ # have power off clock (reboot), then you may need this work around.
PKG_NAME:=wireguard
-PKG_VERSION:=0.0.20161001
+PKG_VERSION:=0.0.20161025
PKG_RELEASE:=1
PKG_SOURCE:=WireGuard-experimental-$(PKG_VERSION).tar.xz
# This is actually SHA256, but OpenWRT/LEDE will figure it out based on the length
-PKG_MD5SUM:=ac3abb7b940716ac12b96a2cb3f7666598cbefd26f19c268f627dc47cd113ac8
+PKG_MD5SUM:=433fb84d00afa566d77dcb29f87c30e17c1c9c8dc9a9a0026619addfc6553027
PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
PKG_BUILD_DIR:=$(BUILD_DIR)/WireGuard-experimental-$(PKG_VERSION)
--- /dev/null
+#
+# Copyright (C) 2010-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:=ap51-flash
+PKG_VERSION:=2016-10-16
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://dev.cloudtrax.com/ap51-flash.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=48b3fbac1c30c5968b2608eb09b53ea37c310a24
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MAINTAINER:=Russell Senior <russell@personaltelco.net>
+
+include $(INCLUDE_DIR)/package.mk
+
+ifeq ($(CONFIG_BIG_ENDIAN),y)
+ STAMP_BUILT:=$(STAMP_BUILT)_big
+endif
+
+define Package/ap51-flash
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=A tool for flashing (nearly) all ap51/ap61 based routers
+ URL:=http://dev.cloudtrax.com/wiki/ap51-flash-station
+endef
+
+TARGET_EXTRA_CFLAGS:=-DFLASH_FROM_FILE -DNO_LIBPCAP -D_GNU_SOURCE -DIPPORT_TFTP=69
+ifeq ($(CONFIG_BIG_ENDIAN),y)
+ TARGET_EXTRA_CFLAGS:=$(TARGET_EXTRA_CFLAGS) -DUIP_CONF_BYTE_ORDER=1234
+endif
+
+# pass optimization flags
+MAKE_FLAGS += \
+ OFLAGS="$(TARGET_CFLAGS)" \
+ EXTRA_CFLAGS="$(TARGET_EXTRA_CFLAGS)" \
+ REVISION="$(PKG_VERSION)" \
+ ap51-flash
+
+define Package/ap51-flash/install
+ $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin \
+ $(1)/usr/lib/ap51-flash
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ap51-flash $(1)/usr/sbin/
+ $(INSTALL_BIN) ./files/ap51-flash.init $(1)/etc/init.d/ap51-flash
+ $(INSTALL_BIN) ./files/ap51-flash.sh $(1)/usr/lib/ap51-flash/ap51-flash.sh
+ $(INSTALL_DATA) ./files/ap51-flash.config $(1)/etc/config/ap51-flash
+endef
+
+define Package/ap51-flash/conffiles
+/etc/config/ap51-flash
+endef
+
+$(eval $(call BuildPackage,ap51-flash))
--- /dev/null
+#config flash
+# option ifname eth0.1
+# option rootfs /tmp/images/openwrt-atheros-root.squashfs
+# option kernel /tmp/images/openwrt-atheros-vmlinux.lzma
+# option ubnt /tmp/images/openwrt-atheros-ubnt5-squashfs.bin
+## option loop '1'
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 OpenWrt.org
+
+START=20
+
+NAME=ap51-flash
+
+start_daemon() {
+ local cfg="$1"
+
+ config_get_bool loop "$cfg" loop
+ config_get ifname "$cfg" ifname
+ config_get rootfs "$cfg" rootfs
+ config_get kernel "$cfg" kernel
+ config_get ubnt "$cfg" ubnt
+ [ "$loop" != "1" ] && loop=0
+ if [ -n "$ifname" -a -n "$rootfs" -a -n "$kernel" ] || \
+ [ -n "$ifname" -a -n "$ubnt" ]; then
+ PID="`cat /var/run/$NAME.sh-$ifname.pid 2> /dev/null`"
+ [ -z "`ps | grep "^.[ ]*$PID "`" ] && \
+ rm /var/run/$NAME.sh-$ifname.pid
+ [ -n "`ls /var/run/$NAME.sh-$ifname.pid 2> /dev/null`" ] && {
+ echo "Can't start more than one ap51-flash for interface $ifname!"
+ return 0
+ }
+ start-stop-daemon -S -b -m -p /var/run/$NAME.sh-$ifname.pid -n $NAME.sh \
+ -x /usr/lib/ap51-flash/$NAME.sh -- "$loop" "$ifname" "$rootfs" "$kernel" "$ubnt"
+ fi
+}
+
+start() {
+ config_load ap51-flash
+ config_foreach start_daemon flash
+}
+
+stop() {
+ # Terminating all ap51-flash processes
+ echo "WARNING: Going to teminate all ap51-flash processes! (hope you made sure that they're not flashing right now)"
+ echo "OR you can stop this with Ctrl+c within 10 seconds"
+ sleep 10
+ local pidfile
+ for pidfile in `ls /var/run/${NAME}.sh-*.pid 2> /dev/null`; do
+ start-stop-daemon -K -s TERM -p "${pidfile}" -n "${NAME}.sh" >/dev/null
+ rm -f "${pidfile}"
+ done
+ for pidfile in `ls /var/run/${NAME}-*.pid 2> /dev/null`; do
+ start-stop-daemon -K -s TERM -p "${pidfile}" -n "${NAME}" >/dev/null
+ rm -f "${pidfile}"
+ done
+}
--- /dev/null
+#!/bin/sh
+
+NAME=ap51-flash
+rootfs=""
+kernel=""
+ubnt=""
+
+[ $1 -eq "1" ] && loop="1"
+ifname="$2"
+[ -n "$3" ] && rootfs="--rootfs $3"
+[ -n "$4" ] && kernel="--kernel $4"
+[ -n "$5" ] && ubnt="--ubnt $5"
+
+while [ 1 ]; do
+ start-stop-daemon -S -m -p /var/run/$NAME-$ifname.pid -n $NAME \
+ -x /usr/sbin/$NAME -- --flash-from-file $rootfs $kernel $ubnt $ifname
+
+ rm /var/run/$NAME-$ifname.pid
+ [ "$loop" != "1" ] && break
+ sleep 15
+done
define Package/bash
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Shells
TITLE:=The GNU Bourne Again SHell
DEPENDS:=+libncurses
URL:=http://www.gnu.org/software/bash/
define Package/ccrypt
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Encryption
TITLE:=ccrypt is a utility for encrypting and decrypting files and streams
URL:=http://ccrypt.sourceforge.net/
endef
PKG_NAME:=collectd
PKG_VERSION:=5.5.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://collectd.org/files/
battery \
ceph \
cgroups \
- cpufreq \
curl_json \
curl_xml \
dbi \
conntrack \
contextswitch \
cpu \
+ cpufreq \
csv \
curl \
df \
$(eval $(call BuildPlugin,conntrack,connection tracking table size input,conntrack,))
$(eval $(call BuildPlugin,contextswitch,context switch input,contextswitch,))
$(eval $(call BuildPlugin,cpu,CPU input,cpu,))
+$(eval $(call BuildPlugin,cpufreq,CPU Freq input,cpufreq,@(TARGET_x86||TARGET_x86_64||TARGET_mvebu))) # Only enable on x86 and mvebu
$(eval $(call BuildPlugin,csv,CSV output,csv,))
$(eval $(call BuildPlugin,curl,cURL input,curl,+PACKAGE_collectd-mod-curl:libcurl))
#$(eval $(call BuildPlugin,dbi,relational database input,dbi,+PACKAGE_collectd-mod-dbi:libdbi))
define Package/dvtm
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Terminal
DEPENDS:=+libncursesw
TITLE:=dynamic virtual terminal manager
URL:=http://www.brain-dump.org/projects/dvtm/
define Package/gzip
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Compression
TITLE:=gzip (GNU zip) is a compression utility.
URL:=https://www.gnu.org/software/gzip/
MAINTAINER:=Christian Beier <dontmind@freeshell.org>
include $(INCLUDE_DIR)/package.mk
-define Package/haveged/template
+define Package/haveged
SECTION:=utils
CATEGORY:=Utilities
+ DEPENDS:=+libhavege
TITLE:=Feeds the kernel entropy pool by timing CPU loops.
URL:=http://www.issihosts.com/haveged/
endef
-define Package/haveged
- $(call Package/haveged/template)
- DEPENDS:=+libhavege
-endef
-
define Package/libhavege
- $(call Package/haveged/template)
+ CATEGORY:=Libraries
TITLE:=Library for haveged
+ URL:=http://www.issihosts.com/haveged/
endef
CONFIGURE_ARGS+= \
define Package/klish/default
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Shells
TITLE:=Kommand Line Interface SHell ($(1))
URL:=http://libcode.org/projects/klish/
endef
define Package/screen
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Terminal
DEPENDS:=+libncurses
TITLE:=Full-screen terminal window manager
URL:=http://www.gnu.org/software/screen/
define Package/tcsh
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Shells
TITLE:=Enhanced Berkeley UNIX C shell
DEPENDS:=+libncurses
URL:=http://www.tcsh.org/
define Package/tmux
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Terminal
TITLE:=Terminal multiplexer
DEPENDS:=+libncurses +libevent2 +libpthread +librt
URL:=http://tmux.sourceforge.net/
define Package/zsh
SECTION:=utils
CATEGORY:=Utilities
+ SUBMENU:=Shells
TITLE:=The Z shell
DEPENDS:=+libncurses +libncursesw +libpcre +librt
URL:=http://www.zsh.org/