summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-xml-libxml/PKGBUILD
blob: ad82aab70a067d2dab712a6fbee4a7970e7109d9 (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
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Jonathan Steel <jsteel@aur.archlinux.org>
# Contributor: Justin "juster" Davis <jrcd83@gmail.com>
# Contributor: François Charette <francois.archlinux.org>

pkgname=perl-xml-libxml
pkgver=2.0132
pkgrel=1
pkgdesc="Interface to the libxml library"
arch=('x86_64')
url="http://search.cpan.org/dist/XML-LibXML"
license=('GPL')
depends=('libxml2' 'perl-xml-sax' 'perl-xml-namespacesupport')
checkdepends=('perl-test-pod' 'perl-test-leaktrace' 'perl-cpan-changes' 'perl-uri')
provides=('perl-libxml' 'perl-xml-libxml-common')
replaces=('perl-libxml' 'perl-xml-libxml-common')
options=('!emptydirs')
install=perl-xml-libxml.install
source=(http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-$pkgver.tar.gz)
sha512sums=('3df1cb67ea955133492f2b6f8def2b28079c59e99170a31820aca69ea81686c4b67171509f1b311faab9389d200c4a24942b3950d7c0730ff1233a009b398fce')

build() {
  cd "$srcdir"/XML-LibXML-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "$srcdir"/XML-LibXML-$pkgver
  make test
}

package() {
  cd "$srcdir"/XML-LibXML-$pkgver
  make pure_install doc_install DESTDIR="$pkgdir"/
# template start; name=perl-binary-module-dependency; version=1;
if [[ $(find "$pkgdir/usr/lib/perl5/" -name "*.so") ]]; then
	_perlver_min=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);')
	_perlver_max=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]+1);')
	depends+=("perl>=$_perlver_min" "perl<$_perlver_max")
fi
# template end;
}