# $Id: PKGBUILD 133367 2015-05-13 12:31:10Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>

pkgname=moosefs
pkgver=2.0.67_1
pkgrel=2
pkgdesc='High performing and fault tolerant distributed file system'
url='http://moosefs.com/'
replaces=('mfs-master' 'mfs-chunkserver' 'mfs-client')
conflicts=('mfs-master' 'mfs-chunkserver' 'mfs-client')
arch=('x86_64' 'i686')
license=('GPL3')
depends=('zlib' 'fuse' 'python2' 'bash' 'xfsprogs')
install="$pkgname.install"
source=("http://ppa.moosefs.com/src/moosefs-${pkgver/_/-}.tar.gz")
sha256sums=('9b3ad3fc81a6b5ffa7f6cbeb1aa11f85d5b82a2b0c40ff5c8f3b46f72eaafcb4')

build() {
  cd "moosefs-${pkgver%_*}"

  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --sysconfdir=/etc \
    --localstatedir=/var/lib \
    --with-default-user=mfs \
    --with-default-group=mfs \
    --with-systemdsystemunitdir=/usr/lib/systemd/system \
    --sbindir=/usr/bin
  make
}

package() {
  make DESTDIR="$pkgdir" -C "moosefs-${pkgver%_*}" install
}

# getver: -u 4 moosefs.com/download/sources.html
# vim:set ts=2 sw=2 et:
