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.

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