summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f9f9ca37d4620a7b61af6cc5dbc6619f42480b12 (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
# Maintainer: Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>
# Contributor: Star Brilliant <echo bTEzMjUzQGhvdG1haWwuY29tCg== | base64 -d>
# Contributor: Vladimir Turba <turbavladimir@yandex.ru>
# Contributor: Denis Kasak <dkasak|AT|termina.org.uk>

pkgname=translate-shell
pkgver=0.9.6.5
pkgrel=1
pkgdesc="Google Translate to serve as a command-line tool."
arch=('any')
url="http://www.soimort.org/$pkgname"
license=('Public Domain')
depends=('gawk>=4.0')
makedepends=('git')
optdepends=(
    'zsh: for interpreting the wrapper script'
    'fribidi: for displaying right-to-left (RTL) languages'
    'mplayer: for the Text-to-Speech functionality'
    'mpv: for the Text-to-Speech functionality'
    'mpg123: for the Text-to-Speech functionality'
    'espeak: for the Text-to-Speech functionality'
    'rlwrap: needed for readline-style editing and history in the interactive mode'
    'emacs: for using the Emacs interface (with the -E flag)'
)
install=$pkgname.install
source=("https://github.com/soimort/$pkgname/archive/v$pkgver.tar.gz")

md5sums=('c5b85f830d199a5e4791e604a727664c')

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

package() {
  cd "$srcdir/$pkgname-$pkgver"

  install -dm755 "$pkgdir/usr/bin/"
  install -dm755 "$pkgdir/usr/share/man/man1"

  make "PREFIX=$pkgdir/usr" install

  # translate-shell
  ln -s "/usr/bin/trans" "$pkgdir/usr/bin/$pkgname"
  ln -s "/usr/share/man/man1/trans.1.gz" "$pkgdir/usr/share/man/man1/$pkgname.1.gz"

  # license
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}