Merge pull request #1516 from bk138/ola-0.9.6
[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.1.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:=efad5a503f66329bb9d2f4308b5de98a
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
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 CONFIGURE_ARGS += \
45 --disable-bsdcpio \
46 --disable-bsdtar \
47 --disable-acl \
48 --disable-xattr \
49 --without-bz2lib \
50 --without-lzma \
51 --without-lzmadec \
52 --without-lzo2 \
53 --without-nettle \
54 --without-expat \
55 --without-xml2
56
57 ifeq ($(BUILD_VARIANT),noopenssl)
58 CONFIGURE_ARGS += --without-openssl
59 else
60 CONFIGURE_ARGS += --with-openssl
61 endif
62
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
70 define Package/libarchive/install
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
73 endef
74 Package/$(PKG_NAME)-noopenssl/install = $(Package/$(PKG_NAME)/install)
75
76 $(eval $(call BuildPackage,libarchive))
77 $(eval $(call BuildPackage,libarchive-noopenssl))