summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 40ba63d674d297fa21487ffeb3a073cc0bc94a42 (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
43
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=s6-git
pkgver=2.11.1.2.r0.gcb45493
pkgrel=1
pkgdesc="A small suite of programs for UNIX, designed to allow process supervision"
arch=('i686' 'x86_64')
url="https://skarnet.org/software/s6/"
license=('ISC')
depends=('glibc' 'execline' 'skalibs')
makedepends=('git')
provides=("s6=$pkgver")
conflicts=('s6')
options=('staticlibs')
source=("git+https://github.com/skarnet/s6.git")
sha256sums=('SKIP')


pkgver() {
  cd "s6"

  _tag=$(git tag -l --sort -v:refname | sed '/rc[0-9]*/d' | 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/^v//'
}

build() {
  cd "s6"

  ./configure \
    --prefix="/usr" \
    --libexecdir="/usr/lib/s6" \
    --enable-shared
  make
}

package() {
  cd "s6"

  make DESTDIR="$pkgdir" install
  install -Dm644 "COPYING" -t "$pkgdir/usr/share/licenses/s6"
}