Merge pull request #7951 from micmac1/hiredis-pkg-config
[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.16.5
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:=ed80242510385017a1dc566e17a285a77222bb301f5bc19386badfcc2c19df1b
15
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
20 PKG_USE_MIPS16:=0
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23
24 PKG_BUILD_DEPENDS:=argp-standalone
25
26 include $(INCLUDE_DIR)/uclibc++.mk
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/nls.mk
29
30 define Package/libv4l/Default
31 TITLE:=Video 4 Linux
32 URL:=https://www.linuxtv.org/
33 endef
34
35 define Package/libv4l/Default/description
36 libv4l is a collection of libraries which adds a thin abstraction layer on
37 top of video4linux2 devices. The purpose of this (thin) layer is to make it
38 easy for application writers to support a wide variety of devices without
39 having to write separate code for different devices in the same class. libv4l
40 consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2.
41
42 libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent
43 of the drivers for those devices supporting v4l1 compatibility (which many
44 v4l2 drivers do not).
45
46 libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the
47 application transparent libv4lconvert conversion where necessary.
48 endef
49
50 define Package/libv4l
51 $(call Package/libv4l/Default)
52 SECTION:=libs
53 CATEGORY:=Libraries
54 TITLE+= wrapper libraries
55 DEPENDS := +libpthread +librt $(ICONV_DEPENDS)
56 endef
57
58 define Package/libv4l/description
59 $(call Package/libv4l/Default/description)
60 endef
61
62 define Package/v4l-utils
63 $(call Package/libv4l/Default)
64 SECTION:=utils
65 CATEGORY:=Utilities
66 TITLE+= utilities
67 DEPENDS := +libv4l $(CXX_DEPENDS) $(ICONV_DEPENDS)
68 endef
69
70 define Package/v4l-utils/description
71 $(call Package/libv4l/Default/description)
72 This package contains the video4linux utilities.
73 endef
74
75 TARGET_CFLAGS += -flto
76 TARGET_LDFLAGS += -largp -Wl,--gc-sections
77
78 CONFIGURE_ARGS+= \
79 --disable-bpf \
80 --disable-doxygen-doc \
81 --disable-libdvbv5 \
82 --disable-qv4l2 \
83 --disable-qvidcap \
84 --without-jpeg \
85
86 define Build/InstallDev
87 $(INSTALL_DIR) $(1)/usr/include
88 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
89 $(INSTALL_DIR) $(1)/usr/lib
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert,2rds}.{a,so*} $(1)/usr/lib/
91 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
92 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert,2rds}.pc $(1)/usr/lib/pkgconfig/
93 endef
94
95 define Package/libv4l/install
96 $(INSTALL_DIR) $(1)/usr/lib
97 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert,2rds}.so.* $(1)/usr/lib/
98 $(INSTALL_DIR) $(1)/usr/lib/libv4l
99 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l/v4l{1compat,2convert}.so $(1)/usr/lib/libv4l/
100 endef
101
102 define Package/v4l-utils/install
103 $(INSTALL_DIR) $(1)/etc
104 $(CP) $(PKG_INSTALL_DIR)/etc/rc_maps.cfg $(1)/etc/
105 $(CP) $(PKG_INSTALL_DIR)/etc/rc_keymaps $(1)/etc/
106 $(INSTALL_DIR) $(1)/usr/bin
107 $(CP) $(PKG_INSTALL_DIR)/usr/bin/{rds,media,cx18,ivtv}-ctl $(1)/usr/bin/
108 $(CP) $(PKG_INSTALL_DIR)/usr/bin/decode_tm6000 $(1)/usr/bin/
109 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ir-{ctl,keytable} $(1)/usr/bin/
110 $(CP) $(PKG_INSTALL_DIR)/usr/bin/v4l2-{compliance,ctl,sysfs-path} $(1)/usr/bin/
111 $(CP) $(PKG_INSTALL_DIR)/usr/bin/cec-{compliance,ctl,follower} $(1)/usr/bin/
112 endef
113
114 $(eval $(call BuildPackage,libv4l))
115 $(eval $(call BuildPackage,v4l-utils))