--- /dev/null
+if PACKAGE_mjpg-streamer
+
+config MJPG_STREAMER_INPUT_FILE
+ bool "Install input file library"
+ default y
+
+config MJPG_STREAMER_INPUT_UVC
+ bool "Install input uvc library"
+ default y
+
+config MJPG_STREAMER_OUTPUT_FILE
+ bool "Install output file library"
+ default y
+
+config MJPG_STREAMER_OUTPUT_HTTP
+ bool "Install output http library"
+ default y
+
+config MJPG_STREAMER_WWW
+ bool "Install WWW files"
+ default y
+
+endif
--- /dev/null
+#
+# Copyright (C) 2006-2013 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:=mjpg-streamer
+PKG_REV:=181
+PKG_VERSION:=r$(PKG_REV)
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_PROTO:=svn
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mjpg-streamer
+ SECTION:=multimedia
+ CATEGORY:=Multimedia
+ TITLE:=MJPG-streamer
+ DEPENDS:=+libpthread +libjpeg
+ URL:=http://mjpg-streamer.wiki.sourceforge.net/
+ MENU:=1
+endef
+
+define Package/mjpg-streamer/description
+ Streaming application for Linux-UVC compatible webcams
+endef
+
+define Package/mjpg-streamer/config
+ source "$(SOURCE)/Config.in"
+endef
+
+EXTRA_CFLAGS += $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)
+
+define Package/mjpg-streamer/conffiles
+/etc/config/mjpg-streamer
+endef
+
+define Package/mjpg-streamer/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc/config
+ $(CP) ./files/mjpg-streamer.config $(1)/etc/config/mjpg-streamer
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/mjpg-streamer.init $(1)/etc/init.d/mjpg-streamer
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
+ $(INSTALL_DATA) ./files/mjpg-streamer.hotplug $(1)/etc/hotplug.d/usb/20-mjpg-streamer
+ $(INSTALL_DIR) $(1)/usr/lib
+ifeq ($(CONFIG_MJPG_STREAMER_INPUT_FILE),y)
+ $(CP) $(PKG_BUILD_DIR)/input_file.so $(1)/usr/lib
+endif
+ifeq ($(CONFIG_MJPG_STREAMER_INPUT_UVC),y)
+ $(CP) $(PKG_BUILD_DIR)/input_uvc.so $(1)/usr/lib
+endif
+ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_FILE),y)
+ $(CP) $(PKG_BUILD_DIR)/output_file.so $(1)/usr/lib
+endif
+ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_HTTP),y)
+ $(CP) $(PKG_BUILD_DIR)/output_http.so $(1)/usr/lib
+endif
+ifeq ($(CONFIG_MJPG_STREAMER_WWW),y)
+ $(INSTALL_DIR) $(1)/www/webcam
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/* $(1)/www/webcam
+endif
+endef
+
+$(eval $(call BuildPackage,mjpg-streamer))
--- /dev/null
+config mjpg-streamer 'core'
+ option enabled '0'
+ option input 'uvc'
+ option output 'http'
+ option device '/dev/video0'
+ option resolution '640x480'
+ option fps '5'
+ option www '/www/webcam'
+ option port '8080'
+ option username 'openwrt'
+ option password 'openwrt'
--- /dev/null
+case "$ACTION" in
+ add)
+ # start process
+ /etc/init.d/mjpg-streamer start
+ ;;
+ remove)
+ # stop process
+ /etc/init.d/mjpg-streamer stop
+ ;;
+esac
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2009-2013 OpenWrt.org
+
+START=90
+STOP=10
+
+USE_PROCD=1
+PROG=/usr/bin/mjpg_streamer
+
+error() {
+ echo "${initscript}:" "$@" 1>&2
+}
+
+start_instance() {
+ local s="$1"
+
+ config_get_bool enabled "$1" 'enabled' 0
+ [ $enabled -eq 0 ] && return
+
+ config_get input "$s" 'input'
+ if [ -z "$input" ]; then
+ error "in section '$s' option input is missing"
+ return 1
+ fi
+
+ config_get output "$s" 'output'
+ if [ -z "$output" ]; then
+ error "in section '$s' option output is missing"
+ return 1
+ fi
+
+ local input_arg
+ if [ "x$input" = 'xuvc' ]; then
+ input_arg="input_uvc.so"
+
+ config_get device "$s" 'device'
+ if [ ! -c "$device" ]; then
+ error "device '$device' does not exist"
+ return 1
+ fi
+ input_arg="${input_arg} --device $device"
+
+ config_get fps "$s" 'fps'
+ [ -n "$fps" ] && input_arg="${input_arg} --fps $fps"
+
+ config_get resolution "$s" 'resolution'
+ [ -n "$resolution" ] && input_arg="${input_arg} --resolution $resolution"
+ fi
+
+ if [ -z "$input_arg" ]; then
+ error "unsuported input option '$input' in section '$s'"
+ return 1
+ fi
+
+ local output_arg
+ if [ "x$output" = 'xhttp' ]; then
+ output_arg="output_http.so"
+
+ config_get port "$s" 'port'
+ [ -n "$port" ] && output_arg="${output_arg} --port $port"
+
+ config_get www "$s" 'www'
+ [ -n "$www" ] && output_arg="${output_arg} --www $www"
+
+ config_get username "$s" 'username'
+ config_get password "$s" 'password'
+ [ -n "$username" ] && [ -n "$password" ] && output_arg="${output_arg} --credentials $username:$password"
+ fi
+
+ if [ -z "$output_arg" ]; then
+ error "unsuported output option '$output' in section '$s'"
+ return 1
+ fi
+
+ procd_open_instance
+ procd_set_param command "$PROG" --input "$input_arg" --output "$output_arg"
+ procd_close_instance
+}
+
+start_service() {
+ config_load 'mjpg-streamer'
+ config_foreach start_instance 'mjpg-streamer'
+}
+
+service_triggers() {
+ procd_add_reload_trigger 'mjpg-streamer'
+}
--- /dev/null
+#
+# Copyright (C) 2006-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:=iodine
+PKG_VERSION:=0.7.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://code.kryo.se/iodine/
+PKG_MD5SUM:=fdbf3b81cd69caf5230d76a8b039fd99
+
+PKG_MAINTAINER:=Uwe Kleine-König <uwe+openwrt@kleine-koenig.org>
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=README
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/iodine/Default
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Firewall Tunnel
+ DEPENDS:= +kmod-tun +zlib
+ TITLE:=IP over DNS tunneling
+ URL:=http://code.kryo.se/iodine/
+endef
+
+define Package/iodine
+ $(call Package/iodine/Default)
+ TITLE+= client version
+endef
+
+define Package/iodine/description
+ iodine client version
+endef
+
+define Package/iodined
+ $(call Package/iodine/Default)
+ TITLE+= server version
+endef
+
+define Package/iodined/description
+ iodine server version
+endef
+
+define Build/Configure
+endef
+
+define Package/iodine/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/iodine $(1)/usr/sbin
+endef
+
+define Package/iodined/install
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/iodined.init $(1)/etc/init.d/iodined
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DATA) ./files/iodined.config $(1)/etc/config/iodined
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/iodined $(1)/usr/sbin
+endef
+
+define Package/iodined/conffiles
+/etc/config/iodined
+endef
+
+$(eval $(call BuildPackage,iodine))
+$(eval $(call BuildPackage,iodined))
--- /dev/null
+config iodined
+ option address ''
+ option password ''
+ option tunnelip '10.0.0.1'
+ option tld ''
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+start_instance () {
+ local section="$1"
+ config_get address "$section" 'address'
+ config_get password "$section" 'password'
+ config_get tunnelip "$section" 'tunnelip'
+ config_get tld "$section" 'tld'
+
+ service_start /usr/sbin/iodined -l "$address" -P "$password" "$tunnelip" "$tld"
+}
+
+start() {
+ config_load 'iodined'
+ config_foreach start_instance 'iodined'
+}
+
+stop() {
+ service_stop /usr/sbin/iodined
+}
--- /dev/null
+--- iodine-0.7.0.orig/src/osflags
++++ iodine-0.7.0/src/osflags
+@@ -16,12 +16,6 @@ link)
+ windows32)
+ echo '-lws2_32 -liphlpapi';
+ ;;
+- Linux)
+- FLAGS="";
+- [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -lselinux";
+- [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -lsystemd-daemon";
+- echo $FLAGS;
+- ;;
+ esac
+ ;;
+ cflags)
+@@ -34,8 +28,6 @@ cflags)
+ ;;
+ Linux)
+ FLAGS="-D_GNU_SOURCE"
+- [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -DHAVE_SETCON";
+- [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -DHAVE_SYSTEMD";
+ echo $FLAGS;
+ ;;
+ esac
--- /dev/null
+#
+# Copyright (C) 2006-2014 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:=haveged
+PKG_VERSION:=1.9.1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.issihosts.com/$(PKG_NAME)
+PKG_MD5SUM:=015ff58cd10607db0e0de60aeca2f5f8
+
+#ensure this is consistent with the dir in the tarball!!!
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_MAINTAINER:=Hannu Nyman <hannu.nyman@iki.fi>
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/haveged/template
+ SECTION:=utils
+ CATEGORY:=Utilities
+ 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)
+ TITLE:=Library for haveged
+endef
+
+CONFIGURE_ARGS+= \
+ --enable-daemon=yes
+ --enable-threads=no
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/src/havege.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/src/.libs/libhavege.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/haveged/install
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/haveged.init $(1)/etc/init.d/haveged
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/haveged $(1)/usr/sbin/
+endef
+
+define Package/libhavege/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/src/.libs/libhavege.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,haveged))
+$(eval $(call BuildPackage,libhavege))
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2012 OpenWrt.org
+
+START=98
+
+HAVEGED_THRESHOLD=1024
+HAVEGED_DCACHE=32
+HAVEGED_ICACHE=32
+
+start() {
+ service_start /usr/sbin/haveged -w $HAVEGED_THRESHOLD -d $HAVEGED_DCACHE -i $HAVEGED_ICACHE -v 1
+}
+
+stop() {
+ service_stop /usr/sbin/haveged
+}