2 # Copyright (C) 2006 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.bz2
15 PKG_SOURCE_URL
:=http
://www.zlib.net @SF
/libpng
16 PKG_MD5SUM
:=be1e89810e66150f5b0327984d8625a0
20 include $(INCLUDE_DIR
)/package.mk
25 TITLE
:=Library implementing the deflate compression method
26 URL
:=http
://www.zlib.net
/
29 define Build
/Configure
30 (cd
$(PKG_BUILD_DIR
); \
31 $(TARGET_CONFIGURE_OPTS
) \
32 LDSHARED
="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \
33 CFLAGS
="$(TARGET_CFLAGS) $(FPIC)" \
42 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
43 $(TARGET_CONFIGURE_OPTS
) \
44 CFLAGS
="$(TARGET_CFLAGS)" \
45 libz.a libz.so.
$(PKG_VERSION
)
46 mkdir
-p
$(PKG_INSTALL_DIR
)
47 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
48 DESTDIR
="$(PKG_INSTALL_DIR)" \
52 define Build
/InstallDev
53 mkdir
-p
$(1)/usr
/include
54 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/z
{conf
,lib
}.h \
57 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libz.
{a
,so
*} \
59 mkdir
-p
$(1)/usr
/lib
/pkgconfig
60 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/zlib.
pc \
61 $(1)/usr
/lib
/pkgconfig
/
64 # libz.so is needed for openssl (zlib-dynamic)
65 define Package
/zlib
/install
66 $(INSTALL_DIR
) $(1)/usr
/lib
67 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libz.so
$(1)/usr
/lib
/
68 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libz.so.
* $(1)/usr
/lib
/
71 $(eval
$(call BuildPackage
,zlib
))