summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 89ca00e1d5042f251c739d6b79988d2a7fcc4b40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Contributor: der_FeniX <derfenix@gmail.com>

pkgname=flite-fpic
_pkgname=flite
pkgver=2.0.0
_pkgver=2.0
pkgrel=1
pkgdesc="A lighweight version of festival speech synthesis compiled with -fPIC"
arch=('i686' 'x86_64')
url="http://www.speech.cs.cmu.edu/flite/"
license=('custom')
depends=('glibc' 'alsa-lib')
provides=('flite' 'flite-fpic')
replaces=('flite')
options=('!makeflags')
source=(http://www.festvox.org/flite/packed/${_pkgname}-${_pkgver}/${_pkgname}-${pkgver}-release.tar.bz2
        https://launchpad.net/ubuntu/+archive/primary/+files/${_pkgname}_${pkgver}-release-4.debian.tar.xz
	${pkgname}.patch)
sha256sums=('678c3860fd539402b5d1699b921239072af6acb4e72dc4720494112807cae411'
            'b4f4656f9bf397bb86d78721d87259629e53f3c0dd0fec10dd08b7750d0ffc3e'
            'adae4cba9c0af88ee1570bb3800ab8b826b9f6c60640ffce92b41871d54763e2')

prepare() {
  cd "${srcdir}/${_pkgname}-${pkgver}-release"

  patches=(CVE-2014-0027_unsafe_temporary_file.patch
  exactly.patch
  flite.texi.patch
  no_rpath.patch
 shlib_deps.patch
 texi2html_to_texi2any_migration.patch
  ) 
  patch -Np1 -i ../${pkgname}.patch
   for patch in "${patches[@]}"; do
    patch -Np1 -i ../debian/patches/${patch}
  done

}

build() {
  cd "${srcdir}/${_pkgname}-${pkgver}-release"
  CFLAGS="-fPIC -O3" ./configure --prefix=/usr

  #we want the 16k, not 8k voice
  sed -i 's/cmu_us_kal/cmu_us_kal16/' config/config

  #no parallel builds
  export MAKEFLAGS="-j1"
  make -j1
}

package() {
  cd "${srcdir}/${_pkgname}-${pkgver}-release"
  make prefix="${pkgdir}/usr" install
  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}