summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 04b8b08433350e736d559f9d132189176e2d92f4 (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
57
# Maintainer: Beej Jorgensen <beej@beej.us>
# Contributor: Beej Jorgensen <beej@beej.us>

pkgname=trn
pkgver=4.0test77
pkgrel=4
pkgdesc="Text-based threaded Usenet newsreader"
arch=('i686' 'x86_64')
url="http://trn.sourceforge.net/"
license=('custom')
depends=('heimdal-aur' 'ncurses')
makedepends=('patch' 'expect' 'bison')
optdepends=('aspell: spellcheck support'
  'sendmail: (or any outgoing mailer) outgoing email support')
source=('http://downloads.sourceforge.net/trn/trn-4.0-test77.tar.gz' 
        'trn-4.0-test77-aur.patch' 'configbot')
md5sums=('e0680ae4e6062747f88ba982326ac4c0'
         '227db01e410765accad9a51520c837a4'
         '852f1309e9681bc340682484bd2322dc')

prepare() {
  cd "$srcdir/trn-4.0-test77"

  # fixes in include order to allow builds, and a fix to allow aspell
  # to be used as the speller:
  patch -Np1 < ${srcdir}/trn-4.0-test77-aur.patch

  # the Configure script is very very interactive, so we
  # let expect handle it.  This expect script runs the
  # Configure script:
  expect -f $srcdir/configbot
}

build() {
  cd "$srcdir/trn-4.0-test77"

  # build it!
  make
}

package() {
  cd "$srcdir/trn-4.0-test77"

  # install, forcing the paths to what was set in Configure:
  make \
    rnbin=${pkgdir}/usr/bin \
    rnlib=${pkgdir}/usr/lib/trn \
    inewsbin=${pkgdir}/usr/bin \
    mansrc=${pkgdir}/usr/share/man/man1 \
    install

  # custom license install
  install -m644 -D LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}

# vim:set ts=2 sw=2 et: