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.

117 lines
2.9 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.4.3
  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:=0bfc3fd40491768a88af8d9b86bf04a9e95b6d41a94f9292dbc0ec342288c05f
  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_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.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. CONFIGURE_ARGS += \
  61. --enable-bsdtar=shared \
  62. --disable-bsdcpio \
  63. --disable-rpath \
  64. --disable-acl \
  65. --disable-xattr \
  66. --without-cng \
  67. --without-iconv \
  68. --without-lz4 \
  69. --without-lzo2 \
  70. --without-nettle \
  71. --without-xml2 \
  72. --without-zstd
  73. ifeq ($(BUILD_VARIANT),noopenssl)
  74. CONFIGURE_ARGS += --without-openssl
  75. else
  76. CONFIGURE_ARGS += --with-openssl
  77. endif
  78. define Build/InstallDev
  79. $(INSTALL_DIR) $(1)/usr/include
  80. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  81. $(INSTALL_DIR) $(1)/usr/lib
  82. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  83. endef
  84. define Package/libarchive/install
  85. $(INSTALL_DIR) $(1)/usr/lib
  86. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  87. endef
  88. define Package/bsdtar/install
  89. $(INSTALL_DIR) $(1)/usr/bin
  90. $(CP) $(PKG_INSTALL_DIR)/usr/bin/bsdtar $(1)/usr/bin
  91. endef
  92. Package/libarchive-noopenssl/install = $(Package/libarchive/install)
  93. Package/bsdtar-noopenssl/install = $(Package/bsdtar/install)
  94. $(eval $(call BuildPackage,libarchive))
  95. $(eval $(call BuildPackage,libarchive-noopenssl))
  96. $(eval $(call BuildPackage,bsdtar))
  97. $(eval $(call BuildPackage,bsdtar-noopenssl))