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