summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fe1c36be7f1f90b9e9ec189afc37601000dd118d (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
_pkgname=rederr
pkgname="${_pkgname}"-git
pkgver=r5.4ef6ede
pkgrel=1
pkgdesc="Colour your stderr red"
arch=('x86_64')
url="https://github.com/poettering/rederr"
license=('LGPL2.1')
makedepends=('git' 'meson' 'ninja')
source=('git+https://github.com/poettering/rederr.git')
md5sums=('SKIP')

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

build() {
  cd "$_pkgname"
  meson --prefix=/usr build
  cd build
  ninja
}

package() {
  cd "$_pkgname"
  cd build
  DESTDIR="${pkgdir}/" PREFIX=/usr ninja install
}

# vim:set ts=2 sw=2 et: