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
) .
$(PKG_NAME
).patch
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
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
53 mkdir
-p
$(IDIR_ZLIB
)/usr
/lib
54 cp
-a
$(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 -$(MAKE
) -C
$(PKG_BUILD_DIR
) \
69 DESTDIR
="$(STAGING_DIR)" \
71 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_ZLIB
)