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

_realname=HTTP-Daemon
pkgname=perl-${_realname}
pkgver=6.16
pkgrel=1
pkgdesc="A simple http server class"
arch=('any')
url="https://metacpan.org/dist/HTTP-Daemon"
msys2_references=(
  'purl: pkg:cpan/OALDERS/HTTP-Daemon'
)
groups=('perl-modules')
license=('spdx:Artistic-1.0-Perl' 'spdx:GPL-1.0-or-later')
depends=('perl' 'perl-HTTP-Date' 'perl-HTTP-Message' 'perl-IO-Socket-IP' 'perl-LWP-MediaTypes')
makedepends=('perl-Module-Build-Tiny')
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/O/OA/OALDERS/${_realname}-${pkgver}.tar.gz)
sha256sums=('b38d092725e6fa4e0c4dc2a47e157070491bafa0dbe16c78a358e806aa7e173d')

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
}
