3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:= 68bd51aaa6558c3bc3fd4890e53413de
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
18 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
20 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE_FILE
) $(PKG_MD5SUM
) $(PKG_SOURCE_SITE
)
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
28 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.patched
29 (cd
$(PKG_BUILD_DIR
); \
30 $(TARGET_CONFIGURE_OPTS
) \
34 touch
$(PKG_BUILD_DIR
)/.configured
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)" \
42 $(STAGING_DIR
)/lib
/libz.so
: $(PKG_BUILD_DIR
)/libz.so
43 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
44 DESTDIR
="$(STAGING_DIR)" \
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
)
55 $(IPKG_STATE_DIR
)/info/zlib.list
: $(PKG_IPK
)
56 $(IPKG
) install $(PKG_IPK
)
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
64 rm -rf
$(PKG_BUILD_DIR
)
65 rm -f
$(STAGING_DIR
)/lib
/libz
* $(STAGING_DIR
)/include/zlib
*
66 rm -f
$(PACKAGE_DIR
)/zlib\
*.ipk