summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bf0e57354f959e2cee6ca9f8cd64a549ebd56efe (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
# Maintainer: Hunter Peavey < printf "dev@die.bots" | sed "s/die.bots/krathalan.net/g" >

# General package information
pkgname=shlide-git
pkgver=r45.2e825ef
pkgrel=1
pkgdesc="A slide deck presentation tool written in pure bash."
url="https://github.com/icyphox/shlide"
license=("MIT")
arch=("any")

# Dependencies
depends=()
makedepends=("git" "scdoc")

# Download information
source=("${pkgname}::git+${url}.git#branch=master")
sha256sums=('SKIP')

# https://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines#Git
pkgver() {
  cd "${srcdir}/${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 "${srcdir}/${pkgname}"

  # Create man page
  scdoc < shlide.1.scd > shlide.1
}

package() {
  cd "${srcdir}/${pkgname}"

  # shlide "binary"
  make DESTDIR="${pkgdir}" install

  # man page
  install -D -m644 shlide.1 "${pkgdir}/usr/share/man/man1/shlide.1"
}