summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-xml-dom/PKGBUILD
blob: 767a9c07aa369b3dab1bcc4c7295c8faf75426a8 (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
# Maintainer: Brian Bidulock <bidulock@openss7.org>
# Contributor: kfgz <kfgz at interia pl>
# Contributor: François Charette <firmicus at gmx dot net>

pkgname=perl-xml-dom
pkgver=1.44
pkgrel=9
pkgdesc="Implements Level 1 of W3's DOM"
arch=('i686' 'x86_64')
url="http://search.cpan.org/dist/XML-DOM"
license=('GPL' 'PerlArtistic')
#'perlxml>=2.30'
depends=('perl>=5.10.0' 'perl-xml-regexp' 'libxml-perl>=0.07' 'perl-libwww')
options=('!emptydirs')
source=(http://www.cpan.org/authors/id/T/TJ/TJMATHER/XML-DOM-${pkgver}.tar.gz) 
md5sums=('1ec2032a06e5762984f7a332c199c205')

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

_perl_depends() {
# 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;
}

package() {
  cd ${srcdir}/XML-DOM-${pkgver}
  make install DESTDIR=${pkgdir}
  find ${pkgdir} -name '.packlist' -delete
  find ${pkgdir} -name '*.pod' -delete
  _perl_depends
}