# Maintainer: Christian Hesse # Contributor: Jens Staal pkgname=ubase-git pkgver=0.r602.g5579553 pkgrel=1 pkgdesc='An extension of the sbase *nix core utilities - git checkout' arch=('i686' 'x86_64') license=('MIT') url='http://git.suckless.org/ubase/' depends=('sbase-git') makedepends=('git') source=('git://git.suckless.org/ubase') sha256sums=('SKIP') pkgver() { cd ${srcdir}/ubase/ if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then printf '%s.r%s.g%s' \ "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG})" \ "$(git rev-list --count ${GITTAG}..)" \ "$(git rev-parse --short HEAD)" else printf '0.r%s.g%s' \ "$(git rev-list --count master)" \ "$(git rev-parse --short HEAD)" fi } build() { cd ${srcdir}/ubase/ make } package() { cd ${srcdir}/ubase/ make DESTDIR=${pkgdir} PREFIX=/opt/sbase MANPREFIX=/opt/sbase/man install install -D -m0644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE }