2006-06-27 03:35:46 +03: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 10:12:49 +02:00
|
|
|
|
2005-03-06 05:34:52 +02:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2005-04-14 09:11:36 +03:00
|
|
|
PKG_NAME:=zlib
|
2010-09-13 10:45:25 +03:00
|
|
|
PKG_VERSION:=1.2.5
|
|
|
|
PKG_RELEASE:=1
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2006-05-10 22:06:22 +03:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
2010-05-13 21:24:27 +03:00
|
|
|
PKG_SOURCE_URL:=http://www.zlib.net @SF/libpng
|
2010-09-13 10:45:25 +03:00
|
|
|
PKG_MD5SUM:=be1e89810e66150f5b0327984d8625a0
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2006-06-21 05:32:39 +03:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2006-05-10 22:06:22 +03:00
|
|
|
define Package/zlib
|
2006-09-23 16:31:54 +03:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Library implementing the deflate compression method
|
|
|
|
URL:=http://www.zlib.net/
|
2006-05-10 22:06:22 +03:00
|
|
|
endef
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2006-05-10 22:06:22 +03:00
|
|
|
define Build/Configure
|
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" \
|
2009-07-26 00:49:48 +03:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
|
2005-04-14 09:11:36 +03:00
|
|
|
./configure \
|
2006-09-23 16:31:54 +03:00
|
|
|
--prefix=/usr \
|
|
|
|
--shared \
|
2010-09-19 08:33:18 +03:00
|
|
|
--uname=Linux \
|
2005-04-14 09:11:36 +03:00
|
|
|
);
|
2006-05-10 22:06:22 +03:00
|
|
|
endef
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2006-05-10 22:06:22 +03:00
|
|
|
define Build/Compile
|
2010-09-07 13:00:34 +03:00
|
|
|
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
2005-04-14 09:11:36 +03:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2010-09-19 08:33:18 +03:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
libz.a libz.so.$(PKG_VERSION)
|
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
|
2006-05-10 22:06:22 +03:00
|
|
|
endef
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2006-05-29 04:29:46 +03:00
|
|
|
define Build/InstallDev
|
2007-09-28 04:45:11 +03:00
|
|
|
mkdir -p $(1)/usr/include
|
2006-06-18 21:30:40 +03:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \
|
2007-09-28 04:45:11 +03:00
|
|
|
$(1)/usr/include/
|
|
|
|
mkdir -p $(1)/usr/lib
|
2006-06-18 21:30:40 +03:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \
|
2007-09-28 04:45:11 +03:00
|
|
|
$(1)/usr/lib/
|
2011-10-26 00:10:37 +03:00
|
|
|
mkdir -p $(1)/usr/lib/pkgconfig
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/zlib.pc \
|
|
|
|
$(1)/usr/lib/pkgconfig/
|
2006-05-29 04:29:46 +03:00
|
|
|
endef
|
2006-06-18 21:30:40 +03:00
|
|
|
|
2007-08-01 15:32:53 +03:00
|
|
|
# libz.so is needed for openssl (zlib-dynamic)
|
2006-06-18 21:30:40 +03:00
|
|
|
define Package/zlib/install
|
2006-11-23 02:29:07 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2007-08-01 15:32:53 +03:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so $(1)/usr/lib/
|
2006-06-18 21:30:40 +03:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
|
2006-05-29 04:29:46 +03:00
|
|
|
endef
|
2006-05-10 22:16:02 +03:00
|
|
|
|
|
|
|
$(eval $(call BuildPackage,zlib))
|