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

_realname=URI
pkgname=perl-${_realname}
pkgver=5.09
pkgrel=1
pkgdesc="Uniform Resource Identifiers (absolute and relative)"
arch=('any')
url="https://metacpan.org/${_realname}/"
groups=('perl-modules')
license=('PerlArtistic')
depends=('perl>=5.10.0')
checkdepends=('perl-Test-Needs')
provides=('perl-URI-Escape=3.30')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/O/OA/OALDERS/${_realname}-${pkgver}.tar.gz")
sha256sums=('03e63ada499d2645c435a57551f041f3943970492baa3b3338246dab6f1fae0a')

build() {
  cd "${srcdir}/${_realname}-$pkgver"
  # install module in vendor directories.
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

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