branch Attitude Adjustment packages
[12.09/packages.git] / libs / libimobiledevice / Makefile
1 #
2 # Copyright (C) 2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libimobiledevice
11 PKG_REV:=c182599c8c18ed729726ea7cbbd0a3b89790d2db
12 PKG_VERSION:=20120112
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=git://git.sukimashita.com/libimobiledevice.git
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19 PKG_SOURCE_VERSION:=$(PKG_REV)
20
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/nls.mk
26 $(call include_mk, python-package.mk)
27
28 define Package/libimobiledevice/Default
29   TITLE:=A library that talks to Apple devices.
30   URL:=http://www.libimobiledevice.org/
31 endef
32
33 define Package/libimobiledevice/Default/description
34   libimobiledevice is a software library that talks the protocols to support
35   iPhone®, iPod Touch®, iPad® and Apple TV® devices.
36 endef
37
38 define Package/libimobiledevice
39   $(call Package/libimobiledevice/Default)
40   SECTION:=libs
41   CATEGORY:=Libraries
42   DEPENDS:=+glib2 +libgcrypt +libgnutls $(ICONV_DEPENDS) +libplist +libtasn1 +libusbmuxd
43 endef
44
45 define Package/libimobiledevice/description
46   $(call Package/libimobiledevice/Default/description)
47 endef
48
49 define Package/libimobiledevice-utils
50   $(call Package/libimobiledevice/Default)
51   SECTION:=utils
52   CATEGORY:=Utilities
53   DEPENDS:=+libimobiledevice
54 endef
55
56 define Package/libimobiledevice-utils/description
57   $(call Package/libimobiledevice/Default/description)
58   This package contains the libimobiledevice utilities.
59 endef
60
61 CONFIGURE_VARS += \
62         libusbmuxd_CFLAGS="-I$(STAGING_DIR)/usr/include" \
63         libusbmuxd_LIBS="-L$(STAGING_DIR)/usr/lib -lusbmuxd"
64
65 CONFIGURE_ARGS += \
66         --without-swig \
67         --disable-largefile
68
69 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
70
71 define Build/InstallDev
72         $(INSTALL_DIR) $(1)/usr/include
73         $(CP) $(PKG_INSTALL_DIR)/usr/include/libimobiledevice $(1)/usr/include/
74         $(INSTALL_DIR) $(1)/usr/lib
75         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libimobiledevice.{a,la,so*} $(1)/usr/lib/
76         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
77         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libimobiledevice-*.pc $(1)/usr/lib/pkgconfig/
78 endef
79
80 define Package/libimobiledevice/install
81         $(INSTALL_DIR) $(1)/usr/lib
82         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libimobiledevice.so.* $(1)/usr/lib/
83 endef
84
85 define Package/libimobiledevice-utils/install
86         $(INSTALL_DIR) $(1)/usr/bin
87         $(CP) $(PKG_INSTALL_DIR)/usr/bin/idevice* $(1)/usr/bin/
88 endef
89
90 $(eval $(call BuildPackage,libimobiledevice))
91 $(eval $(call BuildPackage,libimobiledevice-utils))