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