summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4935f8a6375bed7d6dfa745b310e87cb93d33032 (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
# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz>

pkgname='dave-gnukem'
pkgver=1.0.1
pkgrel=3
pkgdesc='2D scrolling platform shooter inspired by Duke Nukem 1'
arch=('x86_64')
url='https://github.com/davidjoffe/dave_gnukem'
_url_data='https://github.com/davidjoffe/gnukem_data'
license=('GPL2' 'MIT')
depends=('hicolor-icon-theme' 'sdl_mixer')
makedepends=('imagemagick')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
        "${pkgname}-${pkgver}-data.tar.gz::${_url_data}/archive/${pkgver}.tar.gz"
        "${pkgname}"
        "${pkgname}.desktop"
        "${pkgname}.png")
sha256sums=('2f00a6c373e270578160a73a5484fb8ec92a9361c7960cb4670856bcdc7a8a14'
            '46c06c5fb7e1ca8d0848c1866d6e1df96e021ddf8cebc7e64d97cfee64232027'
            '7462158ad4dd0c853f01bedb90a8e6b8490f48b33dd39252260d4cfa425b8289'
            '209cb430b87c2b89455833b7c79ca309a8b87331c63882092b8c1ebeadbf2745'
            '89cb35bd13682bb35f2e7e5a9fc36d0a0f9959b77261d538f8ab1d59edb0321e')

prepare() {
  # Remove -DDEBUG flag in Makefile
  sed -i 's/-DDEBUG//' "${pkgname/-/_}-${pkgver}/Makefile"
}

build() {
  make -C "${pkgname/-/_}-${pkgver}"
}

package() {
  install -Dvm755 "${pkgname}" -t "${pkgdir}/usr/bin"
  install -Dvm644 "${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
  for i in 16 32 64 128; do
    convert "${pkgname}.png" -resize "${i}x${i}" "icon${i}.png"
    install -Dvm644 "icon${i}.png" "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png"
  done

  install -dv "${pkgdir}/usr/share/${pkgname}/data"
  cp -rfv "${pkgname#*-}_data-${pkgver}/"* "${pkgdir}/usr/share/${pkgname}/data"

  cd "${pkgname/-/_}-${pkgver}"
  install -Dvm755 "${pkgname/-/}" "${pkgdir}/usr/share/${pkgname}/${pkgname}"
  install -Dvm644 'README.md' -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dvm644 'MIT-LICENSE.txt' "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim: ts=2 sw=2 et: