[package] update mjpg-streamer to r94 (#7491)
[openwrt/svn-archive/archive.git] / multimedia / mjpg-streamer / Makefile
index 6cde444..e9637db 100644 (file)
@@ -1,22 +1,22 @@
-# 
-# Copyright (C) 2007 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mjpg-streamer
-PKG_VERSION:=2
+PKG_REV:=94
+PKG_VERSION:=r$(PKG_REV)
 PKG_RELEASE:=1
 
-PKG_SOURCE:=mjpg_streamer_2007_10_12.tgz
-PKG_SOURCE_URL:=http://naaa.de/programme/mjpg-streamer/
-PKG_MD5SUM:=fd1159498a8648d30dfead3e6569ab54
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer/mjpg-streamer/
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_PROTO:=svn
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -24,36 +24,28 @@ define Package/mjpg-streamer
   SECTION:=multimedia
   CATEGORY:=Multimedia
   TITLE:=MJPG-streamer
-  DEPENDS:=@LINUX_2_6 +libpthread
-  URL:=http://www.naaa.de/uvc_streamer.htm
+  DEPENDS:=@LINUX_2_6 +libpthread +libjpeg
+  URL:=http://mjpg-streamer.wiki.sourceforge.net/
 endef
 
 define Package/mjpg-streamer/description
-       streaming application for Linux-UVC compatible webcams
+       Streaming application for Linux-UVC compatible webcams
 endef
 
-MAKE_FLAGS += \
-       -C $(PKG_BUILD_DIR) \
-       CFLAGS="$(TARGET_CFLAGS)" \
-       CC="$(TARGET_CC)" \
-       all
+EXTRA_CFLAGS += $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)
 
 define Package/mjpg-streamer/install
-       $(INSTALL_DIR) $(1)/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/sbin
+       $(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)/usr/lib
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/input_uvc.so $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/output_http.so $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/output_file.so $(1)/usr/lib
-       $(INSTALL_DIR) $(1)/webcam_www
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/cambozola.jar $(1)/webcam_www
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/control.htm $(1)/webcam_www
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/favicon.ico $(1)/webcam_www
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/functions.js $(1)/webcam_www
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/index.html $(1)/webcam_www
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/java.html $(1)/webcam_www
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/LICENSE.txt $(1)/webcam_www
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/stream.html $(1)/webcam_www
+       $(CP) $(foreach input_plugin,file uvc gspcav1,$(PKG_BUILD_DIR)/input_$(input_plugin).so) $(1)/usr/lib
+       $(CP) $(foreach output_plugin,http file autofocus,$(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
 endef
 
 $(eval $(call BuildPackage,mjpg-streamer))