|
@@ -0,0 +1,87 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 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:=uvcdynctrl
|
|
11
|
+PKG_VERSION:=0.2.4
|
|
12
|
+
|
|
13
|
+PKG_SOURCE:=libwebcam-src-$(PKG_VERSION).tar.gz
|
|
14
|
+PKG_SOURCE_URL:=@SF/libwebcam
|
|
15
|
+PKG_MD5SUM:=31dbb5713e95a699c5fc4dbe1493f764
|
|
16
|
+PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
|
|
17
|
+
|
|
18
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/libwebcam-src-$(PKG_VERSION)
|
|
19
|
+
|
|
20
|
+include $(INCLUDE_DIR)/package.mk
|
|
21
|
+include $(INCLUDE_DIR)/cmake.mk
|
|
22
|
+
|
|
23
|
+define Package/uvcdynctrl
|
|
24
|
+ SECTION:=utils
|
|
25
|
+ CATEGORY:=Utilities
|
|
26
|
+ DEPENDS:=+libwebcam +PACKAGE_UVCDYNCTRL_UDEV_RULE:udev
|
|
27
|
+ TITLE:=Manage dynamic controls in uvcvideo
|
|
28
|
+ URL:=http://sourceforge.net/projects/libwebcam/
|
|
29
|
+ MENU:=1
|
|
30
|
+endef
|
|
31
|
+
|
|
32
|
+define Package/uvcdynctrl/description
|
|
33
|
+ The webcam-tools package contains the following two components:
|
|
34
|
+ - libwebcam: Webcam Library (LGPL)
|
|
35
|
+ - uvcdynctrl: Manage dynamic controls in uvcvideo (GPL)
|
|
36
|
+endef
|
|
37
|
+
|
|
38
|
+define Package/uvcdynctrl/config
|
|
39
|
+config PACKAGE_UVCDYNCTRL_UDEV_RULE
|
|
40
|
+ bool "uvcdynctrl udev rule, selects udev"
|
|
41
|
+ depends on PACKAGE_uvcdynctrl
|
|
42
|
+ default no
|
|
43
|
+ help
|
|
44
|
+ Installs an udev rule to load uvcdynctrl with dynamic controls
|
|
45
|
+ from xml files in /usr/share/uvcdynctrl when a webcam is attached.
|
|
46
|
+endef
|
|
47
|
+
|
|
48
|
+define Package/libwebcam
|
|
49
|
+ SECTION:=libs
|
|
50
|
+ CATEGORY:=Libraries
|
|
51
|
+ DEPENDS:=+libxml2 +libiconv-full
|
|
52
|
+ TITLE:=Webcam library
|
|
53
|
+ URL:=http://sourceforge.net/projects/libwebcam/
|
|
54
|
+endef
|
|
55
|
+
|
|
56
|
+define Package/libwebcam/description
|
|
57
|
+ $(call Package/uvcdynctrl/description)
|
|
58
|
+endef
|
|
59
|
+
|
|
60
|
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/lib/libiconv-full/include -liconv
|
|
61
|
+TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/libiconv-full/lib
|
|
62
|
+
|
|
63
|
+define Package/uvcdynctrl/install
|
|
64
|
+ $(INSTALL_DIR) $(1)/usr/{bin,share}
|
|
65
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uvcdynctrl* $(1)/usr/bin/
|
|
66
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/uvcdynctrl/ $(1)/usr/share/
|
|
67
|
+
|
|
68
|
+ifeq ($(CONFIG_PACKAGE_UVCDYNCTRL_UDEV_RULE),y)
|
|
69
|
+ $(INSTALL_DIR) $(1)/lib/udev/rules.d
|
|
70
|
+ $(CP) $(PKG_INSTALL_DIR)/lib/udev/rules.d/*.rules $(1)/lib/udev/rules.d/
|
|
71
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/udev/uvcdynctrl $(1)/lib/udev/
|
|
72
|
+endif
|
|
73
|
+endef
|
|
74
|
+
|
|
75
|
+define Package/libwebcam/install
|
|
76
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
77
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebcam.so* $(1)/usr/lib/
|
|
78
|
+endef
|
|
79
|
+
|
|
80
|
+define Build/InstallDev
|
|
81
|
+ $(INSTALL_DIR) $(1)/usr/{include,lib}
|
|
82
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
|
83
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebcam.{a,so*} $(1)/usr/lib/
|
|
84
|
+endef
|
|
85
|
+
|
|
86
|
+$(eval $(call BuildPackage,uvcdynctrl))
|
|
87
|
+$(eval $(call BuildPackage,libwebcam))
|