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.

120 lines
3.7 KiB

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