| 1 | # Contributor: Thomas Mudrunka <harvie@@email..cz> |
| 2 | # Maintainer: Thomas Mudrunka <harvie@@email..cz> |
| 3 | # You can also contact me on http://blog.harvie.cz/ |
| 4 | |
| 5 | pkgname=perl-tie-hash-dbd |
| 6 | pkgver=0.70.0 |
| 7 | pkgrel=1 |
| 8 | pkgdesc="Tie plain hashes to DBI interface" |
| 9 | arch=('i686' 'x86_64') |
| 10 | url="http://search.cpan.org/dist/Tie-Hash-DBD/" |
| 11 | license=('perl') |
| 12 | source=('http://search.cpan.org/CPAN/authors/id/H/HM/HMBRAND/Tie-Hash-DBD-0.07.tgz') |
| 13 | md5sums=('ba19e6ca95061eec7c9629f985f99bd3') |
| 14 | sha256sums=('c22564908cebbf11cb5a26949977e44ed69f490da7f91b9430b15b80b8acca3f') |
| 15 | #depends=('perl-carp' 'perl-dbi>=1.613.0' 'perl-storable' 'perl>=5.0.8') |
| 16 | depends=('perl-dbi>=1.613.0' 'perl>=5.0.8') |
| 17 | optdepends=('perl' 'perl-dbd-sqlite' 'perl-test-more') |
| 18 | provides=('perl-tie-array-dbd=0.70.0') |
| 19 | options=(!emptydirs) |
| 20 | |
| 21 | build() { |
| 22 | _dir=$(find $srcdir -maxdepth 2 -type f -name 'Makefile.PL') |
| 23 | if [ ! -z "$_dir" ]; then |
| 24 | cd $(dirname "$_dir") |
| 25 | PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 |
| 26 | make || return 1 |
| 27 | make install DESTDIR="${pkgdir}" || return 1 |
| 28 | |
| 29 | else |
| 30 | _dir=$(find $srcdir -maxdepth 2 -type f -name 'Build.PL') |
| 31 | if [ ! -z "$_dir" ]; then |
| 32 | cd $(dirname "$_dir") |
| 33 | PERL_MM_USE_DEFAULT=1 perl Build.PL INSTALLDIRS=vendor || return 1 |
| 34 | ./Build || return 1 |
| 35 | ./Build install destdir=${pkgdir} || return 1 |
| 36 | |
| 37 | else |
| 38 | echo "error: failed to detect build method for $pkgname" |
| 39 | echo "you may be able to fix this by editing the PKGBUILD" |
| 40 | return 1 |
| 41 | fi fi |
| 42 | |
| 43 | # remove perllocal.pod and .packlist |
| 44 | find ${pkgdir} -name perllocal.pod -delete |
| 45 | find ${pkgdir} -name .packlist -delete |
| 46 | } |
| 47 | |
| 48 | # vim:set ts=2 sw=2 et: |
| 49 | |