# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

_realname=Import-Into
pkgname=perl-${_realname}
pkgver=1.002005
pkgrel=1
pkgdesc="Import packages into other packages"
arch=('any')
url="https://search.cpan.org/dist/Import-Into/"
license=('PerlArtistic' 'GPL')
depends=('perl-Module-Runtime>=0' 'perl>=5.006')
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/H/HA/HAARG/Import-Into-${pkgver}.tar.gz)
sha512sums=('d356307072da18bc40b25f11583018ed416cb87178f080982e14e98e53d42bc1e04aebda56d595e707c05065eaa6ad7a6b059920e8b5b8e1589bfd68e26900fb')

prepare() {
  cd ${_realname}-${pkgver}
}

build() {
  cd ${_realname}-${pkgver}
  PERL_MM_USE_DEFAULT=1 \
  PERL_AUTOINSTALL=--skipdeps \
  PERL5LIB="" \
  MODULEBUILDRC=/dev/null \
  PERL_MM_OPT="INSTALLDIRS=vendor" \
  PERL_MB_OPT="--installdirs vendor" \
  perl Makefile.PL
  make
}

package() {
  cd ${_realname}-${pkgver}
  make install DESTDIR="${pkgdir}"
}
