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.

118 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.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/libarchive/libarchive/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=c160d3c45010a51a924208f13f6b7b956dabdf8c5c60195df188a599028caa7c
  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. PKG_INSTALL:=1
  20. PKG_FIXUP:=autoreconf
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libarchive/Default
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. DEPENDS:=+zlib +liblzma +libbz2 +libexpat
  26. TITLE:=Multi-format archive and compression library
  27. URL:=https://www.libarchive.org/
  28. endef
  29. define Package/libarchive
  30. $(call Package/libarchive/Default)
  31. DEPENDS += +libopenssl
  32. endef
  33. define Package/libarchive-noopenssl
  34. $(call Package/libarchive/Default)
  35. TITLE += (without OpenSSL dependency)
  36. VARIANT:=noopenssl
  37. endef
  38. define Package/bsdtar/Default
  39. SECTION:=utils
  40. CATEGORY:=Utilities
  41. SUBMENU:=Compression
  42. TITLE:=tar BSD variant
  43. URL:=https://www.libarchive.org/
  44. endef
  45. define Package/bsdtar
  46. $(call Package/bsdtar/Default)
  47. DEPENDS:= +libarchive
  48. endef
  49. define Package/bsdtar-noopenssl
  50. $(call Package/bsdtar/Default)
  51. TITLE += (without OpenSSL dependency)
  52. DEPENDS:= +libarchive-noopenssl
  53. VARIANT:=noopenssl
  54. endef
  55. define Package/bsdtar/description
  56. Reads a variety of formats including tar, pax, zip, xar, lha, ar,
  57. cab, mtree, rar, warc, 7z and ISO images. Writes tar, pax, zip,
  58. xar, ar, ISO, mtree and shar archives. Automatically handles
  59. archives compressed with gzip, bzip2, lzip, xz, lzma or compress.
  60. endef
  61. CONFIGURE_ARGS += \
  62. --enable-bsdtar=shared \
  63. --disable-bsdcpio \
  64. --disable-rpath \
  65. --disable-acl \
  66. --disable-xattr \
  67. --without-cng \
  68. --without-iconv \
  69. --without-lz4 \
  70. --without-lzo2 \
  71. --without-nettle \
  72. --without-xml2 \
  73. --without-zstd
  74. ifeq ($(BUILD_VARIANT),noopenssl)
  75. CONFIGURE_ARGS += --without-openssl
  76. else
  77. CONFIGURE_ARGS += --with-openssl
  78. endif
  79. define Build/InstallDev
  80. $(INSTALL_DIR) $(1)/usr/include
  81. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  82. $(INSTALL_DIR) $(1)/usr/lib
  83. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  84. endef
  85. define Package/libarchive/install
  86. $(INSTALL_DIR) $(1)/usr/lib
  87. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  88. endef
  89. define Package/bsdtar/install
  90. $(INSTALL_DIR) $(1)/usr/bin
  91. $(CP) $(PKG_INSTALL_DIR)/usr/bin/bsdtar $(1)/usr/bin
  92. endef
  93. Package/libarchive-noopenssl/install = $(Package/libarchive/install)
  94. Package/bsdtar-noopenssl/install = $(Package/bsdtar/install)
  95. $(eval $(call BuildPackage,libarchive))
  96. $(eval $(call BuildPackage,libarchive-noopenssl))
  97. $(eval $(call BuildPackage,bsdtar))
  98. $(eval $(call BuildPackage,bsdtar-noopenssl))