diff options
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | PKGBUILD | 114 | ||||
-rw-r--r-- | bsg-diaspora-sa | 6 | ||||
-rw-r--r-- | bsg-diaspora-sa.conf | 12 | ||||
-rw-r--r-- | bsg-diaspora-sa.desktop | 7 | ||||
-rw-r--r-- | bsg-diaspora-sa.install | 21 | ||||
-rw-r--r-- | bsg-diaspora-sa.png | bin | 0 -> 6230 bytes |
7 files changed, 197 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..385276a3a563 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +pkgbase = bsg-diaspora-sa + pkgdesc = Diaspora: Shattered Armistice is a single and multiplayer space fighter combat game set in the reimagined Battlestar Galactica universe. + pkgver = 1.1.1 + pkgrel = 1 + url = http://diaspora.hard-light.net/ + install = bsg-diaspora-sa.install + arch = i686 + arch = x86_64 + license = CCPL + license = custom:fs2_open + depends = libjpeg + depends = libpng + depends = libtheora + depends = libvorbis + depends = lua51 + depends = mesa + depends = openal + depends = sdl + depends = jansson + depends = wxlauncher + source = http://diaspora.fs2downloads.com/Diaspora_R1_Linux.tar.lzma + source = http://diaspora.fs2downloads.com/Diaspora_R1_Patch_1.1.tar.lzma + source = http://diaspora.fs2downloads.com/Diaspora_R1_Patch_1.1.1.tar.lzma + source = bsg-diaspora-sa + source = bsg-diaspora-sa.conf + source = bsg-diaspora-sa.desktop + source = bsg-diaspora-sa.png + md5sums = 22b55ae9bc9366ccbeb1642cd50dc3f8 + md5sums = 423182f96a97e657da0e27b708b48abf + md5sums = d73890efd3e86b336d96b339e0a59a46 + md5sums = 2c8befd5c503d7e494fb8fc87a7c1464 + md5sums = ef9920040cf4c37419c89ca007df3022 + md5sums = 50ae3eafa6f50add7f592e32b0c600e8 + md5sums = 3ff26bc4a7d14af7b3b8fcb32ff0f367 + +pkgname = bsg-diaspora-sa + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..be7d352a685e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,114 @@ +# Maintainer: Winicius Cota <winicius.cota@gmail.com> +# Contributor: Tom Parys <tom.parys@gmail.com> +# Contributor: ZekeSulastin <zekesulastin@gmail.com> +# Contributor: David H. Bronke <whitelynx@gmail.com> +# Contributor: Mr_Robotic_Evil <mr.robotic.evil@googlemail.com> +# Contributor: Lone_Wolf <lonewolf@xs4all.nl> +# Contributor: Marius Nestor <marius@softpedia.com> + +# Warning: This package is BIG; you'll need at least 9 GiB free in +# order to build version 1.1.1 (2 GiB for the downloads alone, about 3 GiB for the +# unpacked game data and source, and 3.3 GiB for the finished package if +# uncompressed) 'mv' is used over 'cp' in the package phase to save a bit +# of space, but make sure there is enough room for everything. + +# This PKGBUILD is based on fs2_open and fs2_open-data from AUR; the +# maintainers and contributors of those packages have been listed as +# contributors above. + +pkgname=bsg-diaspora-sa +pkgver=1.1.1 +pkgrel=1 +pkgdesc="Diaspora: Shattered Armistice is a single and multiplayer space fighter combat game set in the reimagined Battlestar Galactica universe." +url="http://diaspora.hard-light.net/" +arch=('i686' 'x86_64') +license=('CCPL' 'custom:fs2_open') +depends=('libjpeg' 'libpng' 'libtheora' 'libvorbis' 'lua51' 'mesa' 'openal' 'sdl' 'jansson' 'wxlauncher') +# optdepends=('wxlauncher: a launcher for fs2_open-based games') +install=bsg-diaspora-sa.install +source=('http://diaspora.fs2downloads.com/Diaspora_R1_Linux.tar.lzma' + 'http://diaspora.fs2downloads.com/Diaspora_R1_Patch_1.1.tar.lzma' + 'http://diaspora.fs2downloads.com/Diaspora_R1_Patch_1.1.1.tar.lzma' + 'bsg-diaspora-sa' + 'bsg-diaspora-sa.conf' + 'bsg-diaspora-sa.desktop' + 'bsg-diaspora-sa.png') + +md5sums=('22b55ae9bc9366ccbeb1642cd50dc3f8' + '423182f96a97e657da0e27b708b48abf' + 'd73890efd3e86b336d96b339e0a59a46' + '2c8befd5c503d7e494fb8fc87a7c1464' + 'ef9920040cf4c37419c89ca007df3022' + '50ae3eafa6f50add7f592e32b0c600e8' + '3ff26bc4a7d14af7b3b8fcb32ff0f367') +# This package is about 3 GiB uncompressed and takes a while to recompress for +# not too much space savings; the following PKGEXT disables compression of the +# package. Add .xz or similar to the end of PKGEXT to compress the package. +PKGEXT=".pkg.tar" + +prepare() { + local SOURCE="$srcdir/Diaspora_R1_Linux/Diaspora/" + + msg "Removing unneeded files..." + rm -r $SOURCE/resources $SOURCE/wxlauncher + + # 1.1 patch + msg "Applying patch 1.1" + #tar -xf $srcdir/Diaspora_R1_Patch_$pkgver/Patch_Files.$pkgver.tar -C $SOURCE + tar -xf $srcdir/Patch_Files.1.1.tar -C $SOURCE + + # 1.1.1 patch + msg "Applying patch 1.1.1" + tar -xf $srcdir/Patch_Files.1.1.1.tar -C $SOURCE +} + +build() { + + local SOURCE="$srcdir/Diaspora_R1_Linux/Diaspora/" + + # (1) Build the game engine (fs2_open) + msg "Building..." + cd $SOURCE/fs2_open + # LDFLAGS="-l:liblua.so.5.1 $LDFLAGS" CXXFLAGS="-I/usr/include/lua5.1 $CXXFLAGS" ./autogen.sh --enable-speech + + env LUA_CFLAGS="$(pkg-config --cflags lua51)" \ + LUA_LIBS="$(pkg-config --libs lua51)" \ + ./autogen.sh + + make + + # (2) Set up the Diaspora launcher profile (for wxlauncher) + cd $SOURCE + sed "s@^folder=.*\$@folder=/opt/$pkgname@;s@pro00099.template.ini@@" pro00099.template.ini > pro00099.ini + + + # Grab command-line options from pro00099.ini for our runner script. + cd $srcdir + FS2_OPTS="$(sed -n 's@^flags=\(.*\)$@\1@p' $SOURCE/pro00099.ini | tr -d '\r\n')" + sed -i "s@\\(FS2OPTS=\\).*@\\1\"$FS2_OPTS\"@" $srcdir/bsg-diaspora-sa.conf +} + +package() { + local SOURCE="$srcdir/Diaspora_R1_Linux/Diaspora/" + + cd $SOURCE + + #install -D -m644 -t "$pkgdir/opt/$pkgname/" *.vp *.ini *.png *.bmp data + install -m644 -d "$pkgdir/opt/$pkgname/" + mv *.vp *.png *.bmp mod.ini pro00099.ini data "$pkgdir/opt/$pkgname/" + + #install -D -m644 -t "$pkgdir/usr/share/doc/$pkgname/" *.pdf *.txt *.rtf + install -m644 -d "$pkgdir/usr/share/doc/$pkgname/" + mv *.pdf *.txt *.rtf "$pkgdir/usr/share/doc/$pkgname/" + + # Fix permissions (since 'mv' won't set them) + chmod -R 644 "$pkgdir/opt/$pkgname/" "$pkgdir/usr/share/doc/$pkgname/" + find "$pkgdir/opt/$pkgname/" "$pkgdir/usr/share/doc/$pkgname/" -type d -exec chmod 755 '{}' \; + + install -D -m755 $srcdir/bsg-diaspora-sa "$pkgdir/usr/bin/bsg-diaspora-sa" + install -D -m644 $srcdir/bsg-diaspora-sa.conf "$pkgdir/usr/share/$pkgname/bsg-diaspora-sa.conf" + install -D -m644 $srcdir/bsg-diaspora-sa.png "${pkgdir}/usr/share/pixmaps/bsg-diaspora-sa.png" + install -D -m644 $srcdir/bsg-diaspora-sa.desktop "$pkgdir/usr/share/applications/bsg-diaspora-sa.desktop" + install -D -m644 fs2_open/COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -D -m755 fs2_open/code/fs2_open_3.7.1 "$pkgdir/opt/$pkgname/fs2_open_diaspora" +}
\ No newline at end of file diff --git a/bsg-diaspora-sa b/bsg-diaspora-sa new file mode 100644 index 000000000000..b8dc5e8263ae --- /dev/null +++ b/bsg-diaspora-sa @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +. /etc/bsg-diaspora-sa/bsg-diaspora-sa.conf +. ~/.config/bsg-diaspora-sa/bsg-diaspora-sa.conf +cd /opt/bsg-diaspora-sa +/opt/bsg-diaspora-sa/fs2_open_diaspora "$@" "$FS2OPTS" || /opt/bsg-diaspora-sa/fs2_open_diaspora "$@" "$FS2OPTS" diff --git a/bsg-diaspora-sa.conf b/bsg-diaspora-sa.conf new file mode 100644 index 000000000000..dffea3245c02 --- /dev/null +++ b/bsg-diaspora-sa.conf @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# This file is read by the `bsg-diaspora-sa` launcher script; wxLauncher does not +# look at this at all. + +# Full command line reference available at: +# http://www.hard-light.net/wiki/index.php/Command-Line_Reference + +# A lot of graphical and gameplay options are set via these flags - you should +# really take a look. + +FS2OPTS="" diff --git a/bsg-diaspora-sa.desktop b/bsg-diaspora-sa.desktop new file mode 100644 index 000000000000..cc2c46801bc3 --- /dev/null +++ b/bsg-diaspora-sa.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Battlestar Galactica +Type=Application +Comment=Battlestar Galactica: Shattered Armistice +Exec=bsg-diaspora-sa +Icon=/usr/share/pixmaps/bsg-diaspora-sa.png +Categories=Game; diff --git a/bsg-diaspora-sa.install b/bsg-diaspora-sa.install new file mode 100644 index 000000000000..91762f94afd0 --- /dev/null +++ b/bsg-diaspora-sa.install @@ -0,0 +1,21 @@ +post_install() { + +cat << EOF +>>> To configure how Diaspora runs from the command line, copy +>>> /usr/share/bsg-diaspora-sa/bsg-diaspora-sa.conf to ~/.config/bsg-diaspora-sa/bsg-diaspora-sa.conf +>>> and add command-line flags in there - most of the game's configuration is +>>> done via these flags if a GUI launcher is not used. Details are available +>>> within the file. +>>> +>>> If you want to run Diaspora with the wxlauncher GUI (suggested), make sure +>>> you've run wxlauncher at least once, and then: +>>> +>>> cp /opt/bsg-diaspora-sa/pro00099.ini ~/.wxlauncher/ +>>> +>>> Next time you start wxlauncher, you should see a Diaspora profile listed. +EOF +} + +post_upgrade() { + post_install +} diff --git a/bsg-diaspora-sa.png b/bsg-diaspora-sa.png Binary files differnew file mode 100644 index 000000000000..4b25b6b3ca5a --- /dev/null +++ b/bsg-diaspora-sa.png |