[packages] mjpg-streamer: upgrade package
[openwrt/svn-archive/archive.git] / multimedia / mjpg-streamer / Makefile
1 #
2 # Copyright (C) 2006-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mjpg-streamer
11 PKG_REV:=181
12 PKG_VERSION:=r$(PKG_REV)
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_PROTO:=svn
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/mjpg-streamer
24 SECTION:=multimedia
25 CATEGORY:=Multimedia
26 TITLE:=MJPG-streamer
27 DEPENDS:=+libpthread +libjpeg
28 URL:=http://mjpg-streamer.wiki.sourceforge.net/
29 MENU:=1
30 endef
31
32 define Package/mjpg-streamer/description
33 Streaming application for Linux-UVC compatible webcams
34 endef
35
36 define Package/mjpg-streamer/config
37 source "$(SOURCE)/Config.in"
38 endef
39
40 EXTRA_CFLAGS += $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)
41
42 define Package/mjpg-streamer/conffiles
43 /etc/config/mjpg-streamer
44 endef
45
46 define Package/mjpg-streamer/install
47 $(INSTALL_DIR) $(1)/usr/bin
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/
49 $(INSTALL_DIR) $(1)/etc/config
50 $(CP) ./files/mjpg-streamer.config $(1)/etc/config/mjpg-streamer
51 $(INSTALL_DIR) $(1)/etc/init.d
52 $(INSTALL_BIN) ./files/mjpg-streamer.init $(1)/etc/init.d/mjpg-streamer
53 $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
54 $(INSTALL_DATA) ./files/mjpg-streamer.hotplug $(1)/etc/hotplug.d/usb/20-mjpg-streamer
55 $(INSTALL_DIR) $(1)/usr/lib
56 ifeq ($(CONFIG_MJPG_STREAMER_INPUT_FILE),y)
57 $(CP) $(PKG_BUILD_DIR)/input_file.so $(1)/usr/lib
58 endif
59 ifeq ($(CONFIG_MJPG_STREAMER_INPUT_UVC),y)
60 $(CP) $(PKG_BUILD_DIR)/input_uvc.so $(1)/usr/lib
61 endif
62 ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_FILE),y)
63 $(CP) $(PKG_BUILD_DIR)/output_file.so $(1)/usr/lib
64 endif
65 ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_HTTP),y)
66 $(CP) $(PKG_BUILD_DIR)/output_http.so $(1)/usr/lib
67 endif
68 ifeq ($(CONFIG_MJPG_STREAMER_WWW),y)
69 $(INSTALL_DIR) $(1)/www/webcam
70 $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/* $(1)/www/webcam
71 endif
72 endef
73
74 $(eval $(call BuildPackage,mjpg-streamer))