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.

121 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:=2
  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)/uclibc++.mk
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. define Package/libv4l/Default
  22. TITLE:=Video 4 Linux
  23. URL:=https://www.linuxtv.org/
  24. endef
  25. define Package/libv4l/Default/description
  26. libv4l is a collection of libraries which adds a thin abstraction layer on
  27. top of video4linux2 devices. The purpose of this (thin) layer is to make it
  28. easy for application writers to support a wide variety of devices without
  29. having to write separate code for different devices in the same class. libv4l
  30. consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2.
  31. libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent
  32. of the drivers for those devices supporting v4l1 compatibility (which many
  33. v4l2 drivers do not).
  34. libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the
  35. application transparent libv4lconvert conversion where necessary.
  36. endef
  37. define Package/libv4l
  38. $(call Package/libv4l/Default)
  39. SECTION:=libs
  40. CATEGORY:=Libraries
  41. TITLE+= wrapper libraries
  42. DEPENDS := +libpthread +librt $(ICONV_DEPENDS)
  43. LICENSE:=LGPL-2.1-or-later
  44. LICENSE_FILES:=COPYING.libv4l
  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) $(INTL_DEPENDS)
  55. LICENSE:=GPL-2.0-or-later
  56. LICENSE_FILES:=COPYING
  57. endef
  58. define Package/v4l-utils/description
  59. $(call Package/libv4l/Default/description)
  60. This package contains the video4linux utilities.
  61. endef
  62. TARGET_CFLAGS += -flto
  63. TARGET_CXXFLAGS += -std=c++11
  64. TARGET_LDFLAGS += \
  65. $(if $(CONFIG_LIBC_USE_GLIBC),,-largp) \
  66. -Wl,--gc-sections,--as-needed
  67. CONFIGURE_ARGS+= \
  68. --disable-bpf \
  69. --disable-doxygen-doc \
  70. --disable-libdvbv5 \
  71. --disable-qv4l2 \
  72. --disable-qvidcap \
  73. --without-jpeg
  74. define Build/InstallDev
  75. $(INSTALL_DIR) $(1)/usr/include
  76. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert,2rds}.{a,so*} $(1)/usr/lib/
  79. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert,2rds}.pc $(1)/usr/lib/pkgconfig/
  81. endef
  82. define Package/libv4l/install
  83. $(INSTALL_DIR) $(1)/usr/lib
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert,2rds}.so.* $(1)/usr/lib/
  85. $(INSTALL_DIR) $(1)/usr/lib/libv4l
  86. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l/v4l{1compat,2convert}.so $(1)/usr/lib/libv4l/
  87. endef
  88. define Package/v4l-utils/install
  89. $(INSTALL_DIR) $(1)/etc
  90. $(CP) $(PKG_INSTALL_DIR)/etc/rc_maps.cfg $(1)/etc/
  91. $(CP) $(PKG_INSTALL_DIR)/etc/rc_keymaps $(1)/etc/
  92. $(INSTALL_DIR) $(1)/usr/bin
  93. $(CP) $(PKG_INSTALL_DIR)/usr/bin/{rds,media,cx18,ivtv}-ctl $(1)/usr/bin/
  94. $(CP) $(PKG_INSTALL_DIR)/usr/bin/decode_tm6000 $(1)/usr/bin/
  95. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ir-{ctl,keytable} $(1)/usr/bin/
  96. $(CP) $(PKG_INSTALL_DIR)/usr/bin/v4l2-{compliance,ctl,sysfs-path} $(1)/usr/bin/
  97. $(CP) $(PKG_INSTALL_DIR)/usr/bin/cec-{compliance,ctl,follower} $(1)/usr/bin/
  98. endef
  99. $(eval $(call BuildPackage,libv4l))
  100. $(eval $(call BuildPackage,v4l-utils))