updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / sloc-git / PKGBUILD
blob6b76832438858acfc0b617284faf6ba658e66f77
1 # Maintainer: Scott Lawrence <bytbox@gmail.com>
2 pkgname=sloc-git
3 pkgver=20120112
4 pkgrel=1
5 pkgdesc="Simply counts source lines of code"
6 arch=('i686' 'x86_64')
7 url="https://github.com/bytbox/sloc"
8 license=('MIT')
9 depends=('go')
10 makedepends=()
11 provides=()
12 conflicts=()
13 replaces=()
14 options=()
15 install=
16 changelog=
17 source=()
18 noextract=()
19 md5sums=() #generate with 'makepkg -g'
21 _gitroot=git://github.com/bytbox/sloc.git
22 _gitname=sloc
23 #_gittag=go.weekly.2011-12-22
25 build() {
26   cd "$srcdir"
27   msg "Connecting to GIT server...."
29   if [[ -d "$_gitname" ]]; then
30     cd "$_gitname" && git pull origin
31     msg "The local files are updated."
32   else
33     git clone "$_gitroot" "$_gitname"
34   fi
36   msg "GIT checkout done or server timeout"
37   msg "Starting build..."
39   rm -rf "$srcdir/$_gitname-build"
40   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
42   cd "$srcdir/$_gitname-build"
43   #git checkout -q $_gittag
44   make
47 package() {
48   cd "$srcdir/$_gitname-build"
49   ls -F
50   install -d -m755 "${pkgdir}/usr/bin/"
51   install -m755 sloc "${pkgdir}/usr/bin/sloc"
54 # vim:set ts=2 sw=2 et: