Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
498 kaklik 1
# 
2
# Copyright (C) 2007 OpenWrt.org
3
#
4
# This is free software, licensed under the GNU General Public License v2.
5
# See /LICENSE for more information.
6
#
7
# This Makefile is a skeleton
8
#
9
# $Id: $
10
 
11
include $(TOPDIR)/rules.mk
12
 
13
PKG_NAME:=libptp2
14
PKG_VERSION:=1.1.10
15
 
16
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17
PKG_SOURCE_URL:=http://downloads.sourceforge.net/libptp/
18
PKG_MD5SUM:=
19
 
20
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
 
23
include $(INCLUDE_DIR)/package.mk
24
 
25
define Package/libptp2
26
  SECTION:=lib
27
  CATEGORY:=Libraries
28
  TITLE:=Picture Transfer Protocol library
29
  URL:=http://sourceforge.net/projects/libptp/
30
endef
31
 
32
define Package/libptp2/description
33
	Library communicating with PTP enabled devices (digital photo cameras and so on). 
34
endef
35
 
36
CONFIGURE_ARGS += \
37
	--disable-ptpcam \
38
 
39
define Build/Compile
40
	# pass CFLAGS again to override -O2 set by configure
41
	$(MAKE) -C $(PKG_BUILD_DIR) \
42
		CFLAGS="$(TARGET_CFLAGS)" \
43
		DESTDIR="$(PKG_INSTALL_DIR)" \
44
		all install
45
endef
46
 
47
 
48
define Build/InstallDev
49
	mkdir -p $(1)/usr/include/libptp2
50
	$(CP) $(PKG_INSTALL_DIR)/usr/include/libptp2/*.h $(1)/usr/include/libptp2/
51
	mkdir -p $(1)/usr/lib
52
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libptp2.{a,so*} $(1)/usr/lib/
53
endef
54
 
55
define Build/UninstallDev
56
	rm -rf	$(1)/usr/include/package \
57
		$(1)/usr/package/package.{a,so*}
58
endef
59
 
60
define Package/libptp2/install
61
	$(INSTALL_DIR) $(1)/usr/lib
62
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libptp2.so* $(1)/usr/lib/
63
endef
64
 
65
$(eval $(call BuildPackage,libptp2))