# Maintainer: Yong-hyu, Ban <yhban@quendi.moe>
# Maintainer: Eon Jeong <administrator@korea.ac.kr>

pkgname=dosfstools
pkgver=4.2
pkgrel=1
pkgdesc="DOS filesystem utilities"
url="https://github.com/dosfstools/dosfstools"
arch=('i686' 'x86_64')
depends=('libiconv' 'libiconv-devel')
source=("${url}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.sig})
license=('GPL2')
sha256sums=('64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527'
            'SKIP')
validpgpkeys=('25714AECDBFDACEE1CE95FE77F6022516E869F64') # Andreas Bombe <aeb@debian.org>

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"

}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure \
    --prefix=/usr \
    --libexecdir=/usr/lib \
    --sbindir=/usr/bin \
    --mandir=/usr/share/man \
    --docdir=/usr/share/doc/dosfstools \
    --enable-compat-symlinks

  make LDADD="-liconv"
}

package () {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
