summaryrefslogtreecommitdiff
path: root/pcr/prboom-plus/PKGBUILD
blob: 887e3861702acd83ebf06888c470bdf4f3cef7b7 (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 (aur): Kingan <kingan201 at gmail dot com>
# Contributor: Frederic Bezies <fredbezies at gmail dot com>
# Contributor: Valsu [arch(at)hylia.de]

pkgname=prboom-plus
pkgver=2.6.2
pkgrel=1
pkgdesc='An advanced, Vanilla-compatible Doom engine based on PrBoom'
url='https://github.com/coelckers/prboom-plus'
arch=('x86_64')
arch+=('armv7h' 'i686')
license=('GPL2')
depends=('sdl2')
optdepends=('dumb' 
            'fluidsynth' 
            'glu' 
            'libmad' 
            'libvorbis' 
            'pcre' 
            'portmidi'
            'sdl2_image'
            'sdl2_mixer'
            'sdl2_net') 
makedepends=('cmake')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/coelckers/prboom-plus/archive/refs/tags/v$pkgver.tar.gz")
sha1sums=('363471156b15e3927227ff4406670fdcd9725a74')

_rootdir="prboom-plus-${pkgver}/prboom2"
_builddir="${_rootdir}/cbuild"

prepare() {
  cd "${srcdir}"  
  sed -i -E 's/mktemp/mkstemp/g' $(find "${_rootdir}" -type f -name r_demo.c)
}

build() {
  cd "${srcdir}"

  mkdir -p "${_builddir}"
  cd "${_builddir}"

  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ../
  make
}

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

  make DESTDIR="${pkgdir}" gamesdir=/usr/bin install
}