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