2005-03-21 16:12:49 +08:00
|
|
|
# $Id$
|
|
|
|
|
2005-03-06 11:34:52 +08:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2005-04-14 14:11:36 +08:00
|
|
|
PKG_NAME:=zlib
|
|
|
|
PKG_VERSION:=1.2.2
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_MD5SUM:=68bd51aaa6558c3bc3fd4890e53413de
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2005-04-14 14:11:36 +08:00
|
|
|
PKG_SOURCE_URL:=\
|
|
|
|
http://www.zlib.net/ \
|
|
|
|
http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_CAT:=zcat
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2005-04-14 14:11:36 +08:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
2005-05-13 12:26:17 +08:00
|
|
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2005-05-13 12:26:17 +08:00
|
|
|
include $(TOPDIR)/package/rules.mk
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2005-05-13 12:26:17 +08:00
|
|
|
$(eval $(call PKG_template,ZLIB,zlib,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2005-04-14 14:11:36 +08:00
|
|
|
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
2005-03-06 11:34:52 +08:00
|
|
|
(cd $(PKG_BUILD_DIR); \
|
2005-04-14 14:11:36 +08:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--shared \
|
|
|
|
);
|
2005-03-06 11:34:52 +08:00
|
|
|
touch $(PKG_BUILD_DIR)/.configured
|
|
|
|
|
2005-04-14 14:11:36 +08:00
|
|
|
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
|
2005-03-06 11:34:52 +08:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2005-04-14 14:11:36 +08:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
|
|
|
|
libz.a libz.so
|
2005-05-13 12:26:17 +08:00
|
|
|
mkdir -p $(PKG_INSTALL_DIR)
|
2005-03-06 11:34:52 +08:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2005-05-13 12:26:17 +08:00
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
2005-04-14 14:11:36 +08:00
|
|
|
install
|
2005-05-13 12:26:17 +08:00
|
|
|
touch $(PKG_BUILD_DIR)/.built
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2005-05-13 12:26:17 +08:00
|
|
|
$(IPKG_ZLIB):
|
|
|
|
install -m0755 -d $(IDIR_ZLIB)/usr/lib
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(IDIR_ZLIB)/usr/lib/
|
|
|
|
$(RSTRIP) $(IDIR_ZLIB)
|
2005-04-14 14:11:36 +08:00
|
|
|
$(IPKG_BUILD) $(IDIR_ZLIB) $(PACKAGE_DIR)
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2005-05-13 12:26:17 +08:00
|
|
|
$(STAGING_DIR)/usr/lib/libz.so: $(PKG_BUILD_DIR)/.built
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/include
|
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h $(STAGING_DIR)/usr/include
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib
|
2005-05-14 04:37:53 +08:00
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} $(STAGING_DIR)/usr/lib
|
2005-05-13 12:26:17 +08:00
|
|
|
touch $(STAGING_DIR)/usr/lib/libz.so
|
|
|
|
|
|
|
|
install-dev: $(STAGING_DIR)/usr/lib/libz.so
|
|
|
|
|
|
|
|
uninstall-dev:
|
2005-04-18 14:37:11 +08:00
|
|
|
rm -rf $(STAGING_DIR)/usr/include/z{conf,lib}.h
|
|
|
|
rm -rf $(STAGING_DIR)/usr/lib/libz.{a,so*}
|
2005-05-13 12:26:17 +08:00
|
|
|
|
|
|
|
compile: install-dev
|
|
|
|
clean: uninstall-dev
|