You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
3.6 KiB

  1. #
  2. # Copyright (C) 2009-2014 OpenWrt.org
  3. # Copyright (C) 2009 David Cooper <dave@kupesoft.com>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=v4l-utils
  10. PKG_VERSION:=1.2.1
  11. PKG_RELEASE:=2
  12. PKG_USE_MIPS16:=0
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  14. PKG_SOURCE_URL:=http://www.linuxtv.org/downloads/v4l-utils
  15. PKG_MD5SUM:=4cc0fb4ded302ea9e89e5e1b56a7252b
  16. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  17. PKG_LICENSE:=GPL-2.0 LGPL-2.1
  18. PKG_LICENSE_FILES:=COPYING COPYING.libv4l
  19. PKG_BUILD_DEPENDS:=argp-standalone
  20. include $(INCLUDE_DIR)/uclibc++.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. define Package/libv4l/Default
  24. TITLE:=Video 4 Linux
  25. URL:=http://www.linuxtv.org/
  26. endef
  27. define Package/libv4l/Default/description
  28. libv4l is a collection of libraries which adds a thin abstraction layer on
  29. top of video4linux2 devices. The purpose of this (thin) layer is to make it
  30. easy for application writers to support a wide variety of devices without
  31. having to write separate code for different devices in the same class. libv4l
  32. consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2.
  33. libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent
  34. of the drivers for those devices supporting v4l1 compatibility (which many
  35. v4l2 drivers do not).
  36. libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the
  37. application transparent libv4lconvert conversion where necessary.
  38. endef
  39. define Package/libv4l
  40. $(call Package/libv4l/Default)
  41. SECTION:=libs
  42. CATEGORY:=Libraries
  43. TITLE+= wrapper libraries
  44. DEPENDS := +libpthread +librt $(ICONV_DEPENDS)
  45. endef
  46. define Package/libv4l/description
  47. $(call Package/libv4l/Default/description)
  48. endef
  49. define Package/v4l-utils
  50. $(call Package/libv4l/Default)
  51. SECTION:=utils
  52. CATEGORY:=Utilities
  53. TITLE+= utilities
  54. DEPENDS := +libv4l $(CXX_DEPENDS) $(ICONV_DEPENDS)
  55. endef
  56. define Package/v4l-utils/description
  57. $(call Package/libv4l/Default/description)
  58. This package contains the video4linux utilities.
  59. endef
  60. TARGET_CFLAGS += $(FPIC)
  61. TARGET_LDFLAGS += -largp
  62. CONFIGURE_ARGS+= \
  63. --disable-libdvbv5 \
  64. --disable-qv4l2 \
  65. --without-jpeg \
  66. define Build/Compile
  67. $(MAKE) -C $(PKG_BUILD_DIR) \
  68. DESTDIR="$(PKG_INSTALL_DIR)" \
  69. all install
  70. $(MAKE) -C $(PKG_BUILD_DIR) \
  71. DESTDIR="$(PKG_INSTALL_DIR)" \
  72. LINKTYPE="static" \
  73. all install
  74. endef
  75. define Build/InstallDev
  76. $(INSTALL_DIR) $(1)/usr/include
  77. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  78. $(INSTALL_DIR) $(1)/usr/lib
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.{a,so*} $(1)/usr/lib/
  80. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  81. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert}.pc $(1)/usr/lib/pkgconfig/
  82. endef
  83. define Package/libv4l/install
  84. $(INSTALL_DIR) $(1)/usr/lib
  85. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.so.* $(1)/usr/lib/
  86. $(INSTALL_DIR) $(1)/usr/lib/libv4l
  87. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l/v4l{1compat,2convert}.so $(1)/usr/lib/libv4l/
  88. endef
  89. define Package/v4l-utils/install
  90. $(INSTALL_DIR) $(1)/etc
  91. $(CP) $(PKG_INSTALL_DIR)/etc/rc_maps.cfg $(1)/etc/
  92. $(CP) $(PKG_INSTALL_DIR)/etc/rc_keymaps $(1)/etc/
  93. $(INSTALL_DIR) $(1)/usr/bin
  94. $(CP) $(PKG_INSTALL_DIR)/usr/bin/{cx18,ivtv}-ctl $(1)/usr/bin/
  95. $(CP) $(PKG_INSTALL_DIR)/usr/bin/decode_tm6000 $(1)/usr/bin/
  96. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ir-keytable $(1)/usr/bin/
  97. $(CP) $(PKG_INSTALL_DIR)/usr/bin/v4l2-{compliance,ctl,sysfs-path} $(1)/usr/bin/
  98. endef
  99. $(eval $(call BuildPackage,libv4l))
  100. $(eval $(call BuildPackage,v4l-utils))