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
|
|
|
|
2012-10-18 17:57:13 +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/"
|
2012-10-18 17:57:13 +08:00
|
|
|
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() {
|
2012-07-31 06:35:28 +08:00
|
|
|
gendesk -n
|
2011-06-19 09:21:59 +08:00
|
|
|
|
2012-07-31 06:35:28 +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() {
|
2012-10-18 17:57:13 +08:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2012-10-18 17:57:13 +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"
|
2012-10-18 17:57:13 +08:00
|
|
|
|
|
|
|
# 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"
|
2012-10-18 17:57:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
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')
|
2012-10-18 17:57:13 +08:00
|
|
|
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-31 06:35:28 +08:00
|
|
|
|
2012-07-29 05:00:29 +08:00
|
|
|
# Manual installation.
|
2012-10-18 17:57:13 +08:00
|
|
|
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:
|
2012-10-18 17:57:13 +08:00
|
|
|
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:
|
2012-10-18 17:57:13 +08:00
|
|
|
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
|
|
|
}
|