Port palantir to -ng
[openwrt/svn-archive/archive.git] / libs / lzo / 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:=lzo
12 PKG_VERSION:=1.08
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
18 PKG_MD5SUM:=ab94d3da364c7cbd5b78d76f1875b0f6
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/liblzo
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=A real-time data compression library
29 DESCRIPTION:=A real-time data compression library.
30 URL:=http://www.oberhumer.com/opensource/lzo/
31 endef
32
33 define Build/Configure
34 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
35 $(TARGET_CONFIGURE_OPTS) \
36 CFLAGS="$(strip $(TARGET_CFLAGS))" \
37 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
38 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
39 ./configure \
40 --target=$(GNU_TARGET_NAME) \
41 --host=$(GNU_TARGET_NAME) \
42 --build=$(GNU_HOST_NAME) \
43 --program-prefix="" \
44 --program-suffix="" \
45 --prefix=/usr \
46 --exec-prefix=/usr \
47 --bindir=/usr/bin \
48 --datadir=/usr/share \
49 --includedir=/usr/include \
50 --infodir=/usr/share/info \
51 --libdir=/usr/lib \
52 --libexecdir=/usr/lib \
53 --localstatedir=/var \
54 --mandir=/usr/share/man \
55 --sbindir=/usr/sbin \
56 --sysconfdir=/etc \
57 $(DISABLE_LARGEFILE) \
58 $(DISABLE_NLS) \
59 --enable-shared \
60 --enable-static \
61 );
62 endef
63
64 define Build/Compile
65 rm -rf $(PKG_INSTALL_DIR)
66 mkdir -p $(PKG_INSTALL_DIR)
67 $(MAKE) -C $(PKG_BUILD_DIR) \
68 CFLAGS_O="$(TARGET_CFLAGS)" \
69 DESTDIR="$(PKG_INSTALL_DIR)" \
70 all install
71 endef
72
73 define Package/liblzo/install
74 install -d -m0755 $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo.so.* $(1)/usr/lib
76 endef
77
78 define Build/InstallDev
79 mkdir -p $(STAGING_DIR)/usr/include
80 $(CP) $(PKG_INSTALL_DIR)/usr/include/lzo*.h $(STAGING_DIR)/usr/include/
81 mkdir -p $(STAGING_DIR)/usr/lib
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo.{a,so*} $(STAGING_DIR)/usr/lib/
83 endef
84
85 define Build/UninstallDev
86 rm -rf \
87 $(STAGING_DIR)/usr/include/lzo*.h \
88 $(STAGING_DIR)/usr/lib/liblzo.{a,so*}
89 endef
90
91 $(eval $(call BuildPackage,liblzo))