summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0f62f7afa9efcc30d1cafe61fa23ff5ac3a09622 (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=doom-ascii
pkgver=0.1.1
pkgrel=2
pkgdesc="Text-based DOOM in your terminal! Source-port of doomgeneric. Does not have sound."
arch=('any')
url="https://github.com/wojciech-graj/${_pkgname}"
license=('GPL-2.0-or-later')
makedepends=('make' 'gcc')
_pkgsrc="${_pkgname}-${pkgver}"
source=("${_pkgsrc}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
        "${pkgname}.sh"
        "fix_i_endread.patch")
sha256sums=('34c4116d687cac91dc1e23bd580a6211ff490bcbbf85d6f00df0f4fe1fa886e6'
            '27864d019900aa0728c95d77e70dfd94869e44a65e6657ef04110c5f5c1cc202'
            'c1bb903467e5c012662e77ff4b9347c7fb6c966a1798e2af5400d0318b5a78e4')
backup=("opt/${pkgname}/.default.cfg")

prepare() {
  cd "${srcdir}/${_pkgsrc}/src"
  patch -p1 -i "${srcdir}/fix_i_endread.patch"
}

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"
}