summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 874436d5334ee16b4d0eb1b93985d5fb5d2f6f56 (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
# Maintainer:  Vitalii Kuzhdin <vitaliikuzhdin@gmail.com>

_name="itex2mml"
_pkgname="perl-${_name}"
pkgname="${_pkgname}-bzr"
pkgver=r85
pkgrel=1
pkgdesc="Perl bindings for ${_name}"
arch=('x86_64')
url="https://golem.ph.utexas.edu/~distler/blog/itex2MML.html"
license=('custom:GPL-unknown-version' 'custom:LGPL-unknown-version' 'custom:MPL-unknown-version'
         'Artistic-1.0-Perl')
makedepends=('bzr')
depends=('glibc' 'perl')
provides=("${_pkgname}=${pkgver%%.r*}")
conflicts=("${_pkgname}")
options=('!emptydirs' 'purge')
_pkgsrc="${_name}"
source=("${_pkgsrc}::bzr+https://golem.ph.utexas.edu/~distler/code/itexToMML")
sha256sums=('SKIP')

pkgver() {
  cd "${_pkgsrc}"
  printf "r%s" "$(bzr revno)"
}

build() {
  cd "${srcdir}/${_pkgsrc}/itex-src/perl"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  /usr/bin/perl Makefile.PL
  make
}

check() {
  cd "${srcdir}/${_pkgsrc}/itex-src/perl"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1
  make test
}

package() {
  cd "${srcdir}/${_pkgsrc}/itex-src/perl"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  make install INSTALLDIRS=vendor DESTDIR="${pkgdir}"

  install -Dm644 "README"  "${pkgdir}/usr/share/doc/${_pkgname}/README"
  install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}