mjpg-streamer: Upgrade to r182, update copyright and license info
authorTed Hess <[email protected]>
Tue, 22 Jul 2014 19:10:36 +0000 (15:10 -0400)
committerTed Hess <[email protected]>
Tue, 22 Jul 2014 19:10:36 +0000 (15:10 -0400)
    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 <[email protected]>
multimedia/mjpg-streamer/Config.in
multimedia/mjpg-streamer/Makefile
multimedia/mjpg-streamer/files/mjpg-streamer.init
multimedia/mjpg-streamer/patches/010-enable-more-plugins.patch [new file with mode: 0644]

index 0154085460c92e1739a7d95f6491f31ed8161e89..8e95cbedf3e393e1422ad160ccbf3212a2443f12 100644 (file)
@@ -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
index 1de2460f1294c0e1e79c97986b885ad02faf6ee6..7323a5d649f7b8e6ed4313f7228b712b0fa949c9 100644 (file)
@@ -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 <[email protected]>
@@ -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
index eebd4f84a7bf90d82ea678f817186e7aaba612a3..550ea4d2f213aa5f983581d89e00585f9525ba3f 100644 (file)
@@ -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 (file)
index 0000000..4713a08
--- /dev/null
@@ -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