Makefile 2.8 KB

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