[ create a new paste ] login | about

Link: http://codepad.org/udcxC3Ti    [ raw code | fork ]

Plain Text, pasted on Jan 14:
pkgname=glances-git
pkgver=20120114
pkgrel=1
pkgdesc="Curses-based system monitor"
arch=('any')
url="https://github.com/nicolargo/"
license=('GPL')
depends=('ncurses' 'pystatgrab')
provides=('glances')

_gitroot="https://github.com/nicolargo/glances.git"
_gitname="glances"

build() {
	cd "${srcdir}"
	msg "Connecting to GIT server...."
	if [ -d ${_gitname} ] ; then
		cd ${_gitname} && git pull origin
		msg "The local files are updated."
	else
		git clone ${_gitroot} ${_gitname}
	fi
	
	msg "GIT checkout done or server timeout"
	rm -rf "${srcdir}/${_gitname}-build"
	git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
	cd "${srcdir}/${_gitname}-build"

  ./autogen.sh --prefix=/usr --datadir=/usr/share

  sed -i 's/python$/python2/' $srcdir/$_gitname-build/src/glances.py
  sed -i 's/glances\.py/glances/' $srcdir/$_gitname-build/src/glances.py
  
  make

}

package() {
	cd "${srcdir}/${_gitname}-build"

  make DESTDIR=$pkgdir install

  mv $pkgdir/usr/bin/glances{.py,}
}

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



Create a new paste based on this one


Comments: