You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
3.1 KiB

  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:=libplist
  9. PKG_VERSION:=2.2.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://www.libimobiledevice.org/downloads
  13. PKG_HASH:=4a5517e5377ec421df84c586ba85bb4e1d26f11ad203d7d450a907c0156fbd9a
  14. PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
  15. PKG_CPE_ID:=cpe:/a:libimobiledevice:libplist
  16. PKG_INSTALL:=1
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/uclibc++.mk
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libplist/Default
  21. TITLE:=Apple property list
  22. URL:=https://www.libimobiledevice.org/
  23. SUBMENU:=libimobiledevice
  24. endef
  25. define Package/libplist/Default/description
  26. A library to handle Apple Property List format whereas it's binary or XML
  27. endef
  28. define Package/libplist
  29. $(call Package/libplist/Default)
  30. SECTION:=libs
  31. CATEGORY:=Libraries
  32. DEPENDS:=+libxml2
  33. TITLE+= library
  34. PKG_LICENSE:=LGPL-2.1-or-later
  35. PKG_LICENSE_FILES:=COPYING.LESSER
  36. endef
  37. define Package/libplist/description
  38. $(call Package/libplist/Default/description)
  39. endef
  40. define Package/libplistcxx
  41. $(call Package/libplist/Default)
  42. SECTION:=libs
  43. CATEGORY:=Libraries
  44. DEPENDS:=+libplist $(CXX_DEPENDS)
  45. TITLE+= C++ library
  46. PKG_LICENSE:=LGPL-2.1-or-later
  47. PKG_LICENSE_FILES:=COPYING.LESSER
  48. endef
  49. define Package/libplistcxx/description
  50. $(call Package/libplist/Default/description)
  51. This package contains the libplist C++ shared library.
  52. endef
  53. define Package/plistutil
  54. $(call Package/libplist/Default)
  55. SECTION:=utils
  56. CATEGORY:=Utilities
  57. DEPENDS:=+libplist
  58. TITLE+= converter
  59. LICENSE:=GPL-2.0-or-later
  60. LICENSE_FILES:=COPYING
  61. endef
  62. define Package/plistutil/description
  63. $(call Package/libplist/Default/description)
  64. This package contains the libplist utilities.
  65. endef
  66. CONFIGURE_ARGS += \
  67. --disable-static \
  68. --without-cython
  69. TARGET_CFLAGS += -flto
  70. TARGET_CXXFLAGS += -std=c++11 -fno-rtti
  71. TARGET_LDFLAGS += -Wl,--gc-sections
  72. define Build/InstallDev
  73. $(INSTALL_DIR) $(1)/usr/include
  74. $(CP) $(PKG_INSTALL_DIR)/usr/include/plist $(1)/usr/include/
  75. $(INSTALL_DIR) $(1)/usr/lib
  76. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libplist-2.0*.so* $(1)/usr/lib/
  77. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libplist++-2.0.pc $(1)/usr/lib/pkgconfig/
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libplist-2.0.pc $(1)/usr/lib/pkgconfig/
  80. $(LN) libplist++-2.0.pc $(1)/usr/lib/pkgconfig/libplist++.pc
  81. $(LN) libplist-2.0.pc $(1)/usr/lib/pkgconfig/libplist.pc
  82. endef
  83. define Package/libplist/install
  84. $(INSTALL_DIR) $(1)/usr/lib
  85. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libplist-2.0.so.* $(1)/usr/lib/
  86. endef
  87. define Package/libplistcxx/install
  88. $(INSTALL_DIR) $(1)/usr/lib
  89. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libplist++-2.0.so.* $(1)/usr/lib/
  90. endef
  91. define Package/plistutil/install
  92. $(INSTALL_DIR) $(1)/usr/bin
  93. $(CP) $(PKG_INSTALL_DIR)/usr/bin/plistutil $(1)/usr/bin/
  94. endef
  95. $(eval $(call BuildPackage,libplist))
  96. $(eval $(call BuildPackage,libplistcxx))
  97. $(eval $(call BuildPackage,plistutil))