2 # Copyright (C) 2006-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@SF/libpng http://www.zlib.net
16 PKG_HASH:=4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066
19 PKG_LICENSE_FILES:=README
20 PKG_CPE_ID:=cpe:/a:gnu:zlib
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/cmake.mk
28 TITLE:=Library implementing the deflate compression method
29 URL:=http://www.zlib.net/
32 define Package/zlib-dev
37 TITLE:=Development files for the zlib library
40 define Package/zlib/description
41 zlib is a lossless data-compression library.
42 This package includes the shared library.
45 define Package/zlib-dev/description
46 zlib is a lossless data-compression library.
47 This package includes the development support files.
50 TARGET_CFLAGS += $(FPIC)
52 ifneq ($(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),)
57 define Build/InstallDev
58 mkdir -p $(1)/usr/include
59 $(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \
64 mkdir -p $(1)/usr/lib/pkgconfig
65 $(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/zlib.pc \
66 $(1)/usr/lib/pkgconfig/
69 # libz.so is needed for openssl (zlib-dynamic)
70 define Package/zlib/install
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so $(1)/usr/lib/
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
76 define Package/zlib-dev/install
77 $(INSTALL_DIR) $(1)/usr/include
78 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zconf.h \
80 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zlib.h \
82 $(INSTALL_DIR) $(1)/usr/lib
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.a $(1)/usr/lib/
84 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
85 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/zlib.pc \
86 $(1)/usr/lib/pkgconfig/
89 $(eval $(call BuildPackage,zlib))
90 $(eval $(call BuildPackage,zlib-dev))