summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 65868fe775667454a5a0beffe9e81ad9f536c4a0 (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
# Maintainer: vitaliikuzhdin <vitaliikuzhdin@gmail.com>

_pkgname=doom_ascii
pkgname=${_pkgname}-git
pkgver=0.1.1.r7.052c252
pkgrel=1
pkgdesc="Text-based DOOM in your terminal! Source-port of doomgeneric. Does not have sound."
arch=('any')
url="https://github.com/wojciech-graj/doom-ascii"
license=('GPL-2.0-or-later')
makedepends=('git' 'make' 'gcc')
_pkgsrc="${_pkgname}"
source=("${_pkgsrc}::git+${url}.git"
        "${_pkgname}.sh")
conflicts=("${_pkgname}")
provides=("${_pkgname}=${pkgver%%.r*}")
sha256sums=('SKIP'
            '27864d019900aa0728c95d77e70dfd94869e44a65e6657ef04110c5f5c1cc202')
backup=("opt/${_pkgname}/.default.cfg")

pkgver() {
  cd "${_pkgsrc}"
  printf "%s" "$(git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
  cd "${srcdir}/${_pkgsrc}/src"
  make
}

package() {
  cd "${srcdir}"
  install -Dm755 "${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}"

  cd "${_pkgsrc}"
  install -Dm755 "${_pkgname}/${_pkgname}" "${pkgdir}/opt/${_pkgname}/${_pkgname}"
  install -Dm644 "src/.default.cfg" "${pkgdir}/opt/${_pkgname}/.default.cfg"
  install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
  install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}