Commit e7b39e15 authored by Adrian Chaves Fernandez (Gallaecio)'s avatar Adrian Chaves Fernandez (Gallaecio)
Browse files

Warsow 1.0.

parent 4523f588
#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
pkgname=warsow-data
pkgver=0.62
_pkgname=warsow
pkgver=1.0
pkgrel=1
pkgdesc="a free online multiplayer competitive FPS based on the Qfusion engine (data files)"
pkgdesc="A free online multiplayer competitive FPS based on the Qfusion engine (data files)"
url="http://www.warsow.net/"
license=('custom:Warsow Content License')
arch=('any')
depends=()
makedepends=('unzip')
source=("http://www.zcdn.org/dl/warsow_0.61_unified.zip"
"http://www.zcdn.org/dl/warsow_0.62_update.zip")
noextract=("warsow_0.61_unified.zip"
"warsow_0.62_update.zip")
md5sums=('dd17ffccf51579e6b278624727190c01'
'b13804d1562ac9fb341d5d31105c5326')
build() {
cd $srcdir/
}
arch=('any')
source=("${_pkgname}_${pkgver}.tar.gz::http://www.warsow.net/download?dl=linux")
md5sums=('92fd62c4bbd1324605bd004da9472b9f')
package() {
# Extract game data
unzip -o warsow_0.61_unified.zip -d $srcdir/warsow
# Extract update on top of it
unzip -o warsow_0.62_update.zip -d $srcdir/warsow/warsow_0.61_unified
# Create the destination directories.
install -d $pkgdir/usr/share/${_pkgname}
# Create Destination Directories
install -d $pkgdir/opt/warsow/
# Move Data to destination directory.
cp -r $srcdir/${_pkgname}_${pkgver}/basewsw $pkgdir/usr/share/${_pkgname}
# Move Data to Destination Directory
cp -r $srcdir/warsow/warsow_0.61_unified/basewsw $pkgdir/opt/warsow
# Install Custom License: Warsow Content License
install -D -m 0644 $srcdir/warsow/warsow_0.61_unified/docs/license.txt \
# Install custom license: Warsow Content License.
install -Dm 0644 $srcdir/${_pkgname}_${pkgver}/docs/license.txt \
$pkgdir/usr/share/licenses/${pkgname}/license.txt
}
\ No newline at end of file
}
#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
pkgname=warsow
pkgver=0.62
pkgver=1.0
pkgrel=1
pkgdesc="a free online multiplayer competitive FPS based on the Qfusion engine"
pkgdesc="A free online multiplayer competitive FPS based on the Qfusion engine"
url="http://www.warsow.net/"
license=('GPL')
arch=('i686' 'x86_64')
depends=('curl' 'libjpeg' 'libvorbis' 'libxinerama' 'libxxf86dga' 'libxxf86vm' 'sdl' 'warsow-data')
makedepends=('mesa' 'openal' 'unzip')
makedepends=('mesa' 'openal')
optdepends=('openal: for openal audio support')
categories=('games')
source=('warsow.desktop' 'warsow.launcher' 'wsw-server.launcher' 'wswtv-server.launcher' \
"http://www.zcdn.org/dl/warsow_${pkgver}_sdk.zip")
noextract=("warsow_${pkgver}_sdk.zip")
md5sums=('f9bf60c80820237f7097c4e50a9582cd'
'ec00081d81ad9802a8ca42fc2eac5498'
'f73e10c26197178df71b941b10bf83d7'
'd7e4a69835bbcf801e58307e9d6b951e'
'649568447e938efded07e77cdfb3accb')
source=("https://launchpadlibrarian.net/111352130/${pkgname}_${pkgver}_sdk.tar.gz"
"${pkgname}.desktop")
md5sums=('35b9a8f530b51cda15c660b3a73f377e'
'f9bf60c80820237f7097c4e50a9582cd')
build() {
unset CFLAGS
unset CXXFLAGS
# Extract Game Source Code
unzip -o warsow_${pkgver}_sdk.zip -d $srcdir/warsow-src
# Patch Makefile to use correct program to query for system information
sed -i 's:openal-config:pkg-config:g' $srcdir/warsow-src/source/Makefile
# Patch Makefile to correctly pass on ld opts
sed -i 's:--as-needed:-Wc,--as-needed:g' $srcdir/warsow-src/source/Makefile
# Patch Sound Code to point to base openal library
sed -i 's:libopenal.so.0:libopenal.so:g' $srcdir/warsow-src/source/snd_openal/snd_main.c
# Patch for libjpeg8
sed -i 's/jpeg_mem_src/_jpeg_mem_src/g' $srcdir/warsow-src/source/ref_gl/r_image.c
# Patch AngelScript so it compiles correctly on i686
# Patch AngelScript so it compiles correctly on i686.
if [ "$CARCH" == "i686" ]; then
sed -i 's:CXXFLAGS = \(.*\):CXXFLAGS = -march=i686 \1:' \
$srcdir/warsow-src/libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc/makefile
$srcdir/${pkgname}_${pkgver}_sdk/libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc/makefile
fi
# Compile Warsow
cd $srcdir/warsow-src/source/
make -j1
cd $srcdir/${pkgname}_${pkgver}_sdk/source/
unset CFLAGS
unset CXXFLAGS
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() {
cd $srcdir/warsow-src/source/
cd $srcdir/${pkgname}_${pkgver}_sdk/source/
# Create Destination Directories
install -d $pkgdir/opt/warsow/
# Move Compiled Data to Destination Directory
cp -r $srcdir/warsow-src/source/release/* \
$pkgdir/opt/warsow
# Install Client Game Launcher
install -D -m 0755 $srcdir/warsow.launcher \
$pkgdir/usr/bin/warsow
# Install Server Game Launcher
install -D -m 0755 $srcdir/wsw-server.launcher \
$pkgdir/usr/bin/wsw-server
# Install WSWTV Server Launcher
install -D -m 0755 $srcdir/wswtv-server.launcher \
$pkgdir/usr/bin/wswtv-server
# Install Client Desktop Shortcut
install -D -m 0644 $srcdir/warsow.desktop \
$pkgdir/usr/share/applications/warsow.desktop
# Install Icon
install -D -m 0644 $srcdir/warsow-src/source/win32/warsow.ico \
$pkgdir/usr/share/pixmaps/warsow.ico
}
\ No newline at end of file
# Manual installation.
install -d $pkgdir/usr/share/${pkgname}/
cp -r $srcdir/${pkgname}_${pkgver}_sdk/source/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 -D -m 0644 $srcdir/${pkgname}.desktop $pkgdir/usr/share/applications/${pkgname}.desktop
install -D -m 0644 $srcdir/${pkgname}_${pkgver}_sdk/source/win32/${pkgname}.ico $pkgdir/usr/share/pixmaps/${pkgname}.ico
}
#!/bin/bash
cd "/opt/warsow"
./warsow $*
exit $?
#!/bin/bash
cd "/opt/warsow"
./wsw_server $*
exit $?
#!/bin/bash
cd "/opt/warsow"
./wswtv_server $*
exit $?
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment