summaryrefslogtreecommitdiff
path: root/community/mfs/PKGBUILD
blob: fcf870eb4ea56f87819ad1243e52c04f31979e38 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# $Id: PKGBUILD 71606 2012-05-30 19:22:00Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Thomas S Hatch <thatch45@gmail.com>

pkgbase=mfs
pkgname=('mfs-client' 'mfs-chunkserver' 'mfs-master')
pkgver=1.6.25
pkgrel=1
pkgdesc="MooseFS, fault tolerant, network distributed file system"
license=("GPL3")
arch=('x86_64' 'i686')
options=('!libtool')
depends=('zlib' 'fuse' 'python2' 'bash')
url="http://www.moosefs.com/"
source=("http://www.moosefs.org/tl_files/mfscode/mfs-$pkgver.tar.gz"
        "mfsmaster"
        "mfschunkserver"
        "mfsmetalogger"
        "mfscgiserv")
sha256sums=('64b7ce749699e437f47e1561e8044362ea714a8dd2d3bad0c6a7165e9ad142ee'
            '7c307f7be520644ac5d9c71e39ff7ec7e26800aa77c8a18c51a2d0087e5b2f48'
            '2d07e544f4bfeb497c24276936d3a8ce9f906597d6b9c898dc491426b21e74e0'
            'd9c072cbb9d9645e5131d08b08628ccc2a2bef0a4e9c6fd8c3c33e50efce39f3'
            'a2e1951888887e928e68a3a010047fa3528182e93c086e4addb5abc14ea72c3b')

build() {
  cd "$srcdir"

  msg2 "Building client..."
  cp -r $pkgbase-$pkgver $pkgbase-client
  cd $pkgbase-client
  ./configure \
      --prefix=/usr \
      --sysconfdir=/etc \
      --localstatedir=/var/lib \
      --disable-mfschunkserver \
      --disable-mfsmaster \
      --disable-mfscgi \
      --disable-mfscgiserv
  make
  
  cd ..
  
  msg2 "Building chunkserver..."
  cp -r $pkgbase-$pkgver $pkgbase-chunk
  cd $pkgbase-chunk
  ./configure \
      --prefix=/usr \
      --sysconfdir=/etc \
      --localstatedir=/var/lib \
      --disable-mfsmaster \
      --disable-mfsmount \
      --disable-mfscgi \
      --disable-mfscgiserv
  make

  cd ..
  
  msg2 "Building master..."
  cp -r $pkgbase-$pkgver $pkgbase-master
  cd $pkgbase-master
  ./configure \
      --prefix=/usr \
      --sysconfdir=/etc \
      --localstatedir=/var/lib \
      --disable-mfschunkserver \
      --disable-mfsmount
  make
}

package_mfs-client() {
  depends=('zlib' 'fuse' 'bash')
  cd "$srcdir/$pkgbase-client"
  make DESTDIR="$pkgdir" install
  rm -rf "$pkgdir/usr/share/man/man7"
  rmdir "$pkgdir/usr/share/man/man5"
}

package_mfs-chunkserver() {
  depends=('zlib' 'bash')
  cd "$srcdir/$pkgbase-chunk"
  make DESTDIR="$pkgdir" install
  rm -rf "$pkgdir/usr/share/man/man7"
  rmdir "$pkgdir/usr/share/man/man1"
  install -Dm755 "$srcdir/mfschunkserver" "$pkgdir/etc/rc.d/mfschunkserver"
  mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin"
}

package_mfs-master() {
  depends=('zlib' 'python2')
  cd "$srcdir/$pkgbase-master"
  make DESTDIR="$pkgdir" install
  install -Dm644 README "$pkgdir/usr/share/doc/$pkgbase/README"
  install -Dm644 INSTALL "$pkgdir/usr/share/doc/$pkgbase/INSTALL"
  install -Dm644 NEWS "$pkgdir/usr/share/doc/$pkgbase/NEWS"
  install -Dm644 UPGRADE "$pkgdir/usr/share/doc/$pkgbase/UPGRADE"
  install -Dm755 "$srcdir/mfsmaster" "$pkgdir/etc/rc.d/mfsmaster"
  install -Dm755 "$srcdir/mfsmetalogger" "$pkgdir/etc/rc.d/mfsmetalogger"
  install -Dm755 "$srcdir/mfscgiserv" "$pkgdir/etc/rc.d/mfscgiserv"
  rmdir "$pkgdir/usr/share/man/man1"
  mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin"
  sed -i '0,/on/s//on2/' "$pkgdir/usr/bin/mfscgiserv"
}

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