2 # Copyright (C) 2009 David Cooper <dave@kupesoft.com>
3 # Copyright (C) 2009 OpenWrt.org
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://people.atrpms.net/~hdegoede/
17 PKG_MD5SUM:=0d0d96d77c98871d2e5466c10cb30a0a
19 include $(INCLUDE_DIR)/package.mk
24 TITLE:=Video 4 Linux wrapper libraries
25 URL:=http://people.atrpms.net/~hdegoede/
26 DEPENDS:=+libpthread @!LINUX_2_4
29 define Package/libv4l/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.
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
40 libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the
41 application transparent libv4lconvert conversion where necessary.
44 TARGET_CFLAGS += $(FPIC)
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 DESTDIR="$(PKG_INSTALL_DIR)" PREFIX="/usr" \
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 DESTDIR="$(PKG_INSTALL_DIR)" PREFIX="/usr" \
58 define Build/InstallDev
59 $(INSTALL_DIR) $(1)/usr/include
60 $(CP) $(PKG_INSTALL_DIR)/usr/include/libv4l{1,2,convert}.h $(1)/usr/include/
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.{a,so*} $(1)/usr/lib/
63 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert}.pc $(1)/usr/lib/pkgconfig/
67 define Package/libv4l/install
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.so.* $(1)/usr/lib/
70 $(INSTALL_DIR) $(1)/usr/lib/libv4l
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l/v4l{1compat,2convert}.so $(1)/usr/lib/libv4l
74 $(eval $(call BuildPackage,libv4l))