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.

131 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.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. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/libarchive/Default
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. DEPENDS:=+zlib +liblzma +libbz2 +libexpat
  25. TITLE:=Multi-format archive and compression library
  26. URL:=https://www.libarchive.org/
  27. endef
  28. define Package/libarchive
  29. $(call Package/libarchive/Default)
  30. DEPENDS += +libopenssl
  31. endef
  32. define Package/libarchive-noopenssl
  33. $(call Package/libarchive/Default)
  34. TITLE += (without OpenSSL dependency)
  35. VARIANT:=noopenssl
  36. endef
  37. define Package/bsdtar/Default
  38. SECTION:=utils
  39. CATEGORY:=Utilities
  40. SUBMENU:=Compression
  41. TITLE:=tar BSD variant
  42. URL:=https://www.libarchive.org/
  43. endef
  44. define Package/bsdtar
  45. $(call Package/bsdtar/Default)
  46. DEPENDS:= +libarchive
  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))