summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5e3cf44f7523be484ffbfa12a1315c6cf68470b5 (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
37
38
39
40
41
42
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=authbind-git
pkgver=2.1.2.r17.g33818c4
pkgrel=1
pkgdesc="Allows non-root programs to bind() to low ports"
arch=('i686' 'x86_64')
url="https://tracker.debian.org/pkg/authbind"
license=('GPL-2.0-or-later')
depends=('glibc')
makedepends=('git')
provides=("authbind=$pkgver")
conflicts=('authbind')
source=("git+https://www.chiark.greenend.org.uk/ucgi/~ian/githttp/authbind.git")
sha256sums=('SKIP')


pkgver() {
  cd "authbind"

  _tag=$(git tag -l --sort -v:refname | grep -E '^debian/[0-9\.]+$' | head -n1)
  _rev=$(git rev-list --count $_tag..HEAD)
  _hash=$(git rev-parse --short HEAD)
  printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's|^debian/||'
}

build() {
  cd "authbind"

  make \
    prefix="/usr"
}

package() {
  cd "authbind"

  make \
    DESTDIR="$pkgdir" \
    prefix="/usr" \
    install \
    install_man
}