2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://us.speex.org/download
17 PKG_MD5SUM:=734892c8ca5e7e835828048a1289a0cc
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23 include $(INCLUDE_DIR)/package.mk
25 define Package/libspeex
28 TITLE:=Open source speech compression codec library
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.\\\
38 This package contains the shared codec library, needed by other programs.
39 URL:=http://www.speex.org/
42 define Build/Configure
43 $(call Build/Configure/Default, \
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 DESTDIR="$(PKG_INSTALL_DIR)" \
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
68 define Build/UninstallDev
70 $(STAGING_DIR)/usr/include/speex \
71 $(STAGING_DIR)/usr/lib/libspeex.{a,so*} \
72 $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
75 define Package/libspeex/install
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.so.* $(1)/usr/lib/
80 $(eval $(call BuildPackage,libspeex))