diff options
author | Fernando Giannasi <phoemur@gmail.com> | 2013-10-20 19:48:45 +0200 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2013-10-23 12:17:45 +0200 |
commit | 803008f8e927b15d1e9f63d43c8df8707422a33a (patch) | |
tree | e94a91c1bb6d43f47ea7be36917fd5464c494c2c /games/dopewars | |
parent | 16624b006987c1f337f33144f32e292e69357087 (diff) |
games/dopewars: Added (Drug Dealing Game).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'games/dopewars')
-rw-r--r-- | games/dopewars/README | 10 | ||||
-rw-r--r-- | games/dopewars/doinst.sh | 9 | ||||
-rw-r--r-- | games/dopewars/dopewars.SlackBuild | 105 | ||||
-rw-r--r-- | games/dopewars/dopewars.info | 10 | ||||
-rw-r--r-- | games/dopewars/slack-desc | 19 |
5 files changed, 153 insertions, 0 deletions
diff --git a/games/dopewars/README b/games/dopewars/README new file mode 100644 index 000000000000..d9c3d79dc885 --- /dev/null +++ b/games/dopewars/README @@ -0,0 +1,10 @@ +Dopewars is a free Unix/Win32 rewrite of a game originally based on +"Drug Wars" by John E. Dell. The idea of dopewars is to deal in drugs +on the streets of New York, amassing a huge fortune and paying off +the loan shark, while avoiding the ever-annoying police. +The Unix/Win32 rewrite, as well as featuring a so-called "antique" +mode which closely follows the original, introduces new features such +as the ability to take part in multi-player games. dopewars aims to be +highly configurable, and what you can't change in the configuration +files you can change by poking around in the source, which is freely +available under the terms of the GNU General Public License. diff --git a/games/dopewars/doinst.sh b/games/dopewars/doinst.sh new file mode 100644 index 000000000000..791ba8006b8b --- /dev/null +++ b/games/dopewars/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then +/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +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 +fi diff --git a/games/dopewars/dopewars.SlackBuild b/games/dopewars/dopewars.SlackBuild new file mode 100644 index 000000000000..3ffeed440b59 --- /dev/null +++ b/games/dopewars/dopewars.SlackBuild @@ -0,0 +1,105 @@ +#!/bin/bash + +# Slackware build script for dopewars + +# Copyright 2013 Fernando Giannasi <phoemur@gmail.com> +# This work is free. You can redistribute it and/or modify it under +# the terms of the WTFPL, Version 2, as published by Sam Hocevar. +# See http://www.wtfpl.net/txt/copying/ + +# Modified by the SlackBuilds.org project + +PRGNAM="dopewars" +VERSION=${VERSION:-1.5.12} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog COPYING" + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Configure +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man + +# Compile the application and install it into the $PKG directory +make +make install DESTDIR=$PKG + +# Strip binaries +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 + +# Compress manpages +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +# move the menu entry and the docs +mkdir -p $PKG/usr/share/applications +mv $PKG/usr/share/gnome/apps/Games/dopewars.desktop \ + $PKG/usr/share/applications/$PRGNAM.desktop +rm -fr $PKG/usr/share/gnome/apps/Games + +# Add documentation +mkdir -p $PKG/usr/doc +mv $PKG/usr/share/doc/$PRGNAM-$VERSION $PKG/usr/doc/ +rm -fr $PKG/usr/share/doc +cp $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# Copy the slack-desc and doisnt.sh +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +# Build the package +cd "$PKG" +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/dopewars/dopewars.info b/games/dopewars/dopewars.info new file mode 100644 index 000000000000..008e2d7dc0fc --- /dev/null +++ b/games/dopewars/dopewars.info @@ -0,0 +1,10 @@ +PRGNAM="dopewars" +VERSION="1.5.12" +HOMEPAGE="http://dopewars.sourceforge.net" +DOWNLOAD="http://downloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz" +MD5SUM="debf749de9053dc2fb2e74c37ae06206" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Fernando Giannasi" +EMAIL="phoemur@gmail.com" diff --git a/games/dopewars/slack-desc b/games/dopewars/slack-desc new file mode 100644 index 000000000000..b36475553fc6 --- /dev/null +++ b/games/dopewars/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +dopewars: dopewars (Drug Dealing Game) +dopewars: +dopewars: dopewars is a free Unix/Win32 rewrite of a game originally based on +dopewars: 'Drug Wars' by John E. Dell. The idea of dopewars is to deal in drugs +dopewars: on the streets of New York, amassing a huge fortune and paying +dopewars: off the loan shark, while avoiding the ever-annoying police. +dopewars: +dopewars: http://dopewars.sourceforge.net/ +dopewars: +dopewars: +dopewars: |