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

pkgname=moosefs
pkgver=2.0.73_1
pkgrel=1
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=('923a33a2830a8f0a831381aa97c8f8c8be37488dbf833956d0ca433266d995a1')

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:
