updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / seekwatcher-hg / PKGBUILD
blob9b9a4ec2e6d43dad5e32e7139afce8051084d584
1 # Maintainer: Marti Raudsepp <marti@juffo.org>
3 pkgname=seekwatcher-hg
4 pkgver=104
5 pkgrel=2
6 pkgdesc="Generates graphs from blktrace runs to help visualize IO patterns and performance"
7 arch=(i686 x86_64)
8 url="http://oss.oracle.com/~mason/seekwatcher/"
9 license=('GPL')
10 makedepends=('mercurial' 'python2')
11 depends=('python2-matplotlib' 'python2-numpy')
12 optdepends=('blktrace: for tracing the local system'
13             'pyqt3: enable interactive mode')
14 conflicts=('seekwatcher')
15 md5sums=()
17 _hgroot="http://oss.oracle.com/mercurial/mason/"
18 _hgrepo="seekwatcher"
20 build() {
21   cd $srcdir
23   if [ -d $_hgrepo/.hg ]; then
24     (cd $_hgrepo && hg up -r $pkgver)
25   else
26     hg clone -r $pkgver $_hgroot/$_hgrepo $_hgrepo
27   fi
29   msg "Mercurial checkout done or server timeout"
31   if [ -d $_hgrepo-build ]; then
32     msg "Removing old build directory"
33     rm -rf $_hgrepo-build
34   fi
36   msg "Copying repository to another build directory"
37   cp -r $srcdir/$_hgrepo $srcdir/$_hgrepo-build
39   msg "Starting build"
40   cd $srcdir/$_hgrepo-build
42   msg "Running setup.py"
43   python2 setup.py build || return 1
44   python2 setup.py install --root=$pkgdir || return 1
46   msg "Installing documentation"
47   install -dm 755 $pkgdir/usr/share/doc/$pkgname
48   cp -r $srcdir/$_hgrepo-build/README.html $pkgdir/usr/share/doc/$pkgname