summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8491d3f8121a3e4fc7efe01e339514bf0cca8c46 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Maintainer: Chris Severance aur.severach AatT spamgourmet.com
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
# Contributor: Aurélien Chabot <contact@aurelienchabot.fr>
# Contributor: √Čtienne Deparis <etienne@depar.is>

set -u
_pkgname='progress'
pkgname="${_pkgname}-git"
pkgver=0.13.1.r0.gf6894b8
pkgrel=1
_srcdir="${_pkgname}"
pkgdesc='Shows running coreutils basic commands and displays stats'
arch=('i686' 'x86_64')
url="https://github.com/Xfennec/${_pkgname}"
license=('GPL3')
depends=('ncurses')
makedepends=('gcc' 'make')
makedepends+=('git')
provides=("${_pkgname}=${pkgver%%.r*}")
conflicts=("${_pkgname}")
replaces=('cv')
_verwatch=("${url}/releases" "${url#*github.com}/archive/v\(.*\)\.tar\.gz" 'l')
source=("${_srcdir}::${url//https:/git:}")
sha256sums=('SKIP')

pkgver() {
  set -u
  cd "${_srcdir}"
  git describe --long --tags | sed -e 's:^v::g' -e 's/\([^-]*-g\)/r\1/' -e 's/-/./g'
  set +u
}

build() {
  set -u
  cd "${_srcdir}"

  set +u; msg2 'Building...'; set -u
  make -s # -j "$(nproc)"
  set +u
}

package() {
  set -u
  cd "${_srcdir}"

  set +u; msg2 'Installing license...'; set -u
  install -Dpm644 'LICENSE' -t "${pkgdir}/usr/share/licenses/${_pkgname}/"

  set +u; msg2 'Installing documentation...'; set -u
  local _doc
  for _doc in 'capture.png' 'README.md'; do
    install -Dpm644 "${_doc}" -t "${pkgdir}/usr/share/doc/${_pkgname}/"
  done

  set +u; msg2 'Installing...'; set -u
  make DESTDIR="${pkgdir}" PREFIX='/usr' install
  set +u
}
set +u