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.

135 lines
3.4 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=libzip
  7. PKG_VERSION:=1.5.2
  8. PKG_RELEASE:=2
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_URL:=https://libzip.org/download/
  11. PKG_HASH:=b3de4d4bd49a01e0cab3507fc163f88e1651695b6b9cb25ad174dbe319d4a3b4
  12. PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
  13. PKG_LICENSE:=BSD-3-Clause
  14. PKG_LICENSE_FILES:=LICENSE
  15. PKG_BUILD_PARALLEL:=1
  16. CMAKE_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/libzip/Default
  20. TITLE:=libzip ($(2))
  21. URL:=https://libzip.org/
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. SUBMENU:=Compression
  25. DEPENDS:=+zlib $(3)
  26. VARIANT:=$(1)
  27. PROVIDES:=libzip
  28. endef
  29. define Package/libzip-$(BUILD_VARIANT)/description
  30. A C library for reading, creating, and modifying zip archives.
  31. endef
  32. Package/libzip-nossl=$(call Package/libzip/Default,nossl,w/o encryption support)
  33. Package/libzip-openssl=$(call Package/libzip/Default,openssl,OpenSSL,+PACKAGE_libzip-openssl:libopenssl)
  34. Package/libzip-gnutls=$(call Package/libzip/Default,gnutls,GnuTLS,+PACKAGE_libzip-gnutls:libgnutls)
  35. Package/libzip-mbedtls=$(call Package/libzip/Default,mbedtls,mbedTLS,+PACKAGE_libzip-mbedtls:libmbedtls)
  36. define Package/zipcmp
  37. TITLE:=zipcmp
  38. URL:=https://libzip.org/
  39. SECTION:=utils
  40. CATEGORY:=Utilities
  41. SUBMENU:=Compression
  42. DEPENDS:=+libzip +USE_MUSL:musl-fts
  43. endef
  44. define Package/zipcmp/description
  45. This package contains the command line tool zipcmp from libzip.
  46. endef
  47. define Package/zipmerge
  48. TITLE:=zipmerge
  49. URL:=https://libzip.org/
  50. SECTION:=utils
  51. CATEGORY:=Utilities
  52. SUBMENU:=Compression
  53. DEPENDS:=+libzip
  54. endef
  55. define Package/zipmerge/description
  56. This package contains the command line tool zipmerge from libzip.
  57. endef
  58. define Package/ziptool
  59. TITLE:=ziptool
  60. URL:=https://libzip.org/
  61. SECTION:=utils
  62. CATEGORY:=Utilities
  63. SUBMENU:=Compression
  64. DEPENDS:=+libzip
  65. endef
  66. define Package/ziptool/description
  67. This package contains the command line tool ziptool from libzip.
  68. endef
  69. CMAKE_OPTIONS += -DENABLE_COMMONCRYPTO=OFF
  70. ifeq ($(BUILD_VARIANT),gnutls)
  71. CMAKE_OPTIONS += -DENABLE_GNUTLS=ON
  72. else
  73. CMAKE_OPTIONS += -DENABLE_GNUTLS=OFF
  74. endif
  75. ifeq ($(BUILD_VARIANT),openssl)
  76. CMAKE_OPTIONS += -DENABLE_OPENSSL=ON
  77. else
  78. CMAKE_OPTIONS += -DENABLE_OPENSSL=OFF
  79. endif
  80. ifeq ($(BUILD_VARIANT),mbedtls)
  81. CMAKE_OPTIONS += -DENABLE_MBEDTLS=ON
  82. else
  83. CMAKE_OPTIONS += -DENABLE_MBEDTLS=OFF
  84. endif
  85. CMAKE_OPTIONS += -DENABLE_BZIP2=OFF
  86. CMAKE_OPTIONS += -DBUILD_REGRESS=OFF
  87. CMAKE_OPTIONS += -DBUILD_EXAMPLES=OFF
  88. CMAKE_OPTIONS += -DBUILD_DOC=OFF
  89. CMAKE_OPTIONS += -DBUILD_TOOLS=ON
  90. define Package/libzip-$(BUILD_VARIANT)/install
  91. $(INSTALL_DIR) $(1)/usr/lib
  92. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzip.so.* $(1)/usr/lib/
  93. endef
  94. define Package/zipcmp/install
  95. $(INSTALL_DIR) $(1)/usr/bin
  96. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/zipcmp $(1)/usr/bin/
  97. endef
  98. define Package/zipmerge/install
  99. $(INSTALL_DIR) $(1)/usr/bin
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/zipmerge $(1)/usr/bin/
  101. endef
  102. define Package/ziptool/install
  103. $(INSTALL_DIR) $(1)/usr/bin
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ziptool $(1)/usr/bin/
  105. endef
  106. $(eval $(call BuildPackage,libzip-gnutls))
  107. $(eval $(call BuildPackage,libzip-mbedtls))
  108. $(eval $(call BuildPackage,libzip-openssl))
  109. $(eval $(call BuildPackage,libzip-nossl))
  110. $(eval $(call BuildPackage,zipcmp))
  111. $(eval $(call BuildPackage,zipmerge))
  112. $(eval $(call BuildPackage,ziptool))