6eaf6f6910b0711026555471fbf3759ac3f2395d
[openwrt.git] / openwrt / package / lzo / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := lzo
6 PKG_VERSION := 1.08
7 PKG_RELEASE := 1
8 PKG_MD5SUM := ab94d3da364c7cbd5b78d76f1875b0f6
9
10 PKG_SOURCE_SITE := http://www.oberhumer.com/opensource/lzo/download/
11 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_SOURCE_CAT := zcat
13 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
14 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
15 PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
16
17 $(DL_DIR)/$(PKG_SOURCE_FILE):
18 mkdir -p $(DL_DIR)
19 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
20
21 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
22 mkdir -p $(TOOL_BUILD_DIR)
23 $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
24 $(PATCH) $(PKG_BUILD_DIR) . ./patches
25 touch $(PKG_BUILD_DIR)/.patched
26
27 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
28 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
29 $(TARGET_CONFIGURE_OPTS) \
30 ./configure \
31 --target=$(GNU_TARGET_NAME) \
32 --host=$(GNU_TARGET_NAME) \
33 --build=$(GNU_HOST_NAME) \
34 --prefix=/ \
35 --exec-prefix=/ \
36 --bindir=/bin \
37 --sbindir=/sbin \
38 --libexecdir=/lib \
39 --sysconfdir=/etc \
40 --localstatedir=/var \
41 --enable-shared \
42 );
43 touch $(PKG_BUILD_DIR)/.configured
44
45 $(PKG_BUILD_DIR)/src/liblzo.la: $(PKG_BUILD_DIR)/.configured
46 $(MAKE) -C $(PKG_BUILD_DIR)
47
48 $(STAGING_DIR)/lib/liblzo.a: $(PKG_BUILD_DIR)/src/liblzo.la
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 CC=$(TARGET_CC) \
51 DESTDIR="$(STAGING_DIR)" \
52 install
53
54 $(PKG_IPK): $(STAGING_DIR)/lib/liblzo.a
55 mkdir -p $(PACKAGE_DIR)
56 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/lzo lzo.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
57 mkdir -p $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib
58 cp -a $(STAGING_DIR)/lib/liblzo.so* $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib
59 $(STRIP) $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib/*
60 $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/lzo $(PACKAGE_DIR)
61
62 $(IPKG_STATE_DIR)/info/lzo.list: $(PKG_IPK)
63 $(IPKG) install $(PKG_IPK)
64
65 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
66 prepare: $(PKG_BUILD_DIR)/.patched
67 compile: $(STAGING_DIR)/lib/liblzo.a $(PKG_IPK)
68 install: $(IPKG_STATE_DIR)/info/lzo.list
69
70 clean:
71 rm -rf $(PKG_BUILD_DIR)
72 rm -f $(STAGING_DIR)/lib/liblzo*
73 rm -f $(PACKAGE_DIR)/lzo\*.ipk
This page took 0.038259 seconds and 3 git commands to generate.