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.7.3
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_URL:=https://libzip.org/download/
  11. PKG_HASH:=a60473ffdb7b4260c08bfa19c2ccea0438edac11193c3afbbb1f17fbcf6c6132
  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 += -DENABLE_LZMA=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))