updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / coccigrep / PKGBUILD
blob4252cc82206ee06a2a3042313ddc9763c1c05724
1 pkgname=coccigrep
2 pkgver=20110817
3 pkgrel=1
4 pkgdesc="Semantic grep for the C language (git version)"
5 url="http://home.regit.org/software/coccigrep/"
6 license=('GPL')
7 depends=('python2' 'coccinelle')
8 makedepends=('git')
9 optdepends=('python2-pygments: to highlight the C-code colorful')
10 options=("!strip")
11 arch=('i686' 'x86_64')
12 _gitroot="https://github.com/regit/coccigrep.git"
13 _gitname="coccigrep"
15 build() {
16     cd $srcdir
18     if [ -d $_gitname ] ; then
19         cd $_gitname && git pull origin
20         msg "The local files are updated."
21     else
22         git clone $_gitroot
23     fi
25     cd $srcdir
27     rm -rf $_gitname-build
28     git clone $_gitname{,-build}
30     msg "GIT checkout done or server timeout"
31     msg "Starting make..."
33     cd ${_gitname}-build
34     python2 setup.py build
37 package() {
38         cd ${_gitname}-build
39         python2 setup.py install --prefix="$pkgdir/usr"