# Maintainer: Koncz László <konlaasz at gmail dot com>
pkgname="urxvt-perls-git"
pkgver=20120119
pkgrel=1
pkgdesc="Muennich's perl extensions for the rxvt-unicode terminal emulator"
arch=("any")
license=("GPLv2")
depends=('rxvt-unicode' 'xsel')
makedepends=('git')
conflicts=('urxvt-url-select' 'urxvt-keyboard-select' 'urxvt-clipboard')
install='urxvt-perls.install'
url='http://www.github.com/muennich/urxvt-perls'

_gitroot="http://github.com/muennich/urxvt-perls.git"
_gitname="urxvt-perls"

build() {
cd $srcdir

msg "Connecting to GIT server..."
if [[ -d $_gitname ]]; then
(cd $_gitname && git pull origin) || return 1
else
git clone $_gitroot $_gitname || return 1
fi

msg "GIT checkout done or server timeout"
msg "Starting make..."

cd $_gitname || return 1

install -Dm644 clipboard ${pkgdir}/usr/lib/urxvt/perl/clipboard
install -Dm644 keyboard-select ${pkgdir}/usr/lib/urxvt/perl/keyboard-select
install -Dm644 url-select ${pkgdir}/usr/lib/urxvt/perl/url-select
install -Dm644 README.md ${pkgdir}/usr/share/doc/urxvt-perls/README.md
}