pkgname=mpc
pkgver=1.3.1
pkgdesc="Minimalist command line interface to MPD"
homepage="https://www.musicpd.org/clients/mpc/"
license=(GPL-2.0-or-later)
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://ftp.gnu.org/gnu/${pkgname}/${sources[0]}")
md5sums=("5c9bc658c9fd0f940e8e3e0f09530c62")


src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  ./configure --prefix=/usr    \
              --disable-static \
              --docdir=/usr/share/doc/"${pkgname}-${pkgver}"
  make
  make html
}

src_check() {
  make check
}

src_install() {
  make DESTDIR="$pkgdir" install
  make DESTDIR="$pkgdir" install-html
}
