3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=68bd51aaa6558c3bc3fd4890e53413de
11 http
://www.zlib.net
/ \
12 http
://nthill.free.fr
/openwrt
/sources
/$(PKG_NAME
)/
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
18 IPKG_ZLIB
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
19 IDIR_ZLIB
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)
20 INFO_ZLIB
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
22 $(DL_DIR
)/$(PKG_SOURCE
):
23 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
25 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
26 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
27 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
28 touch
$(PKG_BUILD_DIR
)/.prepared
30 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
31 (cd
$(PKG_BUILD_DIR
); \
32 $(TARGET_CONFIGURE_OPTS
) \
37 touch
$(PKG_BUILD_DIR
)/.configured
39 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
40 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
41 $(TARGET_CONFIGURE_OPTS
) \
42 CFLAGS
="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
44 touch
$(PKG_BUILD_DIR
)/.built
46 $(STAGING_DIR
)/usr
/lib
/libz.so
: $(PKG_BUILD_DIR
)/.built
47 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
48 DESTDIR
="$(STAGING_DIR)" \
51 $(IPKG_ZLIB
): $(STAGING_DIR
)/usr
/lib
/libz.so
52 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_ZLIB
) .
/ipkg
/$(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
53 mkdir
-p
$(IDIR_ZLIB
)/usr
/lib
54 cp
-fpR
$(STAGING_DIR
)/usr
/lib
/libz.so.
* $(IDIR_ZLIB
)/usr
/lib
/
55 $(STRIP
) $(IDIR_ZLIB
)/usr
/lib
/lib
*.so
*
56 mkdir
-p
$(PACKAGE_DIR
)
57 $(IPKG_BUILD
) $(IDIR_ZLIB
) $(PACKAGE_DIR
)
59 $(INFO_ZLIB
): $(IPKG_ZLIB
)
60 $(IPKG
) install $(IPKG_ZLIB
)
62 source
: $(DL_DIR
)/$(PKG_SOURCE
)
63 prepare
: $(PKG_BUILD_DIR
)/.prepared
68 rm -rf
$(STAGING_DIR
)/usr
/include/z
{conf
,lib
}.h
69 rm -rf
$(STAGING_DIR
)/usr
/lib
/libz.
{a
,so
*}
70 rm -rf
$(STAGING_DIR
)/usr
/share
/man
/man
*/zlib.
*
71 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_ZLIB
)