Add sound support to flite (#1573)
[packages.git] / sound / flite / 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 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=flite
10 PKG_VERSION:=1.3-release
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=http://www.speech.cs.cmu.edu/flite/packed/flite-1.3/
15 PKG_MD5SUM:=ae0aca1cb7b4801f4372f3a75a9e52b5
16 PKG_CAT:=zcat
17  
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/flite
23   SECTION:=sound
24   CATEGORY:=Sound
25   TITLE:=Text-to-speech for embedded systems
26   DESCRIPTION:=Festival Lite is a stripped down version of Festival,\\\
27     the well-developed text-to-speech program written in C++.\\\
28     This program is written in C to keep memory usage low.
29   URL:=http://www.speech.cs.cmu.edu/flite/index.html
30 endef
31
32 define Build/Configure
33         $(call Build/Configure/Default, \
34                 --enable-shared \
35                 --with-audio="oss" \
36                 --with-vox="cmu_us_kal16" \
37                 --prefix="$(PKG_INSTALL_DIR)/usr" \
38                 --exec-prefix="$(PKG_INSTALL_DIR)/usr" \
39                 --bindir="$(PKG_INSTALL_DIR)/usr/bin" \
40         )
41 endef
42
43 define Build/Compile
44         rm -rf $(PKG_INSTALL_DIR)
45         mkdir -p $(PKG_INSTALL_DIR)
46         $(MAKE) -C $(PKG_BUILD_DIR) \
47                 DESTDIR="$(PKG_INSTALL_DIR)" \
48                 all install
49 endef
50
51 define Build/InstallDev
52         mkdir -p $(STAGING_DIR)/usr/include/flite
53         $(CP) $(PKG_INSTALL_DIR)/usr/include/flite/{cst,flite}*.h $(STAGING_DIR)/usr/include/flite/
54         mkdir -p $(STAGING_DIR)/usr/lib
55         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libflite*.so.* $(STAGING_DIR)/usr/lib/
56 endef
57         
58 define Build/UninstallDev
59         rm -rf  $(STAGING_DIR)/usr/include/flite/{cst,flite}*.h \
60                 $(STAGING_DIR)/usr/lib/libflite*.so.*
61 endef
62
63 define Package/flite/install
64         $(INSTALL_DIR) $(1)/usr/bin
65         $(CP) $(PKG_INSTALL_DIR)/usr/bin/flite $(1)/usr/bin/
66         $(INSTALL_DIR) $(1)/usr/lib
67         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libflite*.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,flite))