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