summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 49f27bce951152d879bcb8b83e510618d468041f (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Maintainer: Mike Swanson <mikeonthecomputer@gmail.com>

pkgname=(crispy-{doom,heretic,hexen,strife,common})
_pkgname=${pkgname[0]}
pkgdesc="Chocolate Doom with vanilla-compatible enhancements"
pkgver=1.5
pkgrel=1
arch=('i686' 'x86_64')
url="http://fabiangreffrath.github.io/crispy-doom"
license=('GPL2')
depends=('libsamplerate' 'sdl_mixer' 'sdl_net')
makedepends=('autoconf' 'python')
install=crispy-doom.install
source=(https://github.com/fabiangreffrath/${_pkgname}/archive/${_pkgname}-${pkgver}.tar.gz)
sha256sums=('43f3f58266b1744a361df8678cf97a83839952a8dc0f5ecbfd68345abc90313a')

build() {
  # GitHub's generated archive prefix kind of sucks.
  mv "${_pkgname}-${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}"
  cd "${_pkgname}-${pkgver}"

  # Change binary dir from /usr/games to /usr/bin
  sed 's|/games|/bin|g' -i src{,/setup}/Makefile.am

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

package_crispy-common() {
  pkgdesc="Files shared in common with Crispy Doom-based games."
  depends=('sdl_net')

  cd "${_pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -dm 755 "${pkgdir}"/usr/share/games/doom

  cd "${pkgdir}"/usr/bin
  mv crispy-doom-setup crispy-setup
  rm -f crispy-{doom,heretic,hexen,strife}{,-setup}

  cd "${pkgdir}"/usr/share
  rm -rf doc man/man5
  rm -rf applications/crispy-{doom,heretic,hexen,strife}.desktop \
    applications/screensavers
  cd man/man6
  rm -f crispy-{doom,heretic,hexen,strife}{,-setup}.6
  mv {chocolate,crispy}-server.6
  mv {chocolate,crispy}-setup.6
}

package_crispy-doom() {
  pkgdesc="Doom port accurately reproducing the original DOS EXEs."
  depends=(${depends[@]} 'crispy-common')

  cd "${_pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install

  cd "${pkgdir}"/usr/bin
  rm -f crispy-{heretic,hexen,strife,server} crispy*setup
  ln -s crispy{,-doom}-setup

  cd "${pkgdir}"/usr/share
  rm -rf doc/crispy-{heretic,hexen,strife}
  rm -rf applications/crispy-{setup,heretic,hexen,strife}.desktop icons
  rm -rf man/man5
  rm -f man/man?/crispy-{heretic,hexen,strife,setup,server}* \
    man/man6/chocolate* man/man6/*-setup.6
}

package_crispy-heretic() {
  pkgdesc="Heretic port accurately reproducing the original DOS EXEs."
  depends=(${depends[@]} 'crispy-common')

  cd "${_pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install

  cd "${pkgdir}"/usr/bin
  rm -f crispy-{doom,hexen,strife,server} crispy*setup
  ln -s crispy{,-heretic}-setup

  cd "${pkgdir}"/usr/share
  rm -rf doc/crispy-{doom,hexen,strife}
  rm -rf applications/crispy-{setup,doom,hexen,strife}.desktop \
    applications/screensavers icons
  rm -rf man/man5
  rm -f man/man?/crispy-{doom,hexen,strife,setup,server}* \
    man/man6/chocolate* man/man6/*-setup.6
}

package_crispy-hexen() {
  pkgdesc="Hexen port accurately reproducing the original DOS EXEs."
  depends=(${depends[@]} 'crispy-common')

  cd "${_pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install

  cd "${pkgdir}"/usr/bin
  rm -f crispy-{doom,heretic,strife,server} crispy*setup
  ln -s crispy{,-hexen}-setup

  cd "${pkgdir}"/usr/share
  rm -rf doc/crispy-{doom,heretic,strife}
  rm -rf applications/crispy-{setup,doom,heretic,strife}.desktop \
    applications/screensavers icons
  rm -rf man/man5
  rm -f man/man?/crispy-{doom,heretic,strife,setup,server}* \
    man/man6/chocolate* man/man6/*-setup.6
}

package_crispy-strife() {
  pkgdesc="Strife port accurately reproducing the original DOS EXEs."
  depends=(${depends[@]} 'crispy-common')

  cd "${_pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install

  cd "${pkgdir}"/usr/bin
  rm -f crispy-{doom,heretic,hexen,server} crispy*setup
  ln -s crispy{,-strife}-setup

  cd "${pkgdir}"/usr/share
  rm -rf doc/crispy-{doom,heretic,hexen}
  rm -rf applications/crispy-{setup,doom,heretic,hexen}.desktop \
    applications/screensavers icons
  rm -rf man/man5
  rm -f man/man?/crispy-{doom,heretic,hexen,setup,server}* \
    man/man6/chocolate* man/man6/*-setup.6
}