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.

130 lines
3.2 KiB

  1. #
  2. # Copyright (C) 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:=libarchive
  9. PKG_VERSION:=3.5.2
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://www.libarchive.org/downloads
  13. PKG_HASH:=f0b19ff39c3c9a5898a219497ababbadab99d8178acc980155c7e1271089b5a0
  14. PKG_MAINTAINER:=Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de>
  15. PKG_LICENSE:=BSD-2-Clause
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:libarchive:libarchive
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/libarchive/Default
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. DEPENDS:=+zlib +liblzma +libbz2 +libexpat
  24. TITLE:=Multi-format archive and compression library
  25. URL:=https://www.libarchive.org/
  26. endef
  27. define Package/libarchive
  28. $(call Package/libarchive/Default)
  29. DEPENDS += +libopenssl
  30. endef
  31. define Package/libarchive-noopenssl
  32. $(call Package/libarchive/Default)
  33. TITLE += (without OpenSSL dependency)
  34. VARIANT:=noopenssl
  35. endef
  36. define Package/bsdtar/Default
  37. SECTION:=utils
  38. CATEGORY:=Utilities
  39. SUBMENU:=Compression
  40. TITLE:=tar BSD variant
  41. URL:=https://www.libarchive.org/
  42. endef
  43. define Package/bsdtar
  44. $(call Package/bsdtar/Default)
  45. DEPENDS:= +libarchive
  46. CONFLICTS:=bsdtar-noopenssl
  47. endef
  48. define Package/bsdtar-noopenssl
  49. $(call Package/bsdtar/Default)
  50. TITLE += (without OpenSSL dependency)
  51. DEPENDS:= +libarchive-noopenssl
  52. VARIANT:=noopenssl
  53. endef
  54. define Package/bsdtar/description
  55. Reads a variety of formats including tar, pax, zip, xar, lha, ar,
  56. cab, mtree, rar, warc, 7z and ISO images. Writes tar, pax, zip,
  57. xar, ar, ISO, mtree and shar archives. Automatically handles
  58. archives compressed with gzip, bzip2, lzip, xz, lzma or compress.
  59. endef
  60. CMAKE_OPTIONS += \
  61. -DENABLE_MBEDTLS=OFF \
  62. -DENABLE_NETTLE=OFF \
  63. -DENABLE_LIBB2=OFF \
  64. -DENABLE_LZ4=OFF \
  65. -DENABLE_LZO=OFF \
  66. -DENABLE_LZMA=ON \
  67. \
  68. -DENABLE_ZSTD=OFF \
  69. -DENABLE_ZLIB=ON \
  70. -DENABLE_BZip2=ON \
  71. -DENABLE_LIBXML2=OFF \
  72. -DENABLE_EXPAT=ON \
  73. -DENABLE_PCREPOSIX=OFF \
  74. -DENABLE_LibGCC=OFF \
  75. -DENABLE_CNG=OFF \
  76. \
  77. -DENABLE_TAR=ON \
  78. -DENABLE_TAR_SHARED=ON \
  79. -DENABLE_CPIO=OFF \
  80. -DENABLE_CAT=OFF \
  81. -DENABLE_XATTR=OFF \
  82. -DENABLE_ACL=OFF \
  83. -DENABLE_ICONV=OFF \
  84. -DENABLE_TEST=OFF \
  85. -DENABLE_COVERAGE=OFF \
  86. -DENABLE_INSTALL=ON
  87. ifeq ($(BUILD_VARIANT),noopenssl)
  88. CMAKE_OPTIONS += -DENABLE_OPENSSL=OFF
  89. else
  90. CMAKE_OPTIONS += -DENABLE_OPENSSL=ON
  91. endif
  92. define Build/InstallDev
  93. $(INSTALL_DIR) $(1)/usr/include
  94. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  95. $(INSTALL_DIR) $(1)/usr/lib
  96. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  97. endef
  98. define Package/libarchive/install
  99. $(INSTALL_DIR) $(1)/usr/lib
  100. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  101. endef
  102. define Package/bsdtar/install
  103. $(INSTALL_DIR) $(1)/usr/bin
  104. $(CP) $(PKG_INSTALL_DIR)/usr/bin/bsdtar $(1)/usr/bin
  105. endef
  106. Package/libarchive-noopenssl/install = $(Package/libarchive/install)
  107. Package/bsdtar-noopenssl/install = $(Package/bsdtar/install)
  108. $(eval $(call BuildPackage,libarchive))
  109. $(eval $(call BuildPackage,libarchive-noopenssl))
  110. $(eval $(call BuildPackage,bsdtar))
  111. $(eval $(call BuildPackage,bsdtar-noopenssl))