[packages] libv4l: unconditionally disable the qv4l2 utility
[openwrt/svn-archive/archive.git] / libs / libv4l / Makefile
1 #
2 # Copyright (C) 2009-2012 OpenWrt.org
3 # Copyright (C) 2009 David Cooper <dave@kupesoft.com>
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=v4l-utils
12 PKG_VERSION:=0.8.6
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.linuxtv.org/downloads/v4l-utils
17 PKG_MD5SUM:=80062780ae90e5955473b09b31e9828a
18
19 PKG_BUILD_DEPENDS:=argp-standalone
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libv4l/Default
24 TITLE:=Video 4 Linux
25 URL:=http://www.linuxtv.org/
26 DEPENDS:=+libpthread
27 endef
28
29 define Package/libv4l/Default/description
30 libv4l is a collection of libraries which adds a thin abstraction layer on
31 top of video4linux2 devices. The purpose of this (thin) layer is to make it
32 easy for application writers to support a wide variety of devices without
33 having to write separate code for different devices in the same class. libv4l
34 consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2.
35
36 libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent
37 of the drivers for those devices supporting v4l1 compatibility (which many
38 v4l2 drivers do not).
39
40 libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the
41 application transparent libv4lconvert conversion where necessary.
42 endef
43
44 define Package/libv4l
45 $(call Package/libv4l/Default)
46 SECTION:=libs
47 CATEGORY:=Libraries
48 TITLE+= wrapper libraries
49 endef
50
51 define Package/libv4l/description
52 $(call Package/libv4l/Default/description)
53 endef
54
55 define Package/v4l-utils
56 $(call Package/libv4l/Default)
57 SECTION:=utils
58 CATEGORY:=Utilities
59 TITLE+= utilities
60 DEPENDS+= +librt +libv4l +uclibcxx
61 endef
62
63 define Package/v4l-utils/description
64 $(call Package/libv4l/Default/description)
65 This package contains the video4linux utilities.
66 endef
67
68 TARGET_CFLAGS += $(FPIC)
69 TARGET_CXX = $(STAGING_DIR)/host/bin/g++-uc
70
71 define Build/Compile
72 $(MAKE) -C $(PKG_BUILD_DIR) \
73 DESTDIR="$(PKG_INSTALL_DIR)" PREFIX="/usr" \
74 DISABLE_LIBJPEG="1" \
75 $(CONFIGURE_VARS) \
76 all install
77 $(MAKE) -C $(PKG_BUILD_DIR) \
78 DESTDIR="$(PKG_INSTALL_DIR)" PREFIX="/usr" \
79 DISABLE_LIBJPEG="1" \
80 $(CONFIGURE_VARS) \
81 LINKTYPE="static" \
82 all install
83 endef
84
85 define Build/InstallDev
86 $(INSTALL_DIR) $(1)/usr/include
87 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
88 $(INSTALL_DIR) $(1)/usr/lib
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.{a,so*} $(1)/usr/lib/
90 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
91 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert}.pc $(1)/usr/lib/pkgconfig/
92 endef
93
94 define Package/libv4l/install
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.so.* $(1)/usr/lib/
97 $(INSTALL_DIR) $(1)/usr/lib/libv4l
98 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l/v4l{1compat,2convert}.so $(1)/usr/lib/libv4l/
99 endef
100
101 define Package/v4l-utils/install
102 $(INSTALL_DIR) $(1)/etc
103 $(CP) $(PKG_INSTALL_DIR)/etc/rc_maps.cfg $(1)/etc/
104 $(CP) $(PKG_INSTALL_DIR)/etc/rc_keymaps $(1)/etc/
105 $(INSTALL_DIR) $(1)/usr/bin
106 $(CP) $(PKG_INSTALL_DIR)/usr/bin/{cx18,ivtv}-ctl $(1)/usr/bin/
107 $(CP) $(PKG_INSTALL_DIR)/usr/bin/decode_tm6000 $(1)/usr/bin/
108 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ir-keytable $(1)/usr/bin/
109 $(CP) $(PKG_INSTALL_DIR)/usr/bin/v4l2-{compliance,ctl,sysfs-path} $(1)/usr/bin/
110 endef
111
112 $(eval $(call BuildPackage,libv4l))
113 $(eval $(call BuildPackage,v4l-utils))