Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / libs / libimobiledevice / Makefile
1 #
2 # Copyright (C) 2012-2014 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_VERSION:=1.2.1
12 PKG_RELEASE:=2
13
14 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
15 PKG_LICENSE:=LGPL-2.1+
16 PKG_LICENSE_FILES:=COPYING.LESSER
17
18 PKG_SOURCE_PROTO:=git
19 PKG_SOURCE_URL:=https://github.com/libimobiledevice/libimobiledevice.git
20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21 PKG_SOURCE_VERSION:=13bf235cac2201747de11652cf14fe2714ca0718
22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
23 PKG_MIRROR_HASH:=4e8892b27f20216f86d69b36ad2229fca87cdf0a10f8d3e145d01841a492562a
24
25 PKG_FIXUP:=autoreconf
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/nls.mk
30 $(call include_mk, python-package.mk)
31
32 define Package/libimobiledevice/Default
33 TITLE:=A library that talks to Apple devices.
34 URL:=http://www.libimobiledevice.org/
35 endef
36
37 define Package/libimobiledevice/Default/description
38 libimobiledevice is a software library that talks the protocols to support
39 iPhone®, iPod Touch®, iPad® and Apple TV® devices.
40 endef
41
42 define Package/libimobiledevice
43 $(call Package/libimobiledevice/Default)
44 SECTION:=libs
45 CATEGORY:=Libraries
46 DEPENDS:=$(ICONV_DEPENDS) +libplist +libusbmuxd +libopenssl
47 endef
48
49 define Package/libimobiledevice/description
50 $(call Package/libimobiledevice/Default/description)
51 endef
52
53 define Package/libimobiledevice-utils
54 $(call Package/libimobiledevice/Default)
55 SECTION:=utils
56 CATEGORY:=Utilities
57 DEPENDS:=+libimobiledevice
58 endef
59
60 define Package/libimobiledevice-utils/description
61 $(call Package/libimobiledevice/Default/description)
62 This package contains the libimobiledevice utilities.
63 endef
64
65 CONFIGURE_VARS += \
66 libusbmuxd_CFLAGS="-I$(STAGING_DIR)/usr/include" \
67 libusbmuxd_LIBS="-L$(STAGING_DIR)/usr/lib -lusbmuxd" \
68 openssl_CFLAGS=" " \
69 openssl_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto"
70
71 CONFIGURE_ARGS += \
72 --without-cython \
73 --disable-largefile
74
75 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
76
77 define Build/InstallDev
78 $(INSTALL_DIR) $(1)/usr/include
79 $(CP) $(PKG_INSTALL_DIR)/usr/include/libimobiledevice $(1)/usr/include/
80 $(INSTALL_DIR) $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libimobiledevice.{a,la,so*} $(1)/usr/lib/
82 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libimobiledevice-*.pc $(1)/usr/lib/pkgconfig/
84 endef
85
86 define Package/libimobiledevice/install
87 $(INSTALL_DIR) $(1)/usr/lib
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libimobiledevice.so.* $(1)/usr/lib/
89 endef
90
91 define Package/libimobiledevice-utils/install
92 $(INSTALL_DIR) $(1)/usr/bin
93 $(CP) $(PKG_INSTALL_DIR)/usr/bin/idevice* $(1)/usr/bin/
94 endef
95
96 $(eval $(call BuildPackage,libimobiledevice))
97 $(eval $(call BuildPackage,libimobiledevice-utils))