Port palantir to -ng
[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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://us.speex.org/download
18 PKG_MD5SUM:=734892c8ca5e7e835828048a1289a0cc
19 PKG_CAT:=zcat
20
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:=Open source patent-free speech compression codec library.\\\
30 Speex is an Open Source/Free Software patent-free audio compression \\\
31 format designed for speech. The Speex Project aims to lower the \\\
32 barrier of entry for voice applications by providing a free \\\
33 alternative to expensive proprietary speech codecs. Moreover, Speex \\\
34 is well-adapted to Internet applications and provides useful features \\\
35 that are not present in most other codecs.\\\
36 \\\
37 This package contains the shared codec library, needed by other programs.
38 URL:=http://www.speex.org/
39 endef
40
41 define Build/Configure
42 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
43 $(TARGET_CONFIGURE_OPTS) \
44 CFLAGS="$(strip $(TARGET_CFLAGS))" \
45 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
46 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
47 ./configure \
48 --target=$(GNU_TARGET_NAME) \
49 --host=$(GNU_TARGET_NAME) \
50 --build=$(GNU_HOST_NAME) \
51 --program-prefix="" \
52 --program-suffix="" \
53 --prefix=/usr \
54 --exec-prefix=/usr \
55 --bindir=/usr/bin \
56 --datadir=/usr/share \
57 --includedir=/usr/include \
58 --infodir=/usr/share/info \
59 --libdir=/usr/lib \
60 --libexecdir=/usr/lib \
61 --localstatedir=/var \
62 --mandir=/usr/share/man \
63 --sbindir=/usr/sbin \
64 --sysconfdir=/etc \
65 $(DISABLE_LARGEFILE) \
66 $(DISABLE_NLS) \
67 --enable-shared \
68 --enable-static \
69 --disable-rpath \
70 --with-gnu-ld \
71 --disable-oggtest \
72 );
73 endef
74
75 define Build/Compile
76 rm -rf $(PKG_INSTALL_DIR)
77 mkdir -p $(PKG_INSTALL_DIR)
78 $(MAKE) -C $(PKG_BUILD_DIR) \
79 DESTDIR="$(PKG_INSTALL_DIR)" \
80 bin_PROGRAMS="" \
81 all install
82 endef
83
84 define Package/libspeex/install
85 install -d -m0755 $(1)/usr/lib
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.so.* $(1)/usr/lib/
87 endef
88
89 define Build/InstallDev
90 mkdir -p $(STAGING_DIR)/usr/include
91 $(CP) $(PKG_INSTALL_DIR)/usr/include/speex $(STAGING_DIR)/usr/include/
92 mkdir -p $(STAGING_DIR)/usr/lib
93 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.{a,so*} $(STAGING_DIR)/usr/lib/
94 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
95 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speex.pc $(STAGING_DIR)/usr/lib/pkgconfig/
96 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
97 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
98 endef
99
100 define Build/UninstallDev
101 rm -rf \
102 $(STAGING_DIR)/usr/include/speex \
103 $(STAGING_DIR)/usr/lib/libspeex.{a,so*} \
104 $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
105 endef
106
107 $(eval $(call BuildPackage,libspeex))