libs/libarchive: Update to 3.2.2 and add bsdtar
[feed/packages.git] / libs / libarchive / Makefile
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.2.2
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_MD5SUM:=691c194ee132d1f0f7a42541f091db811bc2e56f7107e9121be2bc8c04f1060f
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/$(PKG_NAME)/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/$(PKG_NAME)
34 $(call Package/$(PKG_NAME)/Default)
35 DEPENDS += +libopenssl
36 endef
37
38 define Package/$(PKG_NAME)-noopenssl
39 $(call Package/$(PKG_NAME)/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
69 ifeq ($(BUILD_VARIANT),noopenssl)
70 CONFIGURE_ARGS += --without-openssl
71 else
72 CONFIGURE_ARGS += --with-openssl
73 endif
74
75 define Build/InstallDev
76 $(INSTALL_DIR) $(1)/usr/include
77 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
78 $(INSTALL_DIR) $(1)/usr/lib
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
80 endef
81
82 define Package/libarchive/install
83 $(INSTALL_DIR) $(1)/usr/lib
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
85 endef
86
87 define Package/bsdtar/install
88 $(INSTALL_DIR) $(1)/usr/bin
89 $(CP) $(PKG_INSTALL_DIR)/usr/bin/bsdtar $(1)/usr/bin
90 endef
91
92 Package/$(PKG_NAME)-noopenssl/install = $(Package/$(PKG_NAME)/install)
93
94 $(eval $(call BuildPackage,libarchive))
95 $(eval $(call BuildPackage,libarchive-noopenssl))
96 $(eval $(call BuildPackage,bsdtar))