summaryrefslogtreecommitdiff
path: root/extra/transfig/PKGBUILD
blob: bd73bf55b88c4aeaeb2692996f8806858d24945a (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
# $Id: PKGBUILD 194011 2013-09-09 18:48:23Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=transfig
pkgver=3.2.5e
pkgrel=1
pkgdesc="Format conversion utility that can be used with xfig"
arch=('i686' 'x86_64')
url="http://www.xfig.org"
license=('custom')
depends=('libpng' 'libxpm' 'bc')
makedepends=('imake')
source=(http://downloads.sourceforge.net/mcj/${pkgname}.${pkgver}.tar.gz LICENSE)
sha1sums=('27aa9691bf84f8775db9be39c453a8132148bad1'
          'b8b712871615308b8b6add92f86d218437d652f2')

prepare() {
  cd ${pkgname}.${pkgver}
  sed -i 's/XCOMM USELATEX2E/USELATEX2E/' transfig/Imakefile
  sed -i 's/XCOMM USEINLINE/USEINLINE/' fig2dev/Imakefile
}

build() {
  cd ${pkgname}.${pkgver}
  xmkmf
  make FIG2DEV_LIBDIR=/usr/share/fig2dev Makefiles
  make FIG2DEV_LIBDIR=/usr/share/fig2dev XFIGLIBDIR=/usr/share/xfig
}

package() {
  cd ${pkgname}.${pkgver}
  make DESTDIR="${pkgdir}" XFIGLIBDIR=/usr/share/xfig \
    FIG2DEV_LIBDIR=/usr/share/fig2dev MANPATH=/usr/share/man \
    install install.man
  mv "${pkgdir}/usr/bin/fig2ps2tex.sh" "${pkgdir}/usr/bin/fig2ps2tex"
  install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}