updated on Tue Jan 17 08:05:08 UTC 2012
[aur-mirror.git] / ccode-git / PKGBUILD
blob3ac847a0b6e04da8f11b01e21a8e11ec23504e9c
1 # Maintainer: Alexander Rødseth <rodseth@gmail.com>
2 pkgname=ccode-git
3 pkgver=20110326
4 pkgrel=1
5 pkgdesc="ViM autocompletion for C"
6 url="https://github.com/nsf/ccode"
7 arch=('x86_64' 'i686')
8 license=('MIT')
9 depends=('clang')
10 makedepends=('git')
11 _gitroot="git://github.com/nsf/ccode.git"
12 _gitname="ccode"
14 build() {
15   cd "$srcdir"
16   msg "Connecting to github.com GIT server...."
17   if [[ -d $_gitname ]] ; then
18     ( cd "$_gitname" && git pull origin )
19     msg "The local files are updated."
20   else
21     git clone "$_gitroot"
22   fi
23   msg "GIT checkout done or server timeout"
25   rm -rf "$_gitname-build"
26   git clone "$_gitname" "$_gitname-build"
27   cd "$_gitname-build"
29   msg2 "Building..."
30   head -2 update.bash > compile.bash
31   chmod +x compile.bash
32   ./compile.bash
35 package() {
36   cd "$srcdir/$_gitname-build"
37   msg2 "Packaging..."
38   install -Dm755 ccode "$pkgdir/usr/bin/ccode"
39   install -Dm644 vim/plugin/ccode.vim \
40     "$pkgdir/usr/share/vim/vimfiles/plugin/ccode.vim"
41   install -Dm644 LICENSE \
42     "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
44 # vim:set ts=2 sw=2 et: