PKGBUILDs/aur/chocolate-doom/PKGBUILD

142 lines
4.4 KiB
Bash
Raw Normal View History

# Maintainer: Mike Swanson <mikeonthecomputer@gmail.com>
2014-06-05 01:49:13 +00:00
pkgname=(chocolate-{doom,heretic,hexen,strife,common})
2014-11-09 05:23:08 +00:00
pkgbase=${pkgname[0]}
2014-06-05 01:49:13 +00:00
pkgdesc="Historically-accurate Doom, Heretic, Hexen, and Strife ports."
2015-09-16 02:33:15 +00:00
pkgver=2.2.1
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.chocolate-doom.org/"
2014-01-01 17:27:38 +00:00
license=('GPL2')
2014-06-05 01:49:13 +00:00
depends=('libsamplerate' 'sdl_mixer' 'sdl_net')
2014-11-09 05:23:08 +00:00
makedepends=('python')
2015-09-16 02:33:15 +00:00
source=(http://chocolate-doom.org/downloads/${pkgver}/${pkgbase}-${pkgver}.tar.gz)
sha256sums=('ad11e2871667c6fa0658abf2dcba0cd9b26fbd651ee8df55adfdc18ad8fd674a')
2014-11-09 05:23:08 +00:00
prepare() {
cd "${pkgbase}-${pkgver}"
2015-06-19 00:35:13 +00:00
for patch in ../*.patch; do
if [ ! -f "$patch" ]; then
break;
else
patch -p1 -i "$patch"
fi
done
2014-01-01 17:27:38 +00:00
# Change binary dir from /usr/games to /usr/bin
2014-11-09 05:23:08 +00:00
sed 's|/games|/bin|g' -i src{,/setup}/Makefile.in
}
build() {
cd "${pkgbase}-${pkgver}"
./configure --prefix=/usr
make
}
2014-01-01 17:27:38 +00:00
package_chocolate-common() {
pkgdesc="Files shared in common with Chocolate Doom-based games."
depends=('sdl_net')
2014-11-09 05:23:08 +00:00
install=chocolate-doom.install
2014-01-01 17:27:38 +00:00
2014-11-09 05:23:08 +00:00
cd "${pkgbase}-${pkgver}"
2014-01-01 17:27:38 +00:00
make DESTDIR="${pkgdir}" install
install -dm 755 "${pkgdir}"/usr/share/games/doom
cd "${pkgdir}"/usr/bin
mv chocolate-doom-setup chocolate-setup
rm -f chocolate-{doom,heretic,hexen,strife}{,-setup}
cd "${pkgdir}"/usr/share
rm -rf doc man/man5
2014-11-09 05:23:08 +00:00
rm -rf applications/chocolate-{doom,heretic,hexen,strife}.desktop \
2015-09-16 02:33:15 +00:00
applications/screensavers
rm -rf appdata
2014-01-01 17:27:38 +00:00
cd man/man6
2014-11-09 05:23:08 +00:00
rm -f chocolate-{doom,heretic,hexen,strife}{,-setup}.6
2014-01-01 17:27:38 +00:00
}
package_chocolate-doom() {
2014-06-05 01:49:13 +00:00
pkgdesc="Doom port accurately reproducing the original DOS EXEs."
2014-01-01 17:27:38 +00:00
depends=(${depends[@]} 'chocolate-common')
2014-11-09 05:23:08 +00:00
optdepends=('freedm: Free deathmatch game'
2015-09-16 02:33:15 +00:00
'freedoom1: Free Ultimate Doom-compatible game (not vanilla compatible, but useful for mods)'
'freedoom2: Free Doom II/Final Doom-compatible game (not vanilla compatible, but useful for mods)')
2014-01-01 17:27:38 +00:00
2014-11-09 05:23:08 +00:00
cd "${pkgbase}-${pkgver}"
2014-01-01 17:27:38 +00:00
make DESTDIR="${pkgdir}" install
cd "${pkgdir}"/usr/bin
rm -f chocolate-{heretic,hexen,strife,server} chocolate*setup
ln -s chocolate{,-doom}-setup
cd "${pkgdir}"/usr/share
rm -rf doc/chocolate-{heretic,hexen,strife}
2014-11-09 05:23:08 +00:00
rm -rf applications/chocolate-{setup,heretic,hexen,strife}.desktop icons
2015-09-16 02:33:15 +00:00
rm -f appdata/chocolate-{heretic,hexen,strife}.appdata.xml
2014-01-01 17:27:38 +00:00
rm -f man/man?/chocolate-{heretic,hexen,strife,setup,server}* \
2015-09-16 02:33:15 +00:00
man/man5/{heretic,hexen,strife}.cfg*
2014-01-01 17:27:38 +00:00
}
package_chocolate-heretic() {
2014-06-05 01:49:13 +00:00
pkgdesc="Heretic port accurately reproducing the original DOS EXEs."
2014-01-01 17:27:38 +00:00
depends=(${depends[@]} 'chocolate-common')
2014-11-09 05:23:08 +00:00
optdepends=('blasphemer: Free Heretic-compatible game')
2014-01-01 17:27:38 +00:00
2014-11-09 05:23:08 +00:00
cd "${pkgbase}-${pkgver}"
2014-01-01 17:27:38 +00:00
make DESTDIR="${pkgdir}" install
2014-01-01 17:27:38 +00:00
cd "${pkgdir}"/usr/bin
rm -f chocolate-{doom,hexen,strife,server} chocolate*setup
ln -s chocolate{,-heretic}-setup
2014-01-01 17:27:38 +00:00
cd "${pkgdir}"/usr/share
rm -rf doc/chocolate-{doom,hexen,strife}
2014-11-09 05:23:08 +00:00
rm -rf applications/chocolate-{setup,doom,hexen,strife}.desktop \
2015-09-16 02:33:15 +00:00
applications/screensavers icons
rm -f appdata/chocolate-{doom,hexen,strife}.appdata.xml
2014-01-01 17:27:38 +00:00
rm -f man/man?/chocolate-{doom,hexen,strife,setup,server}* \
2015-09-16 02:33:15 +00:00
man/man5/{default,hexen,strife}.cfg*
}
2014-01-01 17:27:38 +00:00
package_chocolate-hexen() {
2014-06-05 01:49:13 +00:00
pkgdesc="Hexen port accurately reproducing the original DOS EXEs."
2014-01-01 17:27:38 +00:00
depends=(${depends[@]} 'chocolate-common')
2014-11-09 05:23:08 +00:00
cd "${pkgbase}-${pkgver}"
2014-01-01 17:27:38 +00:00
make DESTDIR="${pkgdir}" install
cd "${pkgdir}"/usr/bin
rm -f chocolate-{doom,heretic,strife,server} chocolate*setup
ln -s chocolate{,-hexen}-setup
cd "${pkgdir}"/usr/share
rm -rf doc/chocolate-{doom,heretic,strife}
2014-11-09 05:23:08 +00:00
rm -rf applications/chocolate-{setup,doom,heretic,strife}.desktop \
2015-09-16 02:33:15 +00:00
applications/screensavers icons
rm -f appdata/chocolate-{doom,heretic,strife}.appdata.xml
2014-01-01 17:27:38 +00:00
rm -f man/man?/chocolate-{doom,heretic,strife,setup,server}* \
2015-09-16 02:33:15 +00:00
man/man5/{default,heretic,strife}.cfg*
2014-01-01 17:27:38 +00:00
}
package_chocolate-strife() {
2014-06-05 01:49:13 +00:00
pkgdesc="Strife port accurately reproducing the original DOS EXEs."
2014-01-01 17:27:38 +00:00
depends=(${depends[@]} 'chocolate-common')
2014-11-09 05:23:08 +00:00
cd "${pkgbase}-${pkgver}"
2014-01-01 17:27:38 +00:00
make DESTDIR="${pkgdir}" install
cd "${pkgdir}"/usr/bin
rm -f chocolate-{doom,heretic,hexen,server} chocolate*setup
ln -s chocolate{,-strife}-setup
cd "${pkgdir}"/usr/share
rm -rf doc/chocolate-{doom,heretic,hexen}
2014-11-09 05:23:08 +00:00
rm -rf applications/chocolate-{setup,doom,heretic,hexen}.desktop \
2015-09-16 02:33:15 +00:00
applications/screensavers icons
rm -f appdata/chocolate-{doom,heretic,hexen}.appdata.xml
2014-01-01 17:27:38 +00:00
rm -f man/man?/chocolate-{doom,heretic,hexen,setup,server}* \
2015-09-16 02:33:15 +00:00
man/man5/{default,heretic,hexen}.cfg*
2014-01-01 17:27:38 +00:00
}