summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2012-07-02 20:55:21 +0000
committerJulian Ospald <hasufell@gentoo.org>2012-07-02 20:55:21 +0000
commit8abb2ac856d6604ad4504bc7bde68f35a1c07997 (patch)
treed86e74ca47c79de32209a7faba190d747fcc933f /games-rpg/arx-libertatis
parentold (diff)
downloadgentoo-2-8abb2ac856d6604ad4504bc7bde68f35a1c07997.tar.gz
gentoo-2-8abb2ac856d6604ad4504bc7bde68f35a1c07997.tar.bz2
gentoo-2-8abb2ac856d6604ad4504bc7bde68f35a1c07997.zip
install arx-data-copy script to support steam/windows installations
(Portage version: 2.2.0_alpha114/cvs/Linux x86_64)
Diffstat (limited to 'games-rpg/arx-libertatis')
-rw-r--r--games-rpg/arx-libertatis/ChangeLog9
-rw-r--r--games-rpg/arx-libertatis/arx-libertatis-1.0.2-r1.ebuild (renamed from games-rpg/arx-libertatis/arx-libertatis-1.0.2.ebuild)9
-rw-r--r--games-rpg/arx-libertatis/files/arx-data-copy108
3 files changed, 123 insertions, 3 deletions
diff --git a/games-rpg/arx-libertatis/ChangeLog b/games-rpg/arx-libertatis/ChangeLog
index 376f08942ef3..48ce647a3ed5 100644
--- a/games-rpg/arx-libertatis/ChangeLog
+++ b/games-rpg/arx-libertatis/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-rpg/arx-libertatis
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-rpg/arx-libertatis/ChangeLog,v 1.1 2012/06/29 21:47:41 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/arx-libertatis/ChangeLog,v 1.2 2012/07/02 20:55:21 hasufell Exp $
+
+*arx-libertatis-1.0.2-r1 (02 Jul 2012)
+
+ 02 Jul 2012; Julian Ospald <hasufell@gentoo.org>
+ -arx-libertatis-1.0.2.ebuild, +arx-libertatis-1.0.2-r1.ebuild,
+ +files/arx-data-copy:
+ install arx-data-copy script to support steam/windows installations
*arx-libertatis-1.0.2 (29 Jun 2012)
diff --git a/games-rpg/arx-libertatis/arx-libertatis-1.0.2.ebuild b/games-rpg/arx-libertatis/arx-libertatis-1.0.2-r1.ebuild
index 570d0d2bdf78..b10a835c74bd 100644
--- a/games-rpg/arx-libertatis/arx-libertatis-1.0.2.ebuild
+++ b/games-rpg/arx-libertatis/arx-libertatis-1.0.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-rpg/arx-libertatis/arx-libertatis-1.0.2.ebuild,v 1.1 2012/06/29 21:47:41 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/arx-libertatis/arx-libertatis-1.0.2-r1.ebuild,v 1.1 2012/07/02 20:55:21 hasufell Exp $
EAPI=4
@@ -63,6 +63,7 @@ src_compile() {
src_install() {
cmake-utils_src_install
+ dogamesbin "${FILESDIR}"/arx-data-copy
prepgamesdirs
}
@@ -76,7 +77,11 @@ pkg_postinst() {
if ! use cdinstall || ! use demo ; then
elog "You need the demo or full game data."
elog "See http://wiki.arx-libertatis.org/Getting_the_game_data for more information"
- elog "or enable cdinstall or demo useflag."
+ elog
+ elog "You might want to enable cdinstall or demo useflag."
+ elog
+ elog "If you have already installed the game or use the STEAM version,"
+ elog "run \"${GAMES_BINDIR}/arx-data-copy /path/to/installed-arx /usr/local/share/games/arx\"."
fi
games_pkg_postinst
diff --git a/games-rpg/arx-libertatis/files/arx-data-copy b/games-rpg/arx-libertatis/files/arx-data-copy
new file mode 100644
index 000000000000..719e14b01ed8
--- /dev/null
+++ b/games-rpg/arx-libertatis/files/arx-data-copy
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+die() {
+ echo "$@" >&2
+ exit 1
+}
+
+# Handle arguments
+if [ "$1" != "--help" ] && [ "$1" != "-h" ] ; then
+ SOURCE="$(readlink -f "$1")"
+else
+ die "\
+Usage: install-copy path/to/ArxFatalis/ [output_dir]
+
+This script can be used to copy the game data from a fully patched
+Arx Fatalis 1.21 install (for example a Steam download).
+Files will be renamed as needed by Arx Libertatis.
+
+You can get the 1.21 patch from http://www.arkane-studios.com/uk/arx_downloads.php"
+fi
+
+if [ "$2" = "" ] ; then
+ DESTDIR="$(pwd)"
+else
+ DESTDIR="$(readlink -f "$2")"
+fi
+
+cd "$(dirname "$0")"
+
+echo "Installing Arx Fatalis data from \"$SOURCE\" to \"$DESTDIR\".
+"
+
+# Check for required files
+[ -d "$SOURCE" ] || die "$SOURCE does not exist"
+
+# files
+set -- \
+ "data2.pak" \
+ "graph/interface/misc/arkane.bmp" \
+ "graph/interface/misc/quit1.bmp" \
+ "graph/obj3d/textures/fixinter_barrel.jpg" \
+ "graph/obj3d/textures/fixinter_bell.bmp" \
+ "graph/obj3d/textures/fixinter_metal_door.jpg" \
+ "graph/obj3d/textures/fixinter_public_notice.bmp" \
+ "graph/obj3d/textures/item_bread.bmp" \
+ "graph/obj3d/textures/item_club.jpg" \
+ "graph/obj3d/textures/item_long_sword.jpg" \
+ "graph/obj3d/textures/item_mauld_sabre.jpg" \
+ "graph/obj3d/textures/item_mauldsword.jpg" \
+ "graph/obj3d/textures/item_mirror.jpg" \
+ "graph/obj3d/textures/item_ring_casting.bmp" \
+ "graph/obj3d/textures/item_rope.bmp" \
+ "graph/obj3d/textures/item_spell_sheet.jpg" \
+ "graph/obj3d/textures/item_torch2.jpg" \
+ "graph/obj3d/textures/item_torch.jpg" \
+ "graph/obj3d/textures/item_zohark.bmp" \
+ "graph/obj3d/textures/l7_dwarf_[wood]_board08.jpg" \
+ "graph/obj3d/textures/l7_dwarf_[wood]_board80.jpg" \
+ "graph/obj3d/textures/npc_dog.bmp" \
+ "graph/obj3d/textures/npc_pig.bmp" \
+ "graph/obj3d/textures/npc_pig_dirty.bmp" \
+ "graph/obj3d/textures/npc_rat_base.bmp" \
+ "graph/obj3d/textures/npc_rat_base_cm.bmp" \
+ "graph/obj3d/textures/npc_worm_body_part1.jpg" \
+ "graph/obj3d/textures/npc_worm_body_part2.bmp" \
+ "graph/obj3d/textures/[wood]_light_door.jpg" \
+ "manual.pdf" \
+ "map.pdf" \
+ "misc/arx_default.ttf" \
+ "misc/arx_russian.ttf" \
+ "misc/arx_taiwanese.ttf" \
+ "misc/logo.avi" \
+ "misc/logo.bmp" \
+ "sfx.pak" \
+ "data.pak" \
+ "loc.pak" \
+ "speech.pak"
+
+# Install required files
+ret=0
+for f in "$@" ; do
+ DEST="$DESTDIR/$f"
+ DIRNAME="$(dirname "$f")"
+ FILE="$(basename "$f" | sed 's/[^[:alnum:]_-]/\\&/g')"
+ FILE_DEFAULT="$(echo "$FILE" | sed 's/^\(.*\)\(\.[^.]*\)$/\1_default\2/g')"
+
+ # don't screw permissions on existent folders
+ [ -e "$DESTDIR/$DIRNAME" ] || { mkdir -pv "$DESTDIR/$DIRNAME"
+ chmod 755 "$DESTDIR/$DIRNAME" ; }
+
+ find "$SOURCE" -iname "$FILE" -exec cp -fv '{}' "$DEST" \;
+ find "$SOURCE" -iname "$FILE_DEFAULT" -exec cp -fv '{}' "$DEST" \;
+
+ chmod 644 "$DEST" || { missing_files="$missing_files
+ $f" ; return 1 ; }
+
+ ret="$(($ret + $?))"
+done
+
+[ "$ret" = "0" ] || die "
+$ret errors and following files not installed:$missing_files
+
+You either have incorrect permissions on \"${DESTDIR}\"
+or don't have patch 1.21 installed. Fix it and rerun this script."
+
+echo
+echo "Now run:
+ arx --data-dir \"$DESTDIR\""