summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f5a09c848b76e644641d0b45d1ba137f77979f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Maintainer: Paco Pascal <me@pacopascal.com>

_pkgname='fudo'
pkgname="${_pkgname}-git"
pkgver=r13.b1a2014
pkgrel=1
pkgdesc='A sudo to doas wrapper'
arch=('x86_64')
url='https://github.com/FragmentedCurve/fudo'
license=('BSD')
depends=('doas')
makedepends=('git')
conflicts=("${pkgname%-git}" 'sudo')
provides=("${pkgname%-git}" 'sudo')
source=('git+https://github.com/FragmentedCurve/fudo.git')
md5sums=('SKIP')

pkgver() {
    cd "${_pkgname}"
    ( set -o pipefail
      git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
	  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
    )
}

build() {
    cd "${_pkgname}"
    make
}

package() {
    cd "${_pkgname}"
    install -D fudo ${pkgdir}/usr/bin/fudo
    install -D fudo.1 ${pkgdir}/usr/share/man/man1/fudo.1
    ln -s /usr/bin/fudo ${pkgdir}/usr/bin/sudo
}