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.

129 lines
3.1 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.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://www.libarchive.org/downloads
  13. PKG_HASH:=0e17d3a8d0b206018693b27f08029b598f6ef03600c2b5d10c94ce58692e299b
  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. endef
  47. define Package/bsdtar-noopenssl
  48. $(call Package/bsdtar/Default)
  49. TITLE += (without OpenSSL dependency)
  50. DEPENDS:= +libarchive-noopenssl
  51. VARIANT:=noopenssl
  52. endef
  53. define Package/bsdtar/description
  54. Reads a variety of formats including tar, pax, zip, xar, lha, ar,
  55. cab, mtree, rar, warc, 7z and ISO images. Writes tar, pax, zip,
  56. xar, ar, ISO, mtree and shar archives. Automatically handles
  57. archives compressed with gzip, bzip2, lzip, xz, lzma or compress.
  58. endef
  59. CMAKE_OPTIONS += \
  60. -DENABLE_MBEDTLS=OFF \
  61. -DENABLE_NETTLE=OFF \
  62. -DENABLE_LIBB2=OFF \
  63. -DENABLE_LZ4=OFF \
  64. -DENABLE_LZO=OFF \
  65. -DENABLE_LZMA=ON \
  66. \
  67. -DENABLE_ZSTD=OFF \
  68. -DENABLE_ZLIB=ON \
  69. -DENABLE_BZip2=ON \
  70. -DENABLE_LIBXML2=OFF \
  71. -DENABLE_EXPAT=ON \
  72. -DENABLE_PCREPOSIX=OFF \
  73. -DENABLE_LibGCC=OFF \
  74. -DENABLE_CNG=OFF \
  75. \
  76. -DENABLE_TAR=ON \
  77. -DENABLE_TAR_SHARED=ON \
  78. -DENABLE_CPIO=OFF \
  79. -DENABLE_CAT=OFF \
  80. -DENABLE_XATTR=OFF \
  81. -DENABLE_ACL=OFF \
  82. -DENABLE_ICONV=OFF \
  83. -DENABLE_TEST=OFF \
  84. -DENABLE_COVERAGE=OFF \
  85. -DENABLE_INSTALL=ON
  86. ifeq ($(BUILD_VARIANT),noopenssl)
  87. CMAKE_OPTIONS += -DENABLE_OPENSSL=OFF
  88. else
  89. CMAKE_OPTIONS += -DENABLE_OPENSSL=ON
  90. endif
  91. define Build/InstallDev
  92. $(INSTALL_DIR) $(1)/usr/include
  93. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  94. $(INSTALL_DIR) $(1)/usr/lib
  95. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  96. endef
  97. define Package/libarchive/install
  98. $(INSTALL_DIR) $(1)/usr/lib
  99. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  100. endef
  101. define Package/bsdtar/install
  102. $(INSTALL_DIR) $(1)/usr/bin
  103. $(CP) $(PKG_INSTALL_DIR)/usr/bin/bsdtar $(1)/usr/bin
  104. endef
  105. Package/libarchive-noopenssl/install = $(Package/libarchive/install)
  106. Package/bsdtar-noopenssl/install = $(Package/bsdtar/install)
  107. $(eval $(call BuildPackage,libarchive))
  108. $(eval $(call BuildPackage,libarchive-noopenssl))
  109. $(eval $(call BuildPackage,bsdtar))
  110. $(eval $(call BuildPackage,bsdtar-noopenssl))