desktop/warsow/PKGBUILD

81 lines
2.7 KiB
Bash
Raw Normal View History

2012-07-29 05:00:29 +08:00
#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
2012-07-31 14:44:10 +08:00
#
# NOTE: The package must be built in a system with a matching architecture.
2012-07-29 05:00:29 +08:00
pkgbase=warsow
pkgname=('warsow' 'warsow-data')
2014-07-08 02:34:01 +08:00
pkgver=1.51 # Warsow data version
_pkgver=15 # Launchpad version
2014-07-09 02:01:31 +08:00
pkgrel=2
2014-07-08 02:34:01 +08:00
arch=('x86_64')
2011-06-19 09:21:59 +08:00
url="http://www.warsow.net/"
makedepends=('mesa' 'openal' 'imagemagick' 'gendesk' 'curl' 'libjpeg' 'libtheora' 'libvorbis'
2014-07-08 02:34:01 +08:00
'libxxf86dga' 'sdl' 'libxinerama' 'libxrandr' 'libxxf86vm' 'libxi')
2012-03-07 19:00:46 +08:00
categories=('games')
2014-07-08 02:34:01 +08:00
source=("http://www.warsow.eu/${pkgname}_${pkgver}_sdk.tar.gz"
"http://www.warsow.eu/${pkgname}_${pkgver}_unified.tar.gz")
sha256sums=('ac635c654e088566d30d53e8fab21abd2d40762d7f4ab0e09faa827aac5c4f97'
'94510d85e4a245b5f8c0c715ae41b1d162c96e06dbfe75ccd99fffb9a76426b5')
2011-06-19 09:21:59 +08:00
build() {
gendesk -n
2011-06-19 09:21:59 +08:00
# Compile Warsow.
2014-07-08 02:34:01 +08:00
cd source/source
2012-07-29 05:00:29 +08:00
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
2011-06-19 09:21:59 +08:00
}
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')
# Create the destination directories.
install -d "${pkgdir}/usr/share/${_pkgname}"
# Move Data to destination directory.
cp -r ${_pkgname}_${_pkgver}/basewsw "${pkgdir}/usr/share/${_pkgname}"
2014-07-09 02:01:31 +08:00
chmod -R g+rx,o+rx "${pkgdir}/usr/share/${_pkgname}/basewsw"
# Install custom license: Warsow Content License.
2014-07-08 02:34:01 +08:00
install -Dm0644 ${_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"
2014-07-08 02:34:01 +08:00
arch=('x86_64')
license=('GPL')
depends=('curl' 'libjpeg' 'libtheora' 'libvorbis' 'libxinerama' 'libxrandr' 'libxxf86dga' 'libxxf86vm' 'sdl' 'warsow-data')
optdepends=('openal: for openal audio support')
2014-07-08 02:34:01 +08:00
cd source/source
2012-07-29 05:00:29 +08:00
# Manual installation.
install -d "${pkgdir}/usr/share/${pkgname}/"
cp -r release/* "${pkgdir}/usr/share/${pkgname}"
2014-07-09 02:01:31 +08:00
chmod +r "${pkgdir}/usr/share/${pkgname}/"*
2012-07-29 05:00:29 +08:00
# Execution scripts:
install -d "${pkgdir}/usr/bin"
2012-07-29 05:00:29 +08:00
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"
2012-07-29 05:00:29 +08:00
}