fix displayed name in init script help text
[openwrt.git] / package / zlib / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=zlib
12 PKG_VERSION:=1.2.3
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.zlib.net @SF/zlib
17 PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/zlib
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Library implementing the deflate compression method
29 URL:=http://www.zlib.net/
30 endef
31
32 define Build/Configure
33 (cd $(PKG_BUILD_DIR); \
34 $(TARGET_CONFIGURE_OPTS) \
35 LDSHARED="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \
36 CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
37 ./configure \
38 --prefix=/usr \
39 --shared \
40 );
41 endef
42
43 define Build/Compile
44 $(MAKE) -C $(PKG_BUILD_DIR) \
45 $(TARGET_CONFIGURE_OPTS) \
46 CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
47 libz.a libz.so
48 mkdir -p $(PKG_INSTALL_DIR)
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 DESTDIR="$(PKG_INSTALL_DIR)" \
51 install
52 endef
53
54 define Build/InstallDev
55 mkdir -p $(STAGING_DIR)/usr/include
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \
57 $(STAGING_DIR)/usr/include/
58 mkdir -p $(STAGING_DIR)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \
60 $(STAGING_DIR)/usr/lib/
61 endef
62
63 define Build/UninstallDev
64 rm -rf $(STAGING_DIR)/usr/include/z{conf,lib}.h \
65 $(STAGING_DIR)/usr/lib/libz.{a,so*}
66 endef
67
68 define Package/zlib/install
69 install -d -m0755 $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
71 endef
72
73 $(eval $(call BuildPackage,zlib))
This page took 0.050964 seconds and 5 git commands to generate.