summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 61d93c77df9925d54a85d0ce1b2a7faacdb5b66c (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
51
52
53
54
55
# Maintainer: Mike Swanson <mikeonthecomputer@gmail.com>

pkgname=crispy-doom
pkgdesc="Vanilla-compatible enhanced Doom engine"
pkgver=6.0
pkgrel=3
arch=('i686' 'x86_64' 'aarch64')
url="http://fabiangreffrath.github.io/crispy-doom"
license=('GPL2')
depends=('fluidsynth' 'hicolor-icon-theme' 'libpng' 'libsamplerate' 'sdl2_mixer' 'sdl2_net')
makedepends=('python')
optdepends=('freedm: Free deathmatch game'
            'freedoom1: Free Ultimate Doom-compatible game'
            'freedoom2: Free Doom II-compatible game')
install=crispy-doom.install
source=(https://github.com/fabiangreffrath/$pkgname/archive/$pkgname-$pkgver.tar.gz)
b2sums=('fc864ae55100db0d074d14eae795bd603b355fba8eaa783b564b167cf1bf65ff1e97f4640d2b0d56f8c4ec076125fd0f0e2a95bc5eac7251997e9f7757f4d295')

prepare() {
  cd "$pkgname-$pkgname-$pkgver"

  for patch in ../*.patch; do
    if [ ! -f "$patch" ]; then
      break;
    else
      patch -p1 -i "$patch"
    fi
  done
}

build() {
  cd "$pkgname-$pkgname-$pkgver"

  ./autogen.sh --prefix=/usr
  make
}

package() {
  cd "$pkgname-$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  cd "$pkgdir"/usr
  rm -rf share/man/man5/default.cfg.5              \
         share/man/man5/heretic.cfg.5              \
         share/man/man5/hexen.cfg.5                \
         share/man/man5/strife.cfg.5               \
         share/man/man6/chocolate-{server,setup}.6

  rm bin/crispy-{heretic,hexen,strife}-setup
  mv bin/crispy-doom-setup bin/crispy-setup
  for game in doom heretic hexen strife; do
    ln -s crispy-setup bin/crispy-${game}-setup
  done
}