ubase-extras/PKGBUILD

39 lines
815 B
Bash
Raw Normal View History

2016-03-25 09:11:31 +00:00
# Maintainer: Jack L. Frost <fbt@fleshless.org>
_srcname='ubase'
pkgname=ubase-halt-git
pkgver=r592.e0dc3f9
pkgrel=1
pkgdesc="halt from suckless.org's ubase"
url='http://core.suckless.org/ubase'
arch=( 'x86_64' 'i686' )
license=( 'MIT' )
source=( "git://git.suckless.org/ubase" )
sha1sums=( 'SKIP' )
pkgver() {
cd "${_srcname}"
if git_version=$( git describe --long --tags 2>/dev/null ); then
IFS='-' read last_tag tag_rev commit <<< "$git_version"
printf '%s.r%s.%s' "$last_tag" "$tag_rev" "$commit"
else
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
fi
}
build() {
cd "${_srcname}"
make halt
}
package() {
cd "${_srcname}"
mkdir -pm755 "$pkgdir/usr/bin"
cp halt "$pkgdir/usr/bin/halt"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}