aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Hess <thess@kitschensync.net>2014-07-22 15:10:36 -0400
committerTed Hess <thess@kitschensync.net>2014-07-22 15:10:36 -0400
commit99a4852b3753500e5811a683dab4e6fac496ac32 (patch)
tree0fe8cae6aa2afefc1776fcc24c2b47731b8c4561
parent4920a440674f2ad6b3cdae7a7301936945622565 (diff)
mjpg-streamer: Upgrade to r182, update copyright and license info
Add options for using libv4l (controls) and installing additional plugins Download and use latest cambozola.jar if Web UI selected Signed-off-by: Ted Hess <thess@kitschensync.net>
-rw-r--r--multimedia/mjpg-streamer/Config.in23
-rw-r--r--multimedia/mjpg-streamer/Makefile37
-rw-r--r--multimedia/mjpg-streamer/files/mjpg-streamer.init4
-rw-r--r--multimedia/mjpg-streamer/patches/010-enable-more-plugins.patch17
4 files changed, 67 insertions, 14 deletions
diff --git a/multimedia/mjpg-streamer/Config.in b/multimedia/mjpg-streamer/Config.in
index 015408546..8e95cbedf 100644
--- a/multimedia/mjpg-streamer/Config.in
+++ b/multimedia/mjpg-streamer/Config.in
@@ -1,23 +1,32 @@
if PACKAGE_mjpg-streamer
+config MJPG_STREAMER_V4L2
+ bool "Compile input_uvc with libv4l2 (camera controls)"
+ depends on PACKAGE_libv4l
+ default n
+
config MJPG_STREAMER_INPUT_FILE
- bool "Install input file library"
- default y
+ bool "Install input file plugin"
+ default n
config MJPG_STREAMER_INPUT_UVC
- bool "Install input uvc library"
+ bool "Install input uvc plugin"
default y
+config MJPG_STREAMER_INPUT_TESTPICTURE
+ bool "Install input testpicture plugin"
+ default n
+
config MJPG_STREAMER_OUTPUT_FILE
- bool "Install output file library"
- default y
+ bool "Install output file plugin"
+ default n
config MJPG_STREAMER_OUTPUT_HTTP
- bool "Install output http library"
+ bool "Install output http plugin"
default y
config MJPG_STREAMER_WWW
- bool "Install WWW files"
+ bool "Install Web UI files (includes cambozola)"
default y
endif
diff --git a/multimedia/mjpg-streamer/Makefile b/multimedia/mjpg-streamer/Makefile
index 1de2460f1..7323a5d64 100644
--- a/multimedia/mjpg-streamer/Makefile
+++ b/multimedia/mjpg-streamer/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2006-2013 OpenWrt.org
+# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mjpg-streamer
-PKG_REV:=181
+PKG_REV:=182
PKG_VERSION:=r$(PKG_REV)
PKG_RELEASE:=1
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
@@ -19,13 +19,17 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_PROTO:=svn
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILE:=LICENSE
+
include $(INCLUDE_DIR)/package.mk
define Package/mjpg-streamer
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE:=MJPG-streamer
- DEPENDS:=+libpthread +libjpeg
+ DEPENDS:=+libpthread +libjpeg +PACKAGE_libv4l:libv4l
+#$(if $(CONFIG_MJPG_STREAMER_V4L2),+libv4l)
URL:=http://mjpg-streamer.wiki.sourceforge.net/
MENU:=1
endef
@@ -44,6 +48,30 @@ define Package/mjpg-streamer/conffiles
/etc/config/mjpg-streamer
endef
+CAMBOZOLA:=cambozola-latest.tar.gz
+
+define Download/cambozola
+ URL:=http://www.andywilcock.com/code/cambozola
+ FILE:=$(CAMBOZOLA)
+ MD5SUM:=6c48fd994685d4d72668850eeb613e24
+endef
+
+# Fetch latest cambozola that works with latest Java(s)
+# Yes, I know this is ugly
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ ifeq ($(CONFIG_MJPG_STREAMER_WWW),y)
+ $(eval $(call Download,cambozola))
+ $(TAR) -xvf $(DL_DIR)/$(CAMBOZOLA) --strip=2 --wildcards \
+ -C $(PKG_BUILD_DIR)/www */dist/cambozola.jar
+ endif
+endef
+
+ifeq ($(CONFIG_MJPG_STREAMER_V4L2),y)
+ TARGET_CFLAGS+= -DUSE_LIBV4L2
+ TARGET_LDFLAGS+= -lv4l2
+endif
+
define Package/mjpg-streamer/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/
@@ -60,6 +88,9 @@ endif
ifeq ($(CONFIG_MJPG_STREAMER_INPUT_UVC),y)
$(CP) $(PKG_BUILD_DIR)/input_uvc.so $(1)/usr/lib
endif
+ifeq ($(CONFIG_MJPG_STREAMER_INPUT_TESTPICTURE),y)
+ $(CP) $(PKG_BUILD_DIR)/input_testpicture.so $(1)/usr/lib
+endif
ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_FILE),y)
$(CP) $(PKG_BUILD_DIR)/output_file.so $(1)/usr/lib
endif
diff --git a/multimedia/mjpg-streamer/files/mjpg-streamer.init b/multimedia/mjpg-streamer/files/mjpg-streamer.init
index eebd4f84a..550ea4d2f 100644
--- a/multimedia/mjpg-streamer/files/mjpg-streamer.init
+++ b/multimedia/mjpg-streamer/files/mjpg-streamer.init
@@ -61,10 +61,6 @@ start_instance() {
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
diff --git a/multimedia/mjpg-streamer/patches/010-enable-more-plugins.patch b/multimedia/mjpg-streamer/patches/010-enable-more-plugins.patch
new file mode 100644
index 000000000..4713a08d1
--- /dev/null
+++ b/multimedia/mjpg-streamer/patches/010-enable-more-plugins.patch
@@ -0,0 +1,17 @@
+--- a/Makefile
++++ b/Makefile
+@@ -33,12 +33,12 @@ APP_BINARY = mjpg_streamer
+
+ # define the names and targets of the plugins
+ PLUGINS = input_uvc.so
+-#PLUGINS += output_file.so
++PLUGINS += output_file.so
+ #PLUGINS += output_udp.so
+ PLUGINS += output_http.so
+ PLUGINS += input_testpicture.so
+ #PLUGINS += output_autofocus.so
+-#PLUGINS += input_file.so
++PLUGINS += input_file.so
+ # PLUGINS += input_pylon.so
+ # PLUGINS += input_megatec.so
+ # PLUGINS += output_mars2020.so