eafa92cc31180c9d70ab83dcc4249462f5a62ca0
[packages.git] / utils / zip / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$ 
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=zip
12 PKG_VERSION:=2.32
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)232.zip
16 PKG_SOURCE_URL:=@SF/infozip
17 PKG_MD5SUM:=da947ed356e5fdb30ff4bc3dc7698f33
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21 PKG_UNPACK:=unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE)
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/zip
26   SECTION:=utils
27   CATEGORY:=Utilities
28   DEPENDS:=
29   TITLE:=Archiver for .zip files
30   DESCRIPTION:=\
31         This is InfoZIP's zip program. It produces files that are fully \\\
32         compatible with the popular PKZIP program; however, the command line \\\
33         options are not identical. In other words, the end result is the same, \\\
34         but the methods differ.
35   URL:=http://infozip.sourceforge.net/Zip.html
36 endef
37
38 define Build/Configure
39 endef
40
41 define Build/Compile
42         $(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile generic \
43                 $(TARGET_CONFIGURE_OPTS) \
44                 prefix="$(PKG_INSTALL_DIR)/usr" \
45                 CFLAGS="$(TARGET_CFLAGS)" \
46                 CF="$(TARGET_CFLAGS) -O -I$(STAGING_DIR)/usr/include -I. -DUNIX" \
47                 LD="$(TARGET_CC) -L$(STAGING_DIR)/usr/lib" \
48                 install
49 endef
50
51 define Package/zip/install      
52         $(INSTALL_DIR) $(1)/usr/bin/
53         $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
54 endef
55
56 $(eval $(call BuildPackage,zip))