summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dc8c88308234b1ba879154ed236d80dfc64cb2f0 (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
# Contributor: Baptiste Jonglez <baptiste--aur at jonglez dot org>
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=perl-latexml-git
_realname=LaTeXML
pkgver=0.8.7
pkgrel=1
pkgdesc="LaTeX to XML converter"
arch=('any')
license=('custom')
url="http://dlmf.nist.gov/LaTeXML/"
depends=('perl-pod-parser' 'perl-parse-recdescent' 'perl-text-unidecode'
    'imagemagick' 'perl-xml-libxml' 
    'perl-xml-libxslt' 'db' 'texlive-core'
    'perl-image-size' 'perl-file-which'
    'perl-libwww' 'perl-io-string' 'perl-archive-zip')
options=('!emptydirs')
provides=('perl-latexml')
conflicts=('perl-latexml')
source=("git+https://github.com/brucemiller/LaTeXML.git")
sha512sums=('SKIP')

pkgver() {
  cd ${_realname}
  printf "%s" $(git describe --tags | cut -c2- | sed 's+-+.r+' | tr - .) 
}

build() {
  cd ${_realname}

  # install module in vendor directories.
  perl Makefile.PL INSTALLDIRS=vendor \
       INSTALLVENDORBIN=/usr/bin \
       INSTALLVENDORSCRIPT=/usr/bin \
       TEXMF=/usr/share/texmf
  make
}

package() {
  cd ${_realname}
  make install DESTDIR="$pkgdir"

  # remove perllocal.pod and .packlist
  find "$pkgdir" -name perllocal.pod -delete
  find "$pkgdir" -name .packlist -delete
  # add liense file
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
  # add manual
  install -Dm644 manual.pdf "$pkgdir"/usr/share/$pkgname/doc/manual.pdf
}