aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitris Zlatanidis <d.zlatanidis@gmail.com>2014-04-10 08:29:29 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-04-10 08:29:29 +0700
commita93c86d7a278a08ba5ec3cd2eab96369f71226ce (patch)
treea4b1f75eb35743571ea8f09110a9ed2fb881e706
parent0aa8088ccff547394b12d5141364cb888e0df2f9 (diff)
games/unvanquished: Updated for version 0.26.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--games/unvanquished/README10
-rw-r--r--games/unvanquished/doinst.sh22
-rw-r--r--games/unvanquished/unvanquished.SlackBuild70
-rw-r--r--games/unvanquished/unvanquished.desktop3
-rw-r--r--games/unvanquished/unvanquished.info8
5 files changed, 83 insertions, 30 deletions
diff --git a/games/unvanquished/README b/games/unvanquished/README
index dde07dd05cd14..75a25dae1543c 100644
--- a/games/unvanquished/README
+++ b/games/unvanquished/README
@@ -1,6 +1,4 @@
-Unvanquished is a fast-paced, futuristic FPS with
-RTS elements, pitting technologically advanced
-humans against hordes of highly adaptable aliens.
-The player can choose from either team, providing
-a fresh gameplay experience on both sides of the
-conflict.
+Unvanquished is a fast-paced, futuristic FPS with RTS elements,
+pitting technologically advanced humans against hordes of highly
+adaptable aliens. The player can choose from either team, providing
+a fresh gameplay experience on both sides of the conflict.
diff --git a/games/unvanquished/doinst.sh b/games/unvanquished/doinst.sh
index 8542d1c18e4c0..9fbdcf1498dc3 100644
--- a/games/unvanquished/doinst.sh
+++ b/games/unvanquished/doinst.sh
@@ -1,5 +1,19 @@
-if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
- if [ -x /usr/bin/gtk-update-icon-cache ]; then
- /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
- fi
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
+
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/unvanquished.conf.new
diff --git a/games/unvanquished/unvanquished.SlackBuild b/games/unvanquished/unvanquished.SlackBuild
index 20748c13b1a99..34d808f6b11ef 100644
--- a/games/unvanquished/unvanquished.SlackBuild
+++ b/games/unvanquished/unvanquished.SlackBuild
@@ -22,8 +22,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=unvanquished
-VERSION=${VERSION:-0.25.0}
+SRCNAM=Unvanquished
+PRGNAM=$(echo ${SRCNAM,,})
+VERSION=${VERSION:-0.26.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -59,9 +60,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -69,35 +70,72 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+if [ "$ARCH" = "x86_64" ]; then
+ sed -i -e 's/Unvanquished/unvanquished/g' -e \
+ 's/\/lib/\/lib64/g' -e 's/share\//share\/games\//g' archlinux/unvanquished.sh
+ sed -i -e 's/\/lib/\/lib64/g' -e 's/share\//share\/games\//g' archlinux/unvanquished-tty.sh
+ sed -i -e 's/\/usr\/lib/\/usr\/lib64/g' -e \
+ 's/share\//share\/games\//g' archlinux/unvanquished.conf
+ sed -i -e 's/\/lib/\/lib64/g' -e 's/conf.d\///g' archlinux/unvanquished.service
+else
+ sed -i -e 's/Unvanquished/unvanquished/g' -e \
+ 's/share\//share\/games\//g' archlinux/unvanquished.sh
+ sed -i 's/share\//share\/games\//g' archlinux/unvanquished-tty.sh
+ sed -i 's/share\//share\/games\//g' archlinux/unvanquished.conf
+ sed -i 's/conf.d\///g' archlinux/unvanquished.service
+fi
+
mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -D BUILD_GAME_QVM=OFF \
+ -D BUILD_TTY_CLIENT=ON \
-DCMAKE_BUILD_TYPE=Release ..
make
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-mkdir -p $PKG/usr/share/games/$PRGNAM-$VERSION
-cp -rf * $PKG/usr/share/games/$PRGNAM-$VERSION
-rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/*.cmake
-rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/Makefile
-rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/lcc/*.cmake
-rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/lcc/Makefile
-rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/lcc/CMakeFiles
-rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/CMakeFiles
-mkdir -p $PKG/usr/share/games/$PRGNAM-$VERSION/pkg
-cp $CWD/unvanquished_0.25.0.pk3 $PKG/usr/share/games/$PRGNAM-$VERSION/pkg
+mkdir -p $PKG/usr/bin \
+ $PKG/etc/$PRGNAM/config \
+ $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM \
+ $PKG/usr/lib${LIBDIRSUFFIX}/systemd/system \
+ $PKG/usr/share/games/$PRGNAM/pkg \
+ $PKG/var/lib/unvanquished-server/config
+
+# Install content
+install -D -m0644 *.so $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM
+install -D -m0755 daemon* $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM
cd ..
+install -D -m0644 debian/configfiles/server.cfg $PKG/etc/$PRGNAM/config/server.cfg
+install -D -m0644 debian/configfiles/maprotation.cfg $PKG/etc/$PRGNAM/config/maprotation.cfg
+
+# Install starters
+install -D -m0755 archlinux/$PRGNAM.sh $PKG/usr/bin/$PRGNAM
+install -D -m0755 archlinux/$PRGNAM-tty.sh $PKG/usr/bin/$PRGNAM-tty
+install -D -m0644 archlinux/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new
+install -D -m0644 archlinux/$PRGNAM.service \
+ $PKG/usr/lib${LIBDIRSUFFIX}/systemd/system/$PRGNAM.service
+
+# Setup server home directory
+ln -sf $PKG/etc/$PRGNAM/config/server.cfg \
+ $PKG/var/lib/$PRGNAM-server/config/server.cfg
+ln -sf $PKG/etc/$PRGNAM/config/maprotation.cfg \
+ $PKG/var/lib/$PRGNAM-server/config/maprotation.cfg
+
+# Copy the data-game
+mkdir -p $PKG/usr/share/games/$PRGNAM/pkg
+cp -a $CWD/$PRGNAM\_0.25.0.pk3 $PKG/usr/share/games/$PRGNAM/pkg
+cp -a $CWD/$PRGNAM\_$VERSION.pk3 $PKG/usr/share/games/$PRGNAM/pkg
mkdir -p $PKG/usr/share/applications
install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/share/pixmaps/
-install -D -m644 debian/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.svg
+install -D -m644 debian/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a GPL.txt README.md COPYING.txt $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/games/unvanquished/unvanquished.desktop b/games/unvanquished/unvanquished.desktop
index ecf54526220af..9298e80f0fbae 100644
--- a/games/unvanquished/unvanquished.desktop
+++ b/games/unvanquished/unvanquished.desktop
@@ -2,9 +2,10 @@
Name=Unvanquished
Name[he]= Unvanquished
Comment=FPS/RTS Game - Aliens vs. Humans
-Exec=/usr/share/games/unvanquished-0.25.0/daemon
+Exec=unvanquished %U
Icon=unvanquished
Terminal=false
Type=Application
+MimeType=x-scheme-handler/unv
Categories=Game;ActionGame;StrategyGame;
GenericName=Game
diff --git a/games/unvanquished/unvanquished.info b/games/unvanquished/unvanquished.info
index db4823f821aba..ef8ba6ce61e34 100644
--- a/games/unvanquished/unvanquished.info
+++ b/games/unvanquished/unvanquished.info
@@ -1,9 +1,11 @@
PRGNAM="unvanquished"
-VERSION="0.25.0"
+VERSION="0.26.0"
HOMEPAGE="http://www.unvanquished.net/"
-DOWNLOAD="http://www.unvanquished.net/downloads/sources/stripped/unvanquished-0.25.0.tar.xz \
+DOWNLOAD="https://github.com/Unvanquished/Unvanquished/archive/v0.26.0.tar.gz \
+ http://downloads.sourceforge.net/project/unvanquished/Assets/unvanquished_0.26.0.pk3 \
http://sourceforge.net/projects/unvanquished/files/Assets/unvanquished_0.25.0.pk3"
-MD5SUM="691054b50470e814a2c5d29e36165f35 \
+MD5SUM="01ba259042765355f40e07841bb0da74 \
+ 291cbc0379cd084aefa02e9964518961 \
3b6f35a877e7af231f0337795036a740"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""