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.

97 lines
2.4 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.2.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.libarchive.org/downloads
  13. PKG_MD5SUM:=691c194ee132d1f0f7a42541f091db811bc2e56f7107e9121be2bc8c04f1060f
  14. PKG_MAINTAINER:=Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de>
  15. PKG_LICENSE:=BSD-2-Clause
  16. PKG_INSTALL:=1
  17. PKG_FIXUP:=autoreconf
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/$(PKG_NAME)/Default
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. DEPENDS:=+zlib +liblzma +libbz2 +libexpat
  23. TITLE:=Multi-format archive and compression library
  24. URL:=http://www.libarchive.org/
  25. endef
  26. define Package/$(PKG_NAME)
  27. $(call Package/$(PKG_NAME)/Default)
  28. DEPENDS += +libopenssl
  29. endef
  30. define Package/$(PKG_NAME)-noopenssl
  31. $(call Package/$(PKG_NAME)/Default)
  32. TITLE += (without OpenSSL dependency)
  33. VARIANT:=noopenssl
  34. endef
  35. define Package/bsdtar
  36. SECTION:=utils
  37. CATEGORY:=Utilities
  38. SUBMENU:=Compression
  39. DEPENDS:=+libarchive-noopenssl
  40. TITLE:=BSD variant that supports various file compression formats
  41. URL:=http://www.libarchive.org/
  42. endef
  43. define Package/bsdtar/description
  44. Reads a variety of formats including tar, pax, zip, xar, lha, ar,
  45. cab, mtree, rar, warc, 7z and ISO images. Writes tar, pax, zip,
  46. xar, ar, ISO, mtree and shar archives. Automatically handles
  47. archives compressed with gzip, bzip2, lzip, xz, lzma or compress.
  48. endef
  49. CONFIGURE_ARGS += \
  50. --disable-bsdcpio \
  51. --enable-bsdtar=shared \
  52. --disable-acl \
  53. --disable-xattr \
  54. --without-lzo2 \
  55. --without-nettle \
  56. --without-xml2 \
  57. --without-lz4 \
  58. ifeq ($(BUILD_VARIANT),noopenssl)
  59. CONFIGURE_ARGS += --without-openssl
  60. else
  61. CONFIGURE_ARGS += --with-openssl
  62. endif
  63. define Build/InstallDev
  64. $(INSTALL_DIR) $(1)/usr/include
  65. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  68. endef
  69. define Package/libarchive/install
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  72. endef
  73. define Package/bsdtar/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(CP) $(PKG_INSTALL_DIR)/usr/bin/bsdtar $(1)/usr/bin
  76. endef
  77. Package/$(PKG_NAME)-noopenssl/install = $(Package/$(PKG_NAME)/install)
  78. $(eval $(call BuildPackage,libarchive))
  79. $(eval $(call BuildPackage,libarchive-noopenssl))
  80. $(eval $(call BuildPackage,bsdtar))