summaryrefslogtreecommitdiff
path: root/community/ted/PKGBUILD
blob: 3b3b2b57c542b783983f7aeb540307ce3a6339fb (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
# $Id: PKGBUILD 69512 2012-04-17 16:00:05Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=ted
pkgver=2.22
pkgrel=1
pkgdesc="An easy rich text processor (with footnote support)"
arch=('i686' 'x86_64')
url="http://www.nllgg.nl/Ted/"
depends=('bash' 'libtiff' 'libxmu' 'libxpm' 'libpng' 'gtk2')
license=('GPL')
source=(ftp://ftp.nluug.nl/pub/editors/$pkgname/$pkgname-$pkgver.src.tar.gz
        ted-2.21-libpng15.patch)
md5sums=('08162c9164dfdde1d46e41ae64df16be'
         '0c339b0fa7aec6b150e07e9027cd360c')

build() {
  cd "$srcdir/Ted-$pkgver"
  sed -i "s|--with-GTK|--with-GTK --prefix=/usr/share|g" Makefile
  make compile.shared
  make package.shared
}

package() {
  # unpack package
  mkdir -p $pkgdir/usr/share
  cd "$pkgdir/usr/share"
  tar xzf $srcdir/Ted-$pkgver/tedPackage/*.tar.gz
  # move bin/* and share/*
  mv bin ../
  mv share/* ./
  rmdir share
  # move man pages
  cd "$pkgdir/usr/share/Ted/"
  mkdir -p "$pkgdir/usr/share/man/man1"
  mv Ted.1 rtf2pdf.1 rtf2ps.1 ../../share/man/man1/
  # fix shell script and move them to /usr/bin
  sed -i "s|usr/local/afm|usr/share/Ted/afm|g" gsafm.sh
  mv *.sh "$pkgdir/usr/bin/"
}