add wlc utility
[openwrt.git] / package / zlib / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=zlib
6 PKG_VERSION:=1.2.3
7 PKG_RELEASE:=3
8
9 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
11 PKG_SOURCE_URL:=http://www.zlib.net \
12 @SF/zlib
13 PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6
14 PKG_CAT:=bzcat
15
16 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
17
18 include $(TOPDIR)/package/rules.mk
19
20 define Package/zlib
21 SECTION:=base
22 CATEGORY:=Libraries
23 TITLE:=Library implementing the deflate compression method
24 DESCRIPTION:=A library implementing the 'deflate' compression method
25 URL:=http://www.zlib.net/
26 endef
27
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) $(CFLAGS_LARGEFILE)" \
33 ./configure \
34 --prefix=/usr \
35 --shared \
36 );
37 endef
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 $(TARGET_CONFIGURE_OPTS) \
42 CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
43 libz.a libz.so
44 mkdir -p $(PKG_INSTALL_DIR)
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 install
48 endef
49
50 define Package/zlib/install
51 install -m0755 -d $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
53 endef
54
55 define Build/InstallDev
56 mkdir -p $(STAGING_DIR)/usr/include
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/zconf.h \
58 $(PKG_INSTALL_DIR)/usr/include/zlib.h \
59 $(STAGING_DIR)/usr/include/
60 mkdir -p $(STAGING_DIR)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.a \
62 $(PKG_INSTALL_DIR)/usr/lib/libz.so* \
63 $(STAGING_DIR)/usr/lib/
64 endef
65
66 define Build/UninstallDev
67 rm -rf $(STAGING_DIR)/usr/include/zconf.h \
68 $(STAGING_DIR)/usr/include/zlib.h \
69 $(STAGING_DIR)/usr/lib/libz.a \
70 $(STAGING_DIR)/usr/lib/libz.so*
71 endef
72
73 $(eval $(call BuildPackage,zlib))
This page took 0.045619 seconds and 5 git commands to generate.