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.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=http
://www.zlib.net @SF
/zlib
17 PKG_MD5SUM
:=dee233bf288ee795ac96a98cc2e369b6
19 include $(INCLUDE_DIR
)/package.mk
24 TITLE
:=Library implementing the deflate compression method
25 URL
:=http
://www.zlib.net
/
28 define Build
/Configure
29 (cd
$(PKG_BUILD_DIR
); \
30 $(TARGET_CONFIGURE_OPTS
) \
31 LDSHARED
="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \
32 CFLAGS
="$(TARGET_CFLAGS) $(FPIC) $(CFLAGS_LARGEFILE)" \
41 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
42 $(TARGET_CONFIGURE_OPTS
) \
43 CFLAGS
="$(TARGET_CFLAGS) -fPIC $(CFLAGS_LARGEFILE)" \
45 mkdir
-p
$(PKG_INSTALL_DIR
)
46 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
47 DESTDIR
="$(PKG_INSTALL_DIR)" \
51 define Build
/InstallDev
52 mkdir
-p
$(1)/usr
/include
53 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/z
{conf
,lib
}.h \
56 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libz.
{a
,so
*} \
60 # libz.so is needed for openssl (zlib-dynamic)
61 define Package
/zlib
/install
62 $(INSTALL_DIR
) $(1)/usr
/lib
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libz.so
$(1)/usr
/lib
/
64 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libz.so.
* $(1)/usr
/lib
/
67 $(eval
$(call BuildPackage
,zlib
))