aboutsummaryrefslogtreecommitdiff
path: root/games/strategy/dopewars/dopewars.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/strategy/dopewars/dopewars.SlackBuild')
-rwxr-xr-xgames/strategy/dopewars/dopewars.SlackBuild33
1 files changed, 29 insertions, 4 deletions
diff --git a/games/strategy/dopewars/dopewars.SlackBuild b/games/strategy/dopewars/dopewars.SlackBuild
index 5755e503..07f07792 100755
--- a/games/strategy/dopewars/dopewars.SlackBuild
+++ b/games/strategy/dopewars/dopewars.SlackBuild
@@ -77,7 +77,7 @@ mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
# Dowload source if necessary
SRC="$SRC_NAME-$VERSION.tar.gz"
-URL="http://prdownloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz"
+URL="http://downloads.sourceforge.net/dopewars/$SRC"
if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
@@ -93,12 +93,37 @@ EOKEY
fi
# Download source's signature if necessary and check it
-SIGNATURE="`basename http://download.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg`"
-if [ ! -s "$SRC_DIR/$SRC.sig" ]; then
- wget "http://prdownloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET
+if echo http://downloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg | grep -q -v "SIGNING URL"; then
+ SIGNATURE="`basename http://downloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg`"
+ if [ ! -s "$SRC_DIR/$SIGNATURE" ]; then
+ wget "http://downloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET
+ fi
+else
+ if [ -f "$SRC_DIR/$SRC.sig" ]; then
+ SIGNATURE="$SRC.sig"
+ elif [ -f "$SRC_DIR/$SRC.asc" ]; then
+ SIGNATURE="$SRC.asc"
+ else
+ echo Trying to get signature file from $URL.sig...
+ if wget "$URL.sig" -O "$SRC_DIR/$SRC.sig"; then
+ SIGNATURE="$SRC.sig"
+ else
+ rm $SRC_DIR/$SRC.sig
+ echo Trying to get signature file from $URL.asc...
+ if wget "$URL.asc" -O "$SRC_DIR/$SRC.asc"; then
+ SIGNATURE="$SRC.asc"
+ else
+ rm $SRC_DIR/$SRC.asc
+ echo "Error getting source's signature file"
+ exit $ERROR_GPG
+ fi
+ fi
+ fi
fi
+echo Checking $SRC_DIR/$SRC with gpg using $SRC_DIR/$SIGNATURE...
gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG
+echo Success.
# Untar
cd "$PKG_WORK"