summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-file-homedir/PKGBUILD
blob: 6eb202ce7973de950c1cb423297e6996ac350c3c (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
# Maintainer: Brian Bidulock <bidulock@openss7.org>
# Contributor: chimeracoder <dev@chimeracoder.net>

pkgname=perl-file-homedir
_cpanname=File-HomeDir
pkgver=1.002
pkgrel=2
pkgdesc="Find your home and other directories on any platform"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-file-which')
makedepends=('perl-module-install')
url="https://metacpan.org/release/$_cpanname"
source=("https://cpan.metacpan.org/authors/id/R/RE/REHSACK/$_cpanname-$pkgver.tar.gz")
md5sums=('1e999956661fbee165b088eedb5fee3c')

build() {
  cd $_cpanname-$pkgver

  # why isn't makepkg doing this?
  export -n PERL_MM_OPT PERL5LIB PERL_LOCAL_LIB_ROOT

  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 \
  PERL_AUTOINSTALL='--skipdeps' \
  perl Makefile.PL INSTALLDIRS=vendor
  make INSTALLDIRS=vendor
}
check() {
  cd $_cpanname-$pkgver
  make test
}
package() {
  cd $_cpanname-$pkgver

  make INSTALLDIRS=vendor DESTDIR="$pkgdir" install

  # remove perllocal.pod and .packlist
  find "$pkgdir" -name '*.pod' -o -name '.packlist' -delete
}

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