summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f35a895337cefcd400d9afebe3f15ecc365494ee (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer : int <int [ate] arcor [dot] de>
# Generator  : CPANPLUS::Dist::Arch 1.32

pkgname='perl-dbix-class-schema-populatemore'
pkgver='0.19'
pkgrel='2'
pkgdesc="Perl/CPAN Module DBIx::Class::Schema::PopulateMore: An enhanced populate method"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-datetimex-easy>=0.089' 'perl-list-moreutils>=0.30' 'perl-module-pluggable>=3.9' 'perl-moo>=1.004006' 'perl-moox-handlesvia>=0.001005' 'perl-type-tiny>=0.042' 'perl>=5.8.5')
makedepends=('perl-dbix-class>=0.08127' 'perl-datetime-format-sqlite>=0.11' 'perl-path-class>=0.23' 'perl-sql-translator>=0.11020' 'perl-yaml-tiny>=1.48')
url='https://metacpan.org/release/DBIx-Class-Schema-PopulateMore'
source=("http://search.cpan.org/CPAN/authors/id/J/JJ/JJNAPIORK/DBIx-Class-Schema-PopulateMore-$pkgver.tar.gz")
md5sums=('dbaec016f923da3f5361072df6364a58')
sha512sums=('d0c57223853477e87b08ccf5d0f4d42563c56cf171598fcebf4a99acbd0c30312740b8028019e78f79f8dd3ebd419c8a92369f2d18fce8e5cd13287051696de1')
_distdir="DBIx-Class-Schema-PopulateMore-$pkgver"

prepare() {
  cd "$srcdir/$_distdir"

  # Patch Makefile.PL
  # by adding "use lib '.';" after "use warnings;".
  # Maybe a real patch-file would be better.
  #
  # This fixes the "Can't locate inc/Module/Install.pm in @INC"-error,
  # which isn't upstream yet, when doing "make".
  # See https://rt.cpan.org/Public/Bug/Display.html?id=120825
  # for details on this problem (but for a different Perl/CPAN-module).
  #
  sed -i "s/use warnings FATAL => 'all';/use warnings FATAL => 'all';\nuse lib '.';/" Makefile.PL
}

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'"     \
      PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
      MODULEBUILDRC=/dev/null

    cd "$srcdir/$_distdir"
    /usr/bin/perl Makefile.PL
    make
  )
}

check() {
  cd "$srcdir/$_distdir"
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    make test
  )
}

package() {
  cd "$srcdir/$_distdir"
  make install

  find "$pkgdir" "(" -name .packlist -o -name perllocal.pod ")" -delete
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et: