Don't include libz.so into zlib package
[openwrt.git] / package / zlib / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := zlib
6 PKG_VERSION := 1.2.2
7 PKG_RELEASE := 1
8 PKG_MD5SUM := 68bd51aaa6558c3bc3fd4890e53413de
9
10 PKG_SOURCE_SITE := http://www.zlib.net/
11 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_SOURCE_CAT := zcat
13 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
14 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
15 PKG_IPK := $(PACKAGE_DIR)/zlib_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
16
17
18 $(DL_DIR)/$(PKG_SOURCE_FILE):
19 mkdir -p $(DL_DIR)
20 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
21
22 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
23 mkdir -p $(TOOL_BUILD_DIR)
24 $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
25 $(PATCH) $(PKG_BUILD_DIR) . $(PKG_NAME).patch
26 touch $(PKG_BUILD_DIR)/.patched
27
28 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
29 (cd $(PKG_BUILD_DIR); \
30 $(TARGET_CONFIGURE_OPTS) \
31 ./configure \
32 --prefix=/ \
33 --shared)
34 touch $(PKG_BUILD_DIR)/.configured
35
36 $(PKG_BUILD_DIR)/libz.so: $(PKG_BUILD_DIR)/.configured
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 $(TARGET_CONFIGURE_OPTS) \
39 CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
40 libz.a libz.so
41
42 $(STAGING_DIR)/lib/libz.so: $(PKG_BUILD_DIR)/libz.so
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 DESTDIR="$(STAGING_DIR)" \
45 install
46
47 $(PKG_IPK): $(STAGING_DIR)/lib/libz.so
48 mkdir -p $(PACKAGE_DIR)
49 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/zlib zlib.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
50 mkdir -p $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib
51 cp -a $(PKG_BUILD_DIR)/libz.so.* $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib
52 $(STRIP) $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib/*
53 $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/zlib $(PACKAGE_DIR)
54
55 $(IPKG_STATE_DIR)/info/zlib.list: $(PKG_IPK)
56 $(IPKG) install $(PKG_IPK)
57
58 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
59 prepare: $(PKG_BUILD_DIR)/.patched
60 compile: $(STAGING_DIR)/lib/libz.so $(PKG_IPK)
61 install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/zlib.list
62
63 clean:
64 rm -rf $(PKG_BUILD_DIR)
65 rm -f $(STAGING_DIR)/lib/libz* $(STAGING_DIR)/include/zlib*
66 rm -f $(PACKAGE_DIR)/zlib\*.ipk
67
This page took 0.041315 seconds and 5 git commands to generate.