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
/zlib
16 PKG_MD5SUM
:=dee233bf288ee795ac96a98cc2e369b6
18 include $(INCLUDE_DIR
)/package.mk
23 TITLE
:=Library implementing the deflate compression method
24 URL
:=http
://www.zlib.net
/
27 define Build
/Configure
28 (cd
$(PKG_BUILD_DIR
); \
29 $(TARGET_CONFIGURE_OPTS
) \
30 LDSHARED
="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \
31 CFLAGS
="$(TARGET_CFLAGS) $(FPIC)" \
40 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
41 $(TARGET_CONFIGURE_OPTS
) \
42 CFLAGS
="$(TARGET_CFLAGS) -fPIC" \
44 mkdir
-p
$(PKG_INSTALL_DIR
)
45 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
46 DESTDIR
="$(PKG_INSTALL_DIR)" \
50 define Build
/InstallDev
51 mkdir
-p
$(1)/usr
/include
52 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/z
{conf
,lib
}.h \
55 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libz.
{a
,so
*} \
59 # libz.so is needed for openssl (zlib-dynamic)
60 define Package
/zlib
/install
61 $(INSTALL_DIR
) $(1)/usr
/lib
62 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libz.so
$(1)/usr
/lib
/
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libz.so.
* $(1)/usr
/lib
/
66 $(eval
$(call BuildPackage
,zlib
))