[packages_10.03.2] spca5xx-view: merge r29078, r29199
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 5 Feb 2012 17:37:47 +0000 (17:37 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 5 Feb 2012 17:37:47 +0000 (17:37 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/packages_10.03.2@30308 3c298f89-4303-0410-b956-a3cf2f4a3e73

multimedia/spca5xx-view/Makefile
multimedia/spca5xx-view/files/servfox.config
multimedia/spca5xx-view/files/servfox.init

index 336d4ae..1a8b830 100644 (file)
@@ -1,5 +1,5 @@
 # 
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=spca5xx-view
 PKG_VERSION:=1
 
 PKG_NAME:=spca5xx-view
 PKG_VERSION:=1
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=spca5xx-view.tar.bz2
 PKG_SOURCE_URL:=http://www.acmesystems.it/download/owrt
 
 PKG_SOURCE:=spca5xx-view.tar.bz2
 PKG_SOURCE_URL:=http://www.acmesystems.it/download/owrt
@@ -47,4 +47,8 @@ define Package/spca5xx-view/install
        $(INSTALL_BIN) ./files/servfox.init $(1)/etc/init.d/servfox
 endef
 
        $(INSTALL_BIN) ./files/servfox.init $(1)/etc/init.d/servfox
 endef
 
+define Package/spca5xx-view/conffiles
+/etc/config/servfox
+endef
+
 $(eval $(call BuildPackage,spca5xx-view))
 $(eval $(call BuildPackage,spca5xx-view))
index 3138bba..34f4f7f 100644 (file)
@@ -1,4 +1,4 @@
 config servfox
 config servfox
-       option Device       '/dev/video0'
-       option Port         '7070'
-       option Resolution   '640x480'
+       option device       '/dev/video0'
+       option port         '7070'
+       option resolution   '640x480'
index 072e595..22a4aa2 100644 (file)
@@ -1,31 +1,25 @@
 #!/bin/sh /etc/rc.common
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
+
 START=90
 
 START=90
 
-config_cb() {
-       local cfg="$CONFIG_SECTION"
+satrt_instance() {
+       local cfg="$1"
        local res
        local dev
        local port 
        local res
        local dev
        local port 
-       local cfgt
-       config_get cfgt "$cfg" TYPE
-
-       case "$cfgt" in
-               servfox)
-                       config_get res $cfg Resolution
-                       config_get dev $cfg Device
-                       config_get port $cfg Port
 
 
-                       SERVFOX_ARGS="${dev:+-d $dev} ${res:+-s $res} ${port:+-w $port}"
-               ;;
-       esac
+       config_get res "$cfg" 'resolution'
+       config_get dev "$cfg" 'device'
+       config_get port "$cfg" 'port'
+       service_start bin/servfox ${dev:+-d $dev} ${res:+-s $res} ${port:+-w $port}
 }
 
 start() {
 }
 
 start() {
-       config_load servfox 
-       /bin/servfox $SERVFOX_ARGS &
+       config_load 'servfox'
+       config_foreach start_instance 'servfox'
 }
 
 stop() {
 }
 
 stop() {
-       killall servfox 
+       service_stop /bin/servfox
 }
 }