ed877327449b7428399db00dfd07ae1c9dd1bdd7
[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:=2.02
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
17 PKG_MD5SUM:=6760e5819f4238328709bf93bf10071c
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/liblzo
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=A real-time data compression library
28 URL:=http://www.oberhumer.com/opensource/lzo/
29 endef
30
31 define Build/Configure
32 $(call Build/Configure/Default, \
33 --enable-shared \
34 --enable-static \
35 )
36 endef
37
38 define Build/Compile
39 $(MAKE) -C $(PKG_BUILD_DIR) \
40 CFLAGS_O="$(TARGET_CFLAGS)" \
41 DESTDIR="$(PKG_INSTALL_DIR)" \
42 all install
43 endef
44
45 define Build/InstallDev
46 mkdir -p $(1)/usr/include
47 $(CP) $(PKG_INSTALL_DIR)/usr/include/lzo $(1)/usr/include/
48 mkdir -p $(1)/usr/lib
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.{a,so*} $(1)/usr/lib/
50 endef
51
52 define Package/liblzo/install
53 $(INSTALL_DIR) $(1)/usr/lib
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.so.* $(1)/usr/lib/
55 endef
56
57 $(eval $(call BuildPackage,liblzo))