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.

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