Convert wireless-tools to new packaging style
[openwrt.git] / openwrt / package / speex / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := speex
6 PKG_VERSION := 1.1.7
7 PKG_RELEASE := 1
8 PKG_MD5SUM := a900d009f937efbb896f1f816193742f
9
10 PKG_SOURCE_SITE := http://us.speex.org/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)/.unpacked: $(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 touch $(PKG_BUILD_DIR)/.unpacked
25
26 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
27 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
28 $(TARGET_CONFIGURE_OPTS) \
29 ./configure \
30 --target=$(GNU_TARGET_NAME) \
31 --host=$(GNU_TARGET_NAME) \
32 --build=$(GNU_HOST_NAME) \
33 --prefix=/ \
34 --exec-prefix=/ \
35 --bindir=/bin \
36 --sbindir=/sbin \
37 --libexecdir=/lib \
38 --sysconfdir=/etc \
39 --localstatedir=/var \
40 --enable-shared \
41 --disable-oggtest \
42 );
43 touch $(PKG_BUILD_DIR)/.configured
44
45 $(PKG_BUILD_DIR)/libspeex/libspeex.la: $(PKG_BUILD_DIR)/.configured
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 bin_PROGRAMS=""
48
49 $(STAGING_DIR)/lib/libspeex.a: $(PKG_BUILD_DIR)/libspeex/libspeex.la
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 CC=$(TARGET_CC) \
52 DESTDIR="$(STAGING_DIR)" \
53 bin_PROGRAMS="" \
54 install
55
56 $(PKG_IPK): $(STAGING_DIR)/lib/libspeex.a
57 mkdir -p $(PACKAGE_DIR)
58 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/speex speex.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
59 mkdir -p $(PKG_BUILD_DIR)/ipkg/speex/usr/lib
60 cp -a $(STAGING_DIR)/lib/libspeex.so.* $(PKG_BUILD_DIR)/ipkg/speex/usr/lib
61 $(STRIP) $(PKG_BUILD_DIR)/ipkg/speex/usr/lib/*
62 $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/speex $(PACKAGE_DIR)
63
64 $(IPKG_STATE_DIR)/info/speex.list: $(PKG_IPK)
65 $(IPKG) install $(PKG_IPK)
66
67 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
68 prepare: $(PKG_BUILD_DIR)/.unpacked
69 compile: $(STAGING_DIR)/lib/libspeex.a $(PKG_IPK)
70 install: $(IPKG_STATE_DIR)/info/speex.list
71
72 clean:
73 rm -rf $(PKG_BUILD_DIR)
74 rm -f $(STAGING_DIR)/lib/libspeex*
75 rm -f $(PACKAGE_DIR)/speex\*.ipk
This page took 0.042732 seconds and 5 git commands to generate.