unzip: patch CVE-2014-9913 and CVE-2016-9844 vulnerabilities
[feed/packages.git] / utils / unzip / Makefile
index cdd6d2ae91f7c2f9f301ed5641d19bc072afa420..93a4dcffcb382bdaec3eb36eb643e58e0f9bc663 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2017 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=unzip
 PKG_REV:=60
 PKG_VERSION:=6.0
-PKG_RELEASE:=2
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=@SF/infozip
@@ -44,7 +44,13 @@ endef
 define Build/Configure
 endef
 
-TARGET_CFLAGS += -DNO_LCHMOD -DLARGE_FILE_SUPPORT
+TARGET_CFLAGS += \
+       -DNO_LCHMOD \
+       -DLARGE_FILE_SUPPORT \
+       -DUNICODE_WCHAR \
+       -DUNICODE_SUPPORT \
+       -DUTF8_MAYBE_NATIVE \
+       -DZIP64_SUPPORT
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile unzips \
@@ -59,7 +65,10 @@ endef
 
 define Package/unzip/install
        $(INSTALL_DIR) $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/{funzip,unzip,unzipsfx,zipgrep} \
+               $(1)/usr/bin/
+       $(LN) unzip $(1)/usr/bin/zipinfo
 endef
 
 $(eval $(call BuildPackage,unzip))