mjpg-streamer: install web pages (#6499)
authorFlorian Fainelli <florian@openwrt.org>
Wed, 8 Aug 2012 15:38:41 +0000 (15:38 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 8 Aug 2012 15:38:41 +0000 (15:38 +0000)
SVN-Revision: 33059

multimedia/mjpg-streamer/Makefile
multimedia/mjpg-streamer/files/mjpg-streamer.config
multimedia/mjpg-streamer/files/mjpg-streamer.init

index 9593f981831690a94f2f541b546806a329045921..9f178a37fcaed9e485e615f7ae1603916b9523f8 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=mjpg-streamer
 PKG_REV:=148
 PKG_VERSION:=r$(PKG_REV)
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer/mjpg-streamer/
@@ -46,6 +46,8 @@ define Package/mjpg-streamer/install
        $(CP) $(foreach output_plugin,http file,$(PKG_BUILD_DIR)/output_$(output_plugin).so) $(1)/usr/lib
        $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
        $(INSTALL_DATA) ./files/mjpg-streamer.hotplug $(1)/etc/hotplug.d/usb/20-mjpg-streamer
+       $(INSTALL_DIR) $(1)/www/webcam
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/* $(1)/www/webcam
 endef
 
 define Package/mjpg-streamer/conffiles
index 5691c3ae8f089184e525a9528ad98f93f65ed095..5be37ea4f7c228869291474892071505af015948 100644 (file)
@@ -3,4 +3,5 @@ config mjpg-streamer core
        option device           "/dev/video0"
        option resolution       "640x480"
        option fps              "5"
+       option www              "/www/webcam"
        option port             "8080"
index 5a45968525780ce00cd632d6012aa1df3ac10897..b0a2043828fcafa7f75040e0be8d825b5c329a1f 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2009-2011 OpenWrt.org
+# Copyright (C) 2009-2012 OpenWrt.org
 
 START=50
 
@@ -25,6 +25,7 @@ start_instance() {
        config_get device "$s" 'device'
        config_get resolution "$s" 'resolution'
        config_get fps "$s" 'fps'
+       config_get www "$s" 'www'
        config_get port "$s" 'port'
 
        [ -c "$device" ] || {
@@ -34,7 +35,7 @@ start_instance() {
 
        service_start /usr/bin/mjpg_streamer --input "input_uvc.so \
                --device $device --fps $fps --resolution $resolution" \
-               --output "output_http.so --port $port"
+               --output "output_http.so --www $www --port $port"
 }
 
 stop_instance() {