Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / utils / zip / Makefile
1 #
2 # Copyright (C) 2007-2016 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:=zip
11 PKG_REV:=30
12 PKG_VERSION:=3.0
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz
16 PKG_SOURCE_URL:=@SF/infozip
17 PKG_HASH:=f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369
18 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
19
20 PKG_LICENSE:=BSD-4-Clause
21 PKG_LICENSE_FILES:=LICENSE
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV)
24 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV)
25 PKG_CHECK_FORMAT_SECURITY:=0
26
27 include $(INCLUDE_DIR)/host-build.mk
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/zip
31 SECTION:=utils
32 CATEGORY:=Utilities
33 DEPENDS:=
34 TITLE:=Archiver for .zip files
35 URL:=http://infozip.sourceforge.net/Zip.html
36 SUBMENU:=Compression
37 endef
38
39 define Package/zip/description
40 This is InfoZIP's zip program. It produces files that are fully
41 compatible with the popular PKZIP program; however, the command line
42 options are not identical. In other words, the end result is the same,
43 but the methods differ.
44 endef
45
46 define Build/Configure
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile generic \
51 prefix="$(PKG_INSTALL_DIR)/usr" \
52 CFLAGS="$(TARGET_CFLAGS)" \
53 CC="$(TARGET_CC) $(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX $(TARGET_LDFLAGS)" \
54 IZ_BZIP2="no" \
55 install
56 endef
57
58 define Package/zip/install
59 $(INSTALL_DIR) $(1)/usr/bin/
60 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
61 endef
62
63 define Host/Compile
64 +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) -I. -f unix/Makefile generic
65 endef
66
67 define Host/Install
68 $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
69 $(INSTALL_BIN) $(HOST_BUILD_DIR)/zip $(STAGING_DIR_HOSTPKG)/bin/
70 endef
71
72 $(eval $(call HostBuild))
73 $(eval $(call BuildPackage,zip))