summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 099a8635375ff0565f4e1333106deccee4867eaf (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
# Maintainer: erik-pro <aarnaarn2@gmail.com>
# Contributor: Steve Holmes <steve.holmes88@gmail.com>
# Contributor: Chris Brannon <cmbrannon79@gmail.com>
pkgname=emacspeak
pkgver=49.0
pkgrel=0
pkgdesc="Emacs extension that provides spoken output"
arch=('x86_64')
url="http://emacspeak.sf.net/"
license=('GPL' 'LGPL' 'APACHE')
depends=(emacs
	 'tcl>=8.6'
	 'tclx'
	 'lesstif'
	 'espeak')
optdepends=('python: Google client, and wrapper for Emacspeak speech servers.')
install='emacspeak.install'
source=("https://github.com/tvraman/emacspeak/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.bz2")
md5sums=('24a73d020c434e539ac88ea2041898b6')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  sed -i -e 's|/etc/info-dir|$(DESTDIR)/etc/info-dir|g' info/Makefile
}

build() {
  cd "$srcdir/$pkgname-$pkgver"
  make config
  make
  # This one isn't compiled by default, but a lot of folks use it.
  make espeak
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  install -dm755 "$pkgdir/etc"
  make DESTDIR="$pkgdir" install
  cd servers/linux-espeak
  make DESTDIR="$pkgdir" install
  # Interestingly, the source files are installed under DESTDIR.
  cd "$pkgdir/usr/share/emacs/site-lisp/emacspeak/servers/linux-espeak"
  rm -f tclespeak.cpp Makefile
  # A handful of files have permissions of 750 and 640; fix.
  cd "$pkgdir"
  find . -perm 640 -print0
  find . -perm 750 -print0
  rm -f "$pkgdir/usr/share/info/dir"
  rm -f "$pkgdir/etc/info-dir"
}