Makefile 2.5 KB

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