summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6cbec1d34cfdb390f1e6e39f6187714528a40c67 (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
# Contributor: Joel Schaerer <joel.schaerer@laposte.net>
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=textext-hg
pkgver=r328.0a13899d53f0
pkgrel=1
pkgdesc="An inkscape extension which lets you add LaTeX equations to your drawings"
arch=('any')
license=('custom:BSD')
url="https://bitbucket.org/pitgarbe/textext"
provides=('textext')
conflicts=('textext')
makedepends=('mercurial')
depends=('inkscape' 'python2' 'texlive-core')
optdepends=('pygtk' 'python2-lxml' 'pdf2svg' 'pstoedit' 'ghostscript' 'imagemagick')
source=("textext::hg+https://bitbucket.org/pitgarbe/textext")
md5sums=('SKIP')

prepare() {
  cd  textext/
  sed -i '1s|python\>|python2|' *.py
}

pkgver() {
  cd textext
  printf "r%s.%s" "$(hg identify -n|tr -d +)" "$(hg identify -i|tr -d +)"
}

package() {
  cd textext/
  install -d "$pkgdir"/usr/share/inkscape/extensions
  for _i in asktext.py default_packages.tex latexlogparser.py textext.{inx,py} typesetter.py win_app_paths.py
  do install ${_i} "$pkgdir"/usr/share/inkscape/extensions/$_i
  done
  install -d "$pkgdir"/usr/share/licenses/$pkgname
  install LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}