desktop/warsow/PKGBUILD
Adrian Chaves Fernandez (Gallaecio) 866be390d8 Warsow rebuilt against the latest libpng.
2012-12-07 22:10:07 +00:00

84 lines
2.8 KiB
Bash

#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
#
# NOTE: The package must be built in a system with a matching architecture.
pkgbase=warsow
pkgname=('warsow' 'warsow-data')
pkgver=1.02 # Warsow data version
_pkgver=1.0 # Launchpad version
pkgrel=2
arch=('i686' 'x86_64')
url="http://www.warsow.net/"
makedepends=('mesa' 'openal' 'imagemagick' 'gendesk' 'curl' 'libjpeg' 'libtheora' 'libvorbis'
'libxxf86dga' 'sdl' 'libxinerama' 'libxrandr' 'libxxf86vm')
categories=('games')
source=("https://launchpadlibrarian.net/111352130/${pkgname}_${_pkgver}_sdk.tar.gz"
"${pkgname}-data_${pkgver}.tar.gz::http://www.warsow.net/download?dl=linux")
sha256sums=('2e394b5c50ad206723a59636ab93448f69d8602e710ab334451badf746870e22'
'f933d251de4c92b6107d4db1eef5326baf4873d32a6e2f1c3daae14bc92e85ec')
build() {
cd "${srcdir}"
gendesk -n
# Compile Warsow.
cd "${srcdir}/${pkgname}_${_pkgver}_sdk/source/"
make -j1 # Error finding a library if -j is higher.
}
generateAndInstall() {
echo "#!/bin/bash" > "${pkgdir}"/usr/bin/$1
echo "cd /usr/share/$pkgname" >> "${pkgdir}"/usr/bin/$1
echo "./$1 \$*" >> "${pkgdir}"/usr/bin/$1
echo "exit \$?" >> "${pkgdir}"/usr/bin/$1
chmod +x "${pkgdir}"/usr/bin/$1
}
package_warsow-data() {
_pkgname=warsow
pkgdesc="A free online multiplayer competitive FPS based on the Qfusion engine (data files)"
arch=('any')
license=('custom:Warsow Content License')
echo "${pkgdir}"
cd "${srcdir}"
# Create the destination directories.
install -d "${pkgdir}/usr/share/${_pkgname}"
# Move Data to destination directory.
cp -r ${_pkgname}_${_pkgver}/basewsw "${pkgdir}/usr/share/${_pkgname}"
# Install custom license: Warsow Content License.
install -Dm 0644 ${_pkgname}_${_pkgver}/docs/license.txt "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
}
package_warsow() {
pkgdesc="A free online multiplayer competitive FPS based on the Qfusion engine"
arch=('i686' 'x86_64')
license=('GPL')
depends=('curl' 'libjpeg' 'libtheora' 'libvorbis' 'libxinerama' 'libxrandr' 'libxxf86dga' 'libxxf86vm' 'sdl' 'warsow-data')
optdepends=('openal: for openal audio support')
cd "${srcdir}/${pkgname}_${_pkgver}_sdk/source/"
# Manual installation.
install -d "${pkgdir}/usr/share/${pkgname}/"
cp -r release/* "${pkgdir}/usr/share/${pkgname}"
# Execution scripts:
install -d "${pkgdir}/usr/bin"
for script in ${pkgname} wsw_server wswtv_server
do
generateAndInstall ${script}
done
# Desktop integration:
install -Dm0644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
install -Dm0644 unix/warsow128x128.xpm "${pkgdir}/usr/share/pixmaps/warsow.xpm"
}