InstallDev should be using (1) and not (STAGING_DIR)
[openwrt/svn-archive/archive.git] / libs / speex / 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:=speex
12 PKG_VERSION:=1.2beta1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/speex/
17 PKG_MD5SUM:=aac2e4ba42122b885c787ea280acb3d9
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22 PKG_BUILD_DEPENDS:=libnotimpl
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libspeex
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=Open source speech compression codec library
30 DESCRIPTION:=\
31 Open source patent-free speech compression codec library.\\\
32 Speex is an Open Source/Free Software patent-free audio compression \\\
33 format designed for speech. The Speex Project aims to lower the \\\
34 barrier of entry for voice applications by providing a free \\\
35 alternative to expensive proprietary speech codecs. Moreover, Speex \\\
36 is well-adapted to Internet applications and provides useful features \\\
37 that are not present in most other codecs.\\\
38 \\\
39 This package contains the shared codec library, needed by other programs.
40 URL:=http://www.speex.org/
41 endef
42
43 TARGET_LDFLAGS:=$(TARGET_LDFLAGS) -lnotimpl
44
45 define Build/Configure
46 $(call Build/Configure/Default, \
47 --enable-shared \
48 --enable-static \
49 --enable-fixed-point \
50 --disable-oggtest \
51 )
52 endef
53
54 define Build/Compile
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 DESTDIR="$(PKG_INSTALL_DIR)" \
57 bin_PROGRAMS="" \
58 all install
59 endef
60
61 define Build/InstallDev
62 mkdir -p $(1)/usr/include
63 $(CP) $(PKG_INSTALL_DIR)/usr/include/speex $(1)/usr/include/
64 mkdir -p $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.{a,so*} $(1)/usr/lib/
66 mkdir -p $(1)/usr/lib/pkgconfig
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speex.pc $(1)/usr/lib/pkgconfig/
68 endef
69
70 define Build/UninstallDev
71 rm -rf \
72 $(STAGING_DIR)/usr/include/speex \
73 $(STAGING_DIR)/usr/lib/libspeex.{a,so*} \
74 $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
75 endef
76
77 define Package/libspeex/install
78 $(INSTALL_DIR) $(1)/usr/lib
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.so.* $(1)/usr/lib/
80 endef
81
82 $(eval $(call BuildPackage,libspeex))