2006-06-27 00:35:46 +00:00
|
|
|
#
|
2012-06-09 23:29:28 +00:00
|
|
|
# Copyright (C) 2006-2012 OpenWrt.org
|
2006-06-27 00:35:46 +00:00
|
|
|
#
|
|
|
|
# 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
|
2012-06-09 23:29:28 +00:00
|
|
|
PKG_VERSION:=1.2.7
|
2010-09-13 07:45:25 +00:00
|
|
|
PKG_RELEASE:=1
|
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
|
2012-06-09 23:29:28 +00:00
|
|
|
PKG_MD5SUM:=2ab442d169156f34c379c968f3f482dd
|
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)" \
|
2005-04-14 06:11:36 +00:00
|
|
|
./configure \
|
2006-09-23 13:31:54 +00:00
|
|
|
--prefix=/usr \
|
|
|
|
--shared \
|
2010-09-19 05:33:18 +00:00
|
|
|
--uname=Linux \
|
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
|
2012-09-23 09:50:01 +00:00
|
|
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
2005-04-14 06:11:36 +00:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2010-09-19 05:33:18 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
libz.a libz.so.$(PKG_VERSION)
|
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/
|
2011-10-25 21:10:37 +00:00
|
|
|
mkdir -p $(1)/usr/lib/pkgconfig
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/zlib.pc \
|
|
|
|
$(1)/usr/lib/pkgconfig/
|
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))
|