2005-03-21 08:12:49 +00:00
|
|
|
# $Id$
|
|
|
|
|
2005-03-06 03:34:52 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2005-04-14 06:11:36 +00:00
|
|
|
PKG_NAME:=zlib
|
2006-01-13 15:36:09 +00:00
|
|
|
PKG_VERSION:=1.2.3
|
|
|
|
PKG_RELEASE:=3
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-05-10 19:06:22 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
2006-06-18 18:30:40 +00:00
|
|
|
PKG_SOURCE_URL:=http://www.zlib.net @SF/zlib
|
2006-05-10 19:06:22 +00:00
|
|
|
PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6
|
2005-05-24 02:27:19 +00:00
|
|
|
PKG_CAT:=bzcat
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2005-05-13 04:26:17 +00:00
|
|
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-06-21 02:16:37 +00:00
|
|
|
include $(TOPDIR)/include/package.mk
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-05-10 19:06:22 +00:00
|
|
|
define Package/zlib
|
|
|
|
SECTION:=base
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Library implementing the deflate compression method
|
|
|
|
DESCRIPTION:=A library implementing the 'deflate' compression method
|
|
|
|
URL:=http://www.zlib.net/
|
|
|
|
endef
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-05-10 19:06:22 +00:00
|
|
|
define Build/Configure
|
2005-03-06 03:34:52 +00:00
|
|
|
(cd $(PKG_BUILD_DIR); \
|
2005-04-14 06:11:36 +00:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2005-08-29 21:41:38 +00:00
|
|
|
LDSHARED="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \
|
2005-08-29 22:07:44 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
|
2005-04-14 06:11:36 +00:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--shared \
|
|
|
|
);
|
2006-05-10 19:06:22 +00:00
|
|
|
endef
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-05-10 19:06:22 +00:00
|
|
|
define Build/Compile
|
2005-03-06 03:34:52 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2005-04-14 06:11:36 +00:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
|
|
|
|
libz.a libz.so
|
2005-05-13 04:26:17 +00:00
|
|
|
mkdir -p $(PKG_INSTALL_DIR)
|
2005-03-06 03:34:52 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2005-05-13 04:26:17 +00:00
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
2005-04-14 06:11:36 +00:00
|
|
|
install
|
2006-05-10 19:06:22 +00:00
|
|
|
endef
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-05-29 01:29:46 +00:00
|
|
|
define Build/InstallDev
|
2005-05-13 04:26:17 +00:00
|
|
|
mkdir -p $(STAGING_DIR)/usr/include
|
2006-06-18 18:30:40 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \
|
2006-05-29 01:29:46 +00:00
|
|
|
$(STAGING_DIR)/usr/include/
|
2005-05-13 04:26:17 +00:00
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib
|
2006-06-18 18:30:40 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \
|
2006-05-29 01:29:46 +00:00
|
|
|
$(STAGING_DIR)/usr/lib/
|
|
|
|
endef
|
2005-05-13 04:26:17 +00:00
|
|
|
|
2006-05-29 01:29:46 +00:00
|
|
|
define Build/UninstallDev
|
2006-06-18 18:30:40 +00:00
|
|
|
rm -rf $(STAGING_DIR)/usr/include/z{conf,lib}.h \
|
|
|
|
$(STAGING_DIR)/usr/lib/libz.{a,so*}
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/zlib/install
|
|
|
|
install -m0755 -d $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
|
2006-05-29 01:29:46 +00:00
|
|
|
endef
|
2006-05-10 19:16:02 +00:00
|
|
|
|
|
|
|
$(eval $(call BuildPackage,zlib))
|