2006-06-27 00:35:46 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2005-03-21 08:12:49 +00:00
|
|
|
|
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
|
2007-11-29 18:30:27 +00:00
|
|
|
PKG_RELEASE:=5
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-05-10 19:06:22 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
2010-05-13 18:24:27 +00:00
|
|
|
PKG_SOURCE_URL:=http://www.zlib.net @SF/libpng
|
2006-05-10 19:06:22 +00:00
|
|
|
PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-05-10 19:06:22 +00:00
|
|
|
define Package/zlib
|
2006-09-23 13:31:54 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Library implementing the deflate compression method
|
|
|
|
URL:=http://www.zlib.net/
|
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/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" \
|
2009-07-25 21:49:48 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
|
2006-10-14 23:05:37 +00:00
|
|
|
UNAME_S="Linux" \
|
2005-04-14 06:11:36 +00:00
|
|
|
./configure \
|
2006-09-23 13:31:54 +00:00
|
|
|
--prefix=/usr \
|
|
|
|
--shared \
|
2005-04-14 06:11:36 +00:00
|
|
|
);
|
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) \
|
2010-01-02 19:45:50 +00:00
|
|
|
LDSHARED="$(TARGET_CROSS)ld -shared" \
|
2009-10-20 08:41:32 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
|
2005-04-14 06:11:36 +00:00
|
|
|
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
|
2007-09-28 01:45:11 +00:00
|
|
|
mkdir -p $(1)/usr/include
|
2006-06-18 18:30:40 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \
|
2007-09-28 01:45:11 +00:00
|
|
|
$(1)/usr/include/
|
|
|
|
mkdir -p $(1)/usr/lib
|
2006-06-18 18:30:40 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \
|
2007-09-28 01:45:11 +00:00
|
|
|
$(1)/usr/lib/
|
2006-05-29 01:29:46 +00:00
|
|
|
endef
|
2006-06-18 18:30:40 +00:00
|
|
|
|
2007-08-01 12:32:53 +00:00
|
|
|
# libz.so is needed for openssl (zlib-dynamic)
|
2006-06-18 18:30:40 +00:00
|
|
|
define Package/zlib/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2007-08-01 12:32:53 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so $(1)/usr/lib/
|
2006-06-18 18:30:40 +00:00
|
|
|
$(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))
|