lzo: use default Build/Configure rule
[openwrt/openwrt.git] / package / libs / lzo / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=lzo
11 PKG_VERSION:=2.10
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
16 PKG_HASH:=c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072
17
18 PKG_FIXUP:=autoreconf
19 PKG_INSTALL:=1
20 PKG_LICENSE:=GPL-2.0+
21
22 PKG_BUILD_PARALLEL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/liblzo
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=A real-time data compression library
30 URL:=http://www.oberhumer.com/opensource/lzo/
31 endef
32
33 define Package/liblzo/description
34 LZO is a data compression library which is suitable for data de-/compression
35 in real-time. This means it favours speed over compression ratio.
36 endef
37
38 CONFIGURE_ARGS += \
39 --enable-shared \
40 --enable-static \
41
42 TARGET_CFLAGS += $(FPIC)
43 MAKE_FLAGS += CFLAGS_O="$(TARGET_CFLAGS)"
44
45 ifeq ($(CONFIG_i386)$(CONFIG_x86_64),)
46 TARGET_CFLAGS += -DLZO_CFG_NO_UNALIGNED=1
47 endif
48
49 define Build/InstallDev
50 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/lzo $(1)/usr/include/
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.{a,so*} $(1)/usr/lib/
53 endef
54
55 define Package/liblzo/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.so* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,liblzo))