add missing build dependency (#1705)
[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 $(STAGING_DIR)/usr/include
63 $(CP) $(PKG_INSTALL_DIR)/usr/include/speex $(STAGING_DIR)/usr/include/
64 mkdir -p $(STAGING_DIR)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.{a,so*} $(STAGING_DIR)/usr/lib/
66 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speex.pc $(STAGING_DIR)/usr/lib/pkgconfig/
68 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
69 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
70 endef
71
72 define Build/UninstallDev
73 rm -rf \
74 $(STAGING_DIR)/usr/include/speex \
75 $(STAGING_DIR)/usr/lib/libspeex.{a,so*} \
76 $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
77 endef
78
79 define Package/libspeex/install
80 $(INSTALL_DIR) $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.so.* $(1)/usr/lib/
82 endef
83
84 $(eval $(call BuildPackage,libspeex))