# Contributor:
# Maintainer: Davide Madrisan <davide.madrisan@gmail.com>
pkgname=@package@
pkgver=@version@
pkgrel=@release@
pkgdesc="Nagios Plugins for Linux"
url="https://github.com/madrisan/nagios-plugins-linux"
arch="all"
license="GPL-3.0-or-later"
depends=""
makedepends="autoconf automake bzip2 curl-dev file gcc libtool linux-headers make m4 musl-dev tar xz"
install=""
subpackages=""
source="$pkgname-$pkgver.tar.xz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
        cd "$builddir"
        autoreconf -vif || return 1
}

build() {
        cd "$builddir"
        ./configure \
                --build=$CBUILD \
                --host=$CHOST \
                --prefix=/usr \
		--libexecdir=/usr/lib/nagios/plugins \
                --sysconfdir=/etc \
                --mandir=/usr/share/man \
                --localstatedir=/var
        make
}

check() {
        cd "$builddir"
        make check
}

package() {
        make DESTDIR="$pkgdir" install
}

sha512sums="@sha512sum@ @package@-@version@.tar.xz"
