2009-09-14 17:04:34 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2009 David Cooper <dave@kupesoft.com>
|
|
|
|
# Copyright (C) 2009 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libv4l
|
2009-10-05 19:19:03 +00:00
|
|
|
PKG_VERSION:=0.6.1
|
2009-09-14 17:04:34 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://people.atrpms.net/~hdegoede/
|
2009-10-05 19:19:03 +00:00
|
|
|
PKG_MD5SUM:=0d0d96d77c98871d2e5466c10cb30a0a
|
2009-09-14 17:04:34 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/libv4l
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Video 4 Linux wrapper libraries
|
|
|
|
URL:=http://people.atrpms.net/~hdegoede/
|
2010-10-05 23:56:19 +00:00
|
|
|
DEPENDS:=+libpthread @!LINUX_2_4
|
2009-09-14 17:04:34 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libv4l/description
|
|
|
|
libv4l is a collection of libraries which adds a thin abstraction layer on
|
|
|
|
top of video4linux2 devices. The purpose of this (thin) layer is to make it
|
|
|
|
easy for application writers to support a wide variety of devices without
|
|
|
|
having to write separate code for different devices in the same class. libv4l
|
|
|
|
consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2.
|
2010-03-29 20:39:51 +00:00
|
|
|
|
2009-09-14 17:04:34 +00:00
|
|
|
libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent
|
|
|
|
of the drivers for those devices supporting v4l1 compatibility (which many
|
|
|
|
v4l2 drivers do not).
|
|
|
|
|
|
|
|
libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the
|
|
|
|
application transparent libv4lconvert conversion where necessary.
|
|
|
|
endef
|
|
|
|
|
|
|
|
TARGET_CFLAGS += $(FPIC)
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" PREFIX="/usr" \
|
|
|
|
$(CONFIGURE_VARS) \
|
|
|
|
all install
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" PREFIX="/usr" \
|
|
|
|
$(CONFIGURE_VARS) \
|
|
|
|
LINKTYPE="static" \
|
|
|
|
all install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2009-12-18 11:06:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
2009-09-14 17:04:34 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/libv4l{1,2,convert}.h $(1)/usr/include/
|
2009-12-18 11:06:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2009-09-14 17:04:34 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.{a,so*} $(1)/usr/lib/
|
2009-12-18 11:06:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
2009-09-14 17:04:34 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert}.pc $(1)/usr/lib/pkgconfig/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libv4l/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2009-10-05 19:19:03 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.so.* $(1)/usr/lib/
|
2009-09-14 17:04:34 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/libv4l
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l/v4l{1compat,2convert}.so $(1)/usr/lib/libv4l
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,libv4l))
|
|
|
|
|