2005-03-21 10:12:49 +02:00
|
|
|
# $Id$
|
|
|
|
|
2005-03-06 05:34:52 +02:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
PKG_NAME:=zlib
|
|
|
|
PKG_VERSION:=1.2.2
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_MD5SUM:=68bd51aaa6558c3bc3fd4890e53413de
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-04-14 09:11:36 +03: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 05:34:52 +02:00
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
IPKG_ZLIB:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
|
|
|
|
IDIR_ZLIB:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
|
|
|
|
INFO_ZLIB:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
$(DL_DIR)/$(PKG_SOURCE):
|
|
|
|
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
|
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
|
|
|
|
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-04-18 09:37:11 +03:00
|
|
|
$(PATCH) $(PKG_BUILD_DIR) ./patches
|
2005-04-14 09:11:36 +03:00
|
|
|
touch $(PKG_BUILD_DIR)/.prepared
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
2005-03-06 05:34:52 +02:00
|
|
|
(cd $(PKG_BUILD_DIR); \
|
2005-04-14 09:11:36 +03:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--shared \
|
|
|
|
);
|
2005-03-06 05:34:52 +02:00
|
|
|
touch $(PKG_BUILD_DIR)/.configured
|
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
|
2005-03-06 05:34:52 +02:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2005-04-14 09:11:36 +03:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
|
|
|
|
libz.a libz.so
|
|
|
|
touch $(PKG_BUILD_DIR)/.built
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
$(STAGING_DIR)/usr/lib/libz.so: $(PKG_BUILD_DIR)/.built
|
2005-03-06 05:34:52 +02:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2005-04-14 09:11:36 +03:00
|
|
|
DESTDIR="$(STAGING_DIR)" \
|
|
|
|
install
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
$(IPKG_ZLIB): $(STAGING_DIR)/usr/lib/libz.so
|
2005-04-18 09:37:11 +03:00
|
|
|
$(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_ZLIB) ./ipkg/$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
|
2005-04-14 09:11:36 +03:00
|
|
|
mkdir -p $(IDIR_ZLIB)/usr/lib
|
2005-04-18 09:37:11 +03:00
|
|
|
cp -fpR $(STAGING_DIR)/usr/lib/libz.so.* $(IDIR_ZLIB)/usr/lib/
|
2005-04-14 09:11:36 +03:00
|
|
|
$(STRIP) $(IDIR_ZLIB)/usr/lib/lib*.so*
|
2005-03-06 05:34:52 +02:00
|
|
|
mkdir -p $(PACKAGE_DIR)
|
2005-04-14 09:11:36 +03:00
|
|
|
$(IPKG_BUILD) $(IDIR_ZLIB) $(PACKAGE_DIR)
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
$(INFO_ZLIB): $(IPKG_ZLIB)
|
|
|
|
$(IPKG) install $(IPKG_ZLIB)
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
source: $(DL_DIR)/$(PKG_SOURCE)
|
|
|
|
prepare: $(PKG_BUILD_DIR)/.prepared
|
|
|
|
compile: $(IPKG_ZLIB)
|
|
|
|
install: $(INFO_ZLIB)
|
2005-03-06 14:03:54 +02:00
|
|
|
|
2005-03-06 05:34:52 +02:00
|
|
|
clean:
|
2005-04-18 09:37:11 +03:00
|
|
|
rm -rf $(STAGING_DIR)/usr/include/z{conf,lib}.h
|
|
|
|
rm -rf $(STAGING_DIR)/usr/lib/libz.{a,so*}
|
|
|
|
rm -rf $(STAGING_DIR)/usr/share/man/man*/zlib.*
|
2005-04-14 09:11:36 +03:00
|
|
|
rm -rf $(PKG_BUILD_DIR) $(IPKG_ZLIB)
|