Subversion Repositories svnkaklik

Rev

Rev 498 | Blame | Compare with Previous | Last modification | View Log | Download

# 
# Copyright (C) 2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This Makefile is a skeleton
#
# $Id: $

include $(TOPDIR)/rules.mk

PKG_NAME:=libptp2
PKG_VERSION:=1.1.10

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/libptp/
PKG_MD5SUM:=

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install

include $(INCLUDE_DIR)/package.mk

define Package/libptp2
  SECTION:=lib
  CATEGORY:=Libraries
  TITLE:=Picture Transfer Protocol library
  URL:=http://sourceforge.net/projects/libptp/
endef

define Package/libptp2/description
        Library communicating with PTP enabled devices (digital photo cameras and so on). 
endef

CONFIGURE_ARGS += \
        --disable-ptpcam \

define Build/Compile
        # pass CFLAGS again to override -O2 set by configure
        $(MAKE) -C $(PKG_BUILD_DIR) \
                CFLAGS="$(TARGET_CFLAGS)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                all install
endef


define Build/InstallDev
        mkdir -p $(1)/usr/include/libptp2
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libptp2/*.h $(1)/usr/include/libptp2/
        mkdir -p $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libptp2.{a,so*} $(1)/usr/lib/
endef

define Build/UninstallDev
        rm -rf  $(1)/usr/include/package \
                $(1)/usr/package/package.{a,so*}
endef

define Package/libptp2/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libptp2.so* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,libptp2))