summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1f1935ea501537e7cdf82b0822814fce65466bb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# $Id: PKGBUILD 140478 2015-09-17 20:51:53Z foutrelis $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributors:
#   Andrei Antoukh - niwi@niwi.be - http://www.niwi.be
#   henning mueller <henning@orgizm.net>

pkgname=glusterfs34
_pkgname=glusterfs
pkgver=3.4.7
pkgrel=1
pkgdesc='Is a cluster file-system capable of scaling to several peta-bytes. Version 3.4'
arch=(i686 x86_64)
url='http://www.gluster.org/'
license=(GPL2 LGPL3)
install=glusterfs.install
depends=(fuse python2 libxml2 libaio liburcu)
makedepends=(flex bison)
optdepends=('rpcbind: NFS'
	    'glib2: qemu-block')
conflicts=(glusterfs)
#source=($pkgname-$pkgver.tar.gz::https://github.com/gluster/glusterfs/archive/v$pkgver.tar.gz)
source=(https://download.gluster.org/pub/gluster/glusterfs/${pkgver%.?}/$pkgver/glusterfs-$pkgver.tar.gz)
md5sums=('a4d59a87107c87b1cebf0dad2c07b274')

prepare() {
  cd $srcdir/$_pkgname-$pkgver
  find -type f -name '*.py' -exec sed -i \
    -e 's:env\ python:env\ python2:' \
    -e 's:/usr/bin/python:/usr/bin/python2:' {} \;
}

build() {
  cd $srcdir/$_pkgname-$pkgver
  ./autogen.sh
  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --with-mountutildir=/usr/bin \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --mandir=/usr/share/man \
    --libexecdir=/usr/lib/$_pkgname \
    --with-systemddir=/usr/lib/systemd/system \
    PYTHON=python2 LEXLIB=
  make
}

package() {
  cd $srcdir/$_pkgname-$pkgver

  make -j1 DESTDIR=$pkgdir install

  mkdir -p $pkgdir/usr/lib/tmpfiles.d
  echo "d /var/run/glusterfs 0755 root root -" >$pkgdir/usr/lib/tmpfiles.d/glusterfs.conf

  install -D -m 644 \
    $srcdir/$_pkgname-$pkgver/{INSTALL,COPYING*} \
    $pkgdir/usr/share/doc/glusterfs/

  cp -rf \
    $srcdir/$_pkgname-$pkgver/doc/* \
    $pkgdir/usr/share/doc/glusterfs/
  rm -rf $pkgdir/var/run
}

# vim:set ts=2 sw=2 et: