updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / linenoise-git / PKGBUILD
blob142bfbef2a4747dd1a263ea1b0a11dd5ac504d7f
1  
2 # Maintainer: Jens Staal <staal1978@gmail.com>
4 pkgname=linenoise-git
5 pkgver=20111203
6 pkgrel=1
7 pkgdesc="A minimal, zero-config, BSD licensed, readline replacement."
8 arch=('i686' 'x86_64')
9 url="https://github.com/antirez/linenoise"
10 license=('BSD')
11 makedepends=('git')
13 _gitroot=('git://github.com/antirez/linenoise.git')
14 _gitname=('linenoise')
16 build() {
17  cd $srcdir
19 msg "getting oh sources"
20    if [ -d $_gitname ] ; then
21     cd $_gitname && git pull $_gitroot
22     msg "The local files are updated."
23   else
24     git clone $_gitroot $_gitname
25   fi
27 msg "setting up build directory"
28   rm -rf $srcdir/build
29   cp -ar $srcdir/$_gitname $srcdir/build
30   cd $srcdir/build
31   make
34 package() {
35  mkdir -p $pkgdir/usr/{lib/$_gitname,include/$_gitname,share/licenses/$_gitname}
37  install -m755 $srcdir/build/linenoise_example $pkgdir/usr/lib/linenoise/
38  install -m755 $srcdir/build/linenoise.{c,h} $pkgdir/usr/include/
39 #it could perhaps be interesting with a wrapper script similar to the makefile or something to link against linenoise.
40  install -m644 $srcdir/build/README.markdown $pkgdir/usr/share/licenses/$_gitname/