updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / disco / PKGBUILD
blob464ae3ed31bfde7a08c03605cf8dbe87e029bf1d
1 # Contributor: spider-mario <spidermario@free.fr>
2 # Contributor: Yejun Yang (yejunx AT gmail DOT com)
4 pkgname=disco
5 pkgver=0.4
6 pkgrel=1
7 pkgdesc="Open-source implementation of the Map-Reduce framework for distributed computing"
8 arch=('any')
9 url="http://discoproject.org/"
10 license=('custom:BSD')
11 depends=(erlang openssh python2 python-cjson)
12 makedepends=(setuptools)
13 backup=(etc/disco/settings.py)
14 install=disco.install
15 source=(https://github.com/tuulos/$pkgname/tarball/$pkgver
16         disco-master
17         disco-node)
19 md5sums=('142ec90b5ea46e13b5898f9e823c554c'                                                                                                                                                                                      
20          '98a2953fba3a0946b7e319b3be47d487'                                                                                                                                                                                      
21          'b241a00d78b193a756d8c58907851287')
23 build() {
24   cd "$srcdir"/*/
26   make PYTHON=python2
28   cd bin
29     for script in *.py
30     do
31       sed --expression='s/python$/python2/' --in-place "$script"
32     done
33   cd ..
36 package() {
37   cd "$srcdir"/*/
39   install --directory "$pkgdir/etc/rc.d"
40   make \
41     DESTDIR="$pkgdir" \
42     PYTHON=python2 \
43     INSTALL=/bin/install \
44     prefix=/usr \
45     localstatedir=/var \
46   install
48   sed --expression='s/DISCO_HOME = .*/DISCO_HOME = "\/usr\/lib\/disco"/' \
49       --expression='s/DISCO_ROOT = .*/DISCO_ROOT = "\/var\/disco"/' \
50       --in-place "$pkgdir/etc/disco/settings.py"
52   install --directory "$pkgdir/var/disco/data"
53   install --directory "$pkgdir/var/disco/log"
54   install --directory "$pkgdir/var/disco/run"
56   install --directory "$pkgdir/usr/share/licenses/$pkgname"
57   install --mode=755 "$srcdir/disco-master" "$pkgdir/etc/rc.d/"
58   install --mode=755 "$srcdir/disco-node" "$pkgdir/etc/rc.d/"
59   install --mode=755 LICENSE "$pkgdir/usr/share/licenses/$pkgname/"