f75507aeb15a52b4afb97c0040db8b09406f0efb
[packages.git] / libs / speex / Makefile
1
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=speex
11 PKG_VERSION:=1.2beta3.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/speex/
16 PKG_MD5SUM:=b47396952c5fdd54b6468316c3bd339f
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libspeex
21   SECTION:=libs
22   CATEGORY:=Libraries
23   TITLE:=Open source speech compression codec library
24   URL:=http://www.speex.org/
25 endef
26
27 define Package/libspeexdsp
28   SECTION:=libs
29   CATEGORY:=Libraries
30   TITLE:=Open source speech compression codec library output to DSP
31   URL:=http://www.speex.org/
32 endef
33
34 define Package/libspeex/description
35         Open source patent-free speech compression codec library.
36         Speex is an Open Source/Free Software patent-free audio compression 
37         format designed for speech. The Speex Project aims to lower the 
38         barrier of entry for voice applications by providing a free 
39         alternative to expensive proprietary speech codecs. Moreover, Speex 
40         is well-adapted to Internet applications and provides useful features 
41         that are not present in most other codecs.
42
43         This package contains the shared codec library, needed by other programs.
44 endef
45
46 TARGET_CFLAGS += $(FPIC)
47
48 define Package/libspeexdsp/description
49         Open source patent-free speech compression codec library.
50         Speex is an Open Source/Free Software patent-free audio compression 
51         format designed for speech. The Speex Project aims to lower the 
52         barrier of entry for voice applications by providing a free 
53         alternative to expensive proprietary speech codecs. Moreover, Speex 
54         is well-adapted to Internet applications and provides useful features 
55         that are not present in most other codecs.
56
57         This package contains the shared dsp library, needed by other programs.
58 endef
59
60 define Build/Configure
61         $(call Build/Configure/Default, \
62                 --enable-shared \
63                 --enable-static \
64                 --enable-fixed-point \
65                 --disable-oggtest \
66                 --disable-float-api \
67                 --disable-vbr, \
68                 OGG_CFLAGS="" \
69         )
70 endef
71
72 define Build/Compile
73         $(MAKE) -C $(PKG_BUILD_DIR) \
74                 DESTDIR="$(PKG_INSTALL_DIR)" \
75                 bin_PROGRAMS="" \
76                 all install
77 endef
78
79 define Build/InstallDev
80         $(INSTALL_DIR) $(1)/usr/include
81         $(CP) $(PKG_INSTALL_DIR)/usr/include/speex $(1)/usr/include/
82         $(INSTALL_DIR) $(1)/usr/lib
83         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.{a,so*} $(1)/usr/lib/
84         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeexdsp.{a,so*} $(1)/usr/lib/
85         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
86         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speex.pc $(1)/usr/lib/pkgconfig/
87         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speexdsp.pc $(1)/usr/lib/pkgconfig/
88 endef
89
90 define Package/libspeex/install
91         $(INSTALL_DIR) $(1)/usr/lib
92         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.so.* $(1)/usr/lib/
93 endef
94
95 define Package/libspeexdsp/install
96         $(INSTALL_DIR) $(1)/usr/lib
97         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeexdsp.so.* $(1)/usr/lib/
98 endef
99
100 $(eval $(call BuildPackage,libspeex))
101 $(eval $(call BuildPackage,libspeexdsp))
102