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.

105 lines
2.6 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.3.3
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.libarchive.org/downloads
  13. PKG_HASH:=ba7eb1781c9fbbae178c4c6bad1c6eb08edab9a1496c64833d1715d022b30e2e
  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
  39. SECTION:=utils
  40. CATEGORY:=Utilities
  41. SUBMENU:=Compression
  42. DEPENDS:=+libarchive-noopenssl
  43. TITLE:=BSD variant that supports various file compression formats
  44. URL:=http://www.libarchive.org/
  45. endef
  46. define Package/bsdtar/description
  47. Reads a variety of formats including tar, pax, zip, xar, lha, ar,
  48. cab, mtree, rar, warc, 7z and ISO images. Writes tar, pax, zip,
  49. xar, ar, ISO, mtree and shar archives. Automatically handles
  50. archives compressed with gzip, bzip2, lzip, xz, lzma or compress.
  51. endef
  52. CONFIGURE_ARGS += \
  53. --enable-bsdtar=shared \
  54. --disable-bsdcpio \
  55. --disable-rpath \
  56. --disable-acl \
  57. --disable-xattr \
  58. --without-cng \
  59. --without-iconv \
  60. --without-lz4 \
  61. --without-lzo2 \
  62. --without-nettle \
  63. --without-xml2 \
  64. --without-zstd
  65. ifeq ($(BUILD_VARIANT),noopenssl)
  66. CONFIGURE_ARGS += --without-openssl
  67. else
  68. CONFIGURE_ARGS += --with-openssl
  69. endif
  70. define Build/InstallDev
  71. $(INSTALL_DIR) $(1)/usr/include
  72. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  73. $(INSTALL_DIR) $(1)/usr/lib
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  75. endef
  76. define Package/libarchive/install
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  79. endef
  80. define Package/bsdtar/install
  81. $(INSTALL_DIR) $(1)/usr/bin
  82. $(CP) $(PKG_INSTALL_DIR)/usr/bin/bsdtar $(1)/usr/bin
  83. endef
  84. Package/libarchive-noopenssl/install = $(Package/libarchive/install)
  85. $(eval $(call BuildPackage,libarchive))
  86. $(eval $(call BuildPackage,libarchive-noopenssl))
  87. $(eval $(call BuildPackage,bsdtar))