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
|
2006-01-13 17:36:09 +02:00
|
|
|
PKG_VERSION:=1.2.3
|
|
|
|
PKG_RELEASE:=3
|
|
|
|
PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2006-01-13 17:36:09 +02:00
|
|
|
PKG_SOURCE_URL:=http://www.zlib.net \
|
|
|
|
@SF/zlib
|
2005-05-24 05:27:19 +03:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_CAT:=bzcat
|
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-05-13 07:26:17 +03:00
|
|
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-05-13 07:26:17 +03:00
|
|
|
include $(TOPDIR)/package/rules.mk
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-05-13 07:26:17 +03:00
|
|
|
$(eval $(call PKG_template,ZLIB,zlib,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-10-22 15:12:59 +03:00
|
|
|
$(PKG_BUILD_DIR)/.configured:
|
2005-03-06 05:34:52 +02:00
|
|
|
(cd $(PKG_BUILD_DIR); \
|
2005-04-14 09:11:36 +03:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2005-08-30 00:41:38 +03:00
|
|
|
LDSHARED="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \
|
2005-08-30 01:07:44 +03:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
|
2005-04-14 09:11:36 +03:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--shared \
|
|
|
|
);
|
2005-05-20 00:31:05 +03:00
|
|
|
touch $@
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-10-22 15:12:59 +03:00
|
|
|
$(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
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
|
|
|
|
libz.a libz.so
|
2005-05-13 07:26:17 +03:00
|
|
|
mkdir -p $(PKG_INSTALL_DIR)
|
2005-03-06 05:34:52 +02:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2005-05-13 07:26:17 +03:00
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
2005-04-14 09:11:36 +03:00
|
|
|
install
|
2005-05-20 00:31:05 +03:00
|
|
|
touch $@
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-05-13 07:26:17 +03: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 09:11:36 +03:00
|
|
|
$(IPKG_BUILD) $(IDIR_ZLIB) $(PACKAGE_DIR)
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-05-13 07:26:17 +03:00
|
|
|
$(STAGING_DIR)/usr/lib/libz.so: $(PKG_BUILD_DIR)/.built
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/include
|
2005-08-30 00:41:38 +03:00
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include
|
2005-05-13 07:26:17 +03:00
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib
|
2005-08-30 00:41:38 +03:00
|
|
|
cp -fpR $(PKG_INSTALL_DIR)/usr/lib/* $(STAGING_DIR)/usr/lib
|
2005-05-13 07:26:17 +03:00
|
|
|
touch $(STAGING_DIR)/usr/lib/libz.so
|
|
|
|
|
|
|
|
install-dev: $(STAGING_DIR)/usr/lib/libz.so
|
|
|
|
|
|
|
|
uninstall-dev:
|
2005-08-30 00:41:38 +03:00
|
|
|
rm -rf $(STAGING_DIR)/usr/include/zconf.h
|
|
|
|
rm -rf $(STAGING_DIR)/usr/include/zlib.h
|
|
|
|
rm -rf $(STAGING_DIR)/usr/lib/libz.*
|
2005-05-13 07:26:17 +03:00
|
|
|
|
2005-10-22 15:12:59 +03:00
|
|
|
compile-targets: install-dev
|
|
|
|
clean-targets: uninstall-dev
|