summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 83ded4d78bf19d66509cc7a7b410cef8dcb51494 (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
# Maintainer: Alexander Epaneshnikov <aarnaarn2@gmail.com>
# Contributor: Steve Holmes <steve.holmes88@gmail.com>
# Contributor: Chris Brannon <cmbrannon79@gmail.com>

pkgname=emacspeak
pkgver=54.0
pkgrel=1
pkgdesc="Emacs extension that provides spoken output"
arch=('x86_64' 'aarch64')
url="http://emacspeak.sf.net/"
license=('GPL' 'LGPL' 'APACHE')
depends=('emacs' 'tcl' 'tclx' 'espeak-ng')
source=("https://github.com/tvraman/emacspeak/releases/download/${pkgver}/emacspeak-${pkgver}.tar.bz2")
sha512sums=('088b8d08258202e5cc12ad1e2a56eabe27e626157201f4b665da78f7f4f03ea858746131d5c27a261049283a35eeb0fd5bb47aa054acac8a9b65a32da39a2f35')

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

build() {
  cd "$srcdir/$pkgname-$pkgver"
  export DTK_PROGRAM="espeak"
  make config
  make
  # Espeak isn't compiled by default, but lots of folks use it.
  make espeak
}

package() {
  local d=$pkgdir/usr/share/emacs/site-lisp/emacspeak
  install -d -- "$d"
  cp -a "$srcdir/$pkgname-$pkgver/."  "$d"
  find "$d" \( -type d -or \( -type f -executable \) \) -execdir chmod 755 {} +
  find "$d" -type f -not -executable -execdir chmod 644 {} +

  # Add convenient wrapper to keep your configs unmodified
  local s=$pkgdir/usr/bin/emacspeak
  install -d -- "${s%/*}"
  printf '#!/bin/sh\nemacs -l '"'%s'"' "$@"\n' "${d#$pkgdir}/lisp/emacspeak-setup.elc" >"$s"
  chmod 755 "$s"
}