# $Id: PKGBUILD 139920 2015-09-11 06:10:29Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: GaoShichao <xgdgsc@gmail.com>

pkgname=fuse-exfat
pkgver=1.2.0
pkgrel=1
pkgdesc="Free exFAT file system implementation"
arch=('i686' 'x86_64')
url="http://code.google.com/p/exfat/"
license=('GPL2')
depends=('fuse')
makedepends=('pkg-config')
optdepends=('exfat-utils: utilities for exFAT file system'
            'util-linux: to mount exFAT volumes automatically')
source=("https://github.com/relan/exfat/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
md5sums=('352bdddfa3d8bbee5ffc8ee9e212964f')

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

    ./configure --prefix=/usr \
              --sbindir=/usr/bin

  make CCFLAGS="${CFLAGS} -std=c99" LINKFLAGS="${LDFLAGS}"
} 

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

  make DESTDIR="${pkgdir}" install

  # Install man page
  install -Dm444 fuse/mount.exfat-fuse.8 "${pkgdir}/usr/share/man/man8/mount.exfat-fuse.8"
}
