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

_realname=HTTP-Daemon
pkgname=perl-${_realname}
pkgver=6.12
pkgrel=1
pkgdesc="A simple http server class"
arch=('any')
url="https://metacpan.org/release/HTTP-Daemon"
groups=('perl-modules')
license=('PerlArtistic' 'GPL')
depends=('perl' 'perl-HTTP-Date' 'perl-HTTP-Message' 'perl-IO-Socket-IP' 'perl-LWP-MediaTypes')
makedepends=('perl-Module-Build-Tiny')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/O/OA/OALDERS/${_realname}-${pkgver}.tar.gz)
sha256sums=('df47bed10c38670c780fd0116867d5fd4693604acde31ba63380dce04c4e1fa6')

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

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

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