# Maintainer: Patrick Burroughs <celticmadman@gmail.com>
pkgname=lhnb-git
pkgver=20101218
pkgrel=1
pkgdesc="liskin's hierarchical notebook (git version)"
arch=('i686' 'x86_64')
url="http://git.nomi.cz/?p=tomi/lhnb;a=summary"
license=('GPL')
conflicts=('hnb')
depends=('ncurses')
makedepends=('git')
_gitroot="git://git.nomi.cz/tomi/lhnb"
_gitname="lhnb"
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"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
msg "Editing Makefile to disable -Werror CFLAGS"
cat src/Makefile | sed s/-Werror// > src/Makefile.new && mv src/Makefile.new src/Makefile
make
}
package() {
install -D -m755 $srcdir/$_gitname-build/src/hnb $pkgdir/usr/bin/hnb || return 1
install -D -m644 $srcdir/$_gitname-build/doc/hnb.1 $pkgdir/usr/share/man/man1/hnb.1 || return 1
}