summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmls2015-07-09 16:07:22 +0200
committersmls2015-07-09 16:07:22 +0200
commitaa02769bbab7822eb377e5e7ca952d7e8c9ed8ef (patch)
tree266ce6aefe4f69650e76c9c8129349d02b757675
downloadaur-aa02769bbab7822eb377e5e7ca952d7e8c9ed8ef.tar.gz
Initial import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD51
-rw-r--r--arx-fatalis-data.install10
-rwxr-xr-xinstall-copy73
-rw-r--r--install-verify257
5 files changed, 410 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..c35d8a569d8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = arx-fatalis-data-copy
+ pkgdesc = Arx Fatalis game data from existing win32 installation
+ pkgver = 1.21
+ pkgrel = 1
+ url = http://www.arkane-studios.com/uk/arx.php
+ install = arx-fatalis-data.install
+ arch = i686
+ arch = x86_64
+ license = custom:commercial
+ provides = arx-fatalis-data
+ conflicts = arx-fatalis-data-gog
+ conflicts = arx-fatalis-data-demo
+ source = install-verify
+ source = install-copy
+ md5sums = e9c245ac1bb48cb8ef667933e0b725d2
+ md5sums = 9bbb1a2ae298343aafe40a5e7117c24c
+
+pkgname = arx-fatalis-data-copy
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..bb2b797dbf6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Sam S. <smls75@gmail.com>
+
+pkgname=arx-fatalis-data-copy
+pkgver=1.21
+pkgrel=1
+pkgdesc='Arx Fatalis game data from existing win32 installation'
+url='http://www.arkane-studios.com/uk/arx.php'
+arch=('i686' 'x86_64')
+license=('custom:commercial')
+provides=('arx-fatalis-data')
+conflicts=('arx-fatalis-data-gog' 'arx-fatalis-data-demo')
+source=("install-verify" "install-copy")
+md5sums=('e9c245ac1bb48cb8ef667933e0b725d2'
+ '9bbb1a2ae298343aafe40a5e7117c24c')
+install='arx-fatalis-data.install'
+PKGEXT='.pkg.tar'
+
+_gamefolder="arx fatalis"
+
+
+package() {
+ cd $srcdir
+ _get_local_source "$_gamefolder" || {
+ error "Unable to find existing Arx Fatalis installation.
+ Please install the game using Windows or Wine, apply the official
+ 1.21 patch (already applied in the Steam version), and then place a
+ symlink to the game folder (which should contain 'data.pak' etc.)
+ into one of the above directories."
+ exit 1; }
+
+ msg "Starting setup..."
+ chmod +x install-copy
+ ./install-copy "$_gamefolder" "$pkgdir/usr/share/arx"
+ mkdir "$pkgdir/usr/share/games" && ln -s "/usr/share/arx/" "$pkgdir/usr/share/games/arx"
+}
+
+
+# Locate a file or folder provided by the user, and symlink it into $srcdir
+_get_local_source() {
+ msg "Looking for '$1'..."
+ declare -A _search=(['build dir']="$startdir"
+ ['$LOCAL_PACKAGE_SOURCES']="$LOCAL_PACKAGE_SOURCES")
+ for _key in "${!_search[@]}"; do local _dir="${_search["$_key"]}"
+ if [ -z "$_dir" ]; then _dir="<undefined>"; fi
+ echo -n " - in $_key ['$_dir'] ... ";
+ if [ -e "$_dir/$1" ]; then
+ echo "FOUND"; ln -sfT "$(readlink -f "$_dir/$1")" "$srcdir/$1"; break; fi
+ echo "NOT FOUND"
+ done
+ if [ ! -e "$srcdir/$1" ]; then return 1; fi
+}
diff --git a/arx-fatalis-data.install b/arx-fatalis-data.install
new file mode 100644
index 00000000000..3db61fb887a
--- /dev/null
+++ b/arx-fatalis-data.install
@@ -0,0 +1,10 @@
+
+post_install() {
+ echo "This package only installs the (proprietary) game data, no"
+ echo "game binaries."
+ echo "To actually play the game, compile and install Arx Libertatis,"
+ echo "the community-driven open-source port of Arx Fatalis for Linux"
+ echo "based on the publically released Arx Fatalis 1.21 source code."
+ echo " -> http://arx-libertatis.org"
+ echo " -> AUR package: arx-libertatis"
+}
diff --git a/install-copy b/install-copy
new file mode 100755
index 00000000000..9055fbc7ee9
--- /dev/null
+++ b/install-copy
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+die() {
+ echo "$@" >&2
+ exit 1
+}
+
+# Handle arguments
+
+if [ "$1" != "--help" ] && [ "$1" != "-h" ] ; then
+ source="$(readlink -m "$1")"
+fi
+
+[ "$source" = "" ] && 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 verified and renamed as needed by Arx Libertatis.
+
+You can get the 1.21 patch from http://www.arkane-studios.com/uk/arx_downloads.php"
+
+if [ "$2" = "" ]
+ then destdir="$(pwd)"
+ else destdir="$(readlink -m "$2")"
+fi
+
+cd "$(dirname "$0")"
+here="$(pwd)"
+
+echo "Installing Arx Fatalis data from \"$source\" to \"$destdir\".
+"
+
+[ -f "$here/install-verify" ] || die "Missing install-verify script."
+install_verify_sourced=1
+. "$here/install-verify"
+
+# Check for required files
+
+[ -d "$source" ] || die "$source does not exist"
+
+# Prepare output and temp dirs
+
+mkdir -p "$destdir" || exit 1
+
+# Detect language
+
+cd "$source" && detect_language
+
+# Install required files
+
+for f in "$@" ; do
+
+ dst="$destdir/$f"
+
+ dir="$(dirname "$f")"
+ file="$(basename "$f" | sed 's/[^[:alnum:]_-]/\\&/g')"
+ file_default="$(echo "$file" | sed 's/^\(.*\)\(\.[^.]*\)$/\1_default\2/g')"
+
+ mkdir -pv "$destdir/$dir"
+ rm "$dst" > /dev/null 2>&1
+
+ [ -f "$dst" ] || find "$source" -iname "$file" -exec cp -fv {} "$dst" \;
+ [ -f "$dst" ] || find "$source" -iname "$file_default" -exec cp -fv {} "$dst" \;
+
+ [ -f "$dst" ] && chmod "--reference=$destdir" "$dst" > /dev/null 2>&1
+ [ -f "$dst" ] && chmod -x "$dst" > /dev/null 2>&1
+
+done
+
+# Verify installed files
+
+cd "$destdir" && verify_checksums
diff --git a/install-verify b/install-verify
new file mode 100644
index 00000000000..d52bddac27e
--- /dev/null
+++ b/install-verify
@@ -0,0 +1,257 @@
+#!/bin/sh
+
+# Verify arx fatalis non-demo checksums.
+# This script is meant to be run on it's own or sourced by the other
+# install scripts.
+
+# List of required files
+
+if [ "$install_verify_sourced" != "1" ] ; then
+ die() {
+ echo "$@" >&2
+ exit 1
+ }
+ ( [ "$1" = "--help" ] || [ "$1" = "-h" ] ) && die "\
+Usage: install-verify [directory]"
+ if [ "$1" = "" ]
+ then checkdir="$(pwd)"
+ else checkdir="$(readlink -m "$1")"
+ fi
+ [ -d "$checkdir" ] || die "directory $checkdir does not exist"
+fi
+
+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"
+
+# Common functions
+
+md5sum=`which md5sum 2> /dev/null`
+[ -f "$md5sum" ] \
+ || die "Please install md5sum (http://www.gnu.org/software/coreutils/)"
+
+data_lang='english'
+detect_language() {
+
+ speech_checksum=`find '.' -iname "speech.pak" -exec "$md5sum" -b {} \; \
+ | sed "s/ .*//g"`
+ if [ "$speech_checksum" = '' ] ; then
+ speech_checksum=`find '.' -iname "speech_default.pak" \
+ -exec "$md5sum" -b {} \; | sed "s/ .*//g"`
+ fi
+
+ # check if the checksum is of a known localisation and set data_lang to
+ # the language string to be used with the 1.21 patch installer
+ case "$speech_checksum" in
+
+ '4c3fdb1f702700255924afde49081b6e') data_lang='german'
+ loc_checksum='31bc35bca48e430e108db1b8bcc2621d' ;;
+
+ # Bundled version of AF included with NVIDIA card
+ 'ab8a93161688d793a7c78fbefd7d133e') data_lang='german'
+ loc_checksum='31bc35bca48e430e108db1b8bcc2621d' ;;
+
+ '4e8f962d8204bcfd79ce6f3226d6d6de') data_lang='english'
+ loc_checksum='a47b192493afb5794e2161a62d35b69f' ;;
+
+ '2f88c67ae1537919e69386d27583125b') data_lang='spanish'
+ loc_checksum='121f99608814a2c9c5857cfadb665553' ;;
+
+ '4edf9f8c799190590b4cd52cfa5f91b1') data_lang='french'
+ loc_checksum='f8fc448fea12469ed94f417c313fe5ea' ;;
+
+ '81f05dea47c52d43f01c9b44dd8fe962') data_lang='italian'
+ loc_checksum='a9e162f2916f5737a95bd8c5bd8a979e' ;;
+
+ '677163bc319cd1e9aa1b53b5fb3e9402') data_lang='russian'
+ loc_checksum='a131bf2398ee70a9c22a2bbffd9d0d99' ;;
+
+ '') die "speech*.pak not found in $(pwd)" ;;
+ *) die "unsupported data language - speech*.pak checksum:" \
+ "$speech_checksum" ;;
+ esac
+
+ echo "
+Data language: $data_lang
+"
+}
+
+record_checksum_failure() {
+ if [ $checksum_failed = 0 ] ; then
+ echo "
+Checksum failed:"
+ checksum_failed=1
+ fi
+}
+
+verify_checksum() {
+
+ file="$1" ; shift
+
+ if [ ! -f "$file" ] ; then
+ record_checksum_failure
+ echo "- missing $file"
+ return
+ fi
+
+ checksum=`"$md5sum" -b "$file" | sed "s/ .*//g"`
+
+ checksum_matched=0
+ for valid_checksum in "$@" ; do
+ [ "$checksum" = "$valid_checksum" ] && checksum_matched=1
+ done
+
+ if [ $checksum_matched = 0 ] ; then
+
+ record_checksum_failure
+
+ errorstr="- $file: got '$checksum', expected '$1'" ; shift
+ for alternate_checksum in "$@" ; do
+ errorstr="$errorstr or '$alternate_checksum'"
+ done
+ echo "$errorstr"
+ fi
+}
+
+verify_checksums() {
+
+ echo "
+Done:"
+
+ checksum_failed=0
+
+ # Common files
+ verify_checksum 'data2.pak' \
+ 'f7e0ce700bf963429ac535ca86f8a7b4'
+ verify_checksum 'graph/interface/misc/arkane.bmp' \
+ 'afff1099c01ffeb03b9a351f7b5966b6'
+ verify_checksum 'graph/interface/misc/quit1.bmp' \
+ '41445d3792a1f8818d950aca47254488'
+ verify_checksum 'graph/obj3d/textures/fixinter_barrel.jpg' \
+ '8419274acbff7346c3661b18d6aad6dc'
+ verify_checksum 'graph/obj3d/textures/fixinter_bell.bmp' \
+ '5743b9047c9ad65540c318dfcc98123a'
+ verify_checksum 'graph/obj3d/textures/fixinter_metal_door.jpg' \
+ 'f246eff6b19c9c710313b4a4dce96a69'
+ verify_checksum 'graph/obj3d/textures/fixinter_public_notice.bmp' \
+ 'f81394abbb9006ce0950843b7909db33'
+ verify_checksum 'graph/obj3d/textures/item_bread.bmp' \
+ '544448f8eedc912aa231a6a04fffb7c5'
+ verify_checksum 'graph/obj3d/textures/item_club.jpg' \
+ '7e26c4199ddaca494c8b369294306b0b'
+ verify_checksum 'graph/obj3d/textures/item_long_sword.jpg' \
+ '3a6196fe9b7666c7d80d82be06f6de86'
+ verify_checksum 'graph/obj3d/textures/item_mauld_sabre.jpg' \
+ '18492c25ebac02f83e2f0ebda61ecb00'
+ verify_checksum 'graph/obj3d/textures/item_mauldsword.jpg' \
+ '503a5c2f23668040c675aefdde6dbbe5'
+ verify_checksum 'graph/obj3d/textures/item_mirror.jpg' \
+ 'c0a22b4f7a7a6461da68206e94928637'
+ verify_checksum 'graph/obj3d/textures/item_ring_casting.bmp' \
+ '348f9add709bacee08556d1f8cf10f3f'
+ verify_checksum 'graph/obj3d/textures/item_rope.bmp' \
+ 'ff05de281c8b380ee98f6e123d3d51cb'
+ verify_checksum 'graph/obj3d/textures/item_spell_sheet.jpg' \
+ '024ccbb520020f92fba5a5a4f0270cea'
+ verify_checksum 'graph/obj3d/textures/item_torch2.jpg' \
+ '027951899b4829599ca611010ea3484f'
+ verify_checksum 'graph/obj3d/textures/item_torch.jpg' \
+ '9ada166f23ddcb775ac20836e752187e'
+ verify_checksum 'graph/obj3d/textures/item_zohark.bmp' \
+ 'cd206a4027f86c6e57b7710c94049efa'
+ verify_checksum 'graph/obj3d/textures/l7_dwarf_[wood]_board08.jpg' \
+ '79ccc81adb7c37b98f40b478ef1fccd4'
+ verify_checksum 'graph/obj3d/textures/l7_dwarf_[wood]_board80.jpg' \
+ '691611087b13d38ef02bb9dfd6a2518e'
+ verify_checksum 'graph/obj3d/textures/npc_dog.bmp' \
+ '116bd374c14ae8c387a4da1899e1dca7'
+ verify_checksum 'graph/obj3d/textures/npc_pig.bmp' \
+ 'b7a4d0d3d230b2d1470176909004e38b'
+ verify_checksum 'graph/obj3d/textures/npc_pig_dirty.bmp' \
+ '76034d8d74056c8a982479d36321c228'
+ verify_checksum 'graph/obj3d/textures/npc_rat_base.bmp' \
+ '00c585ec9ebe8006d7ca72993de7b51b'
+ verify_checksum 'graph/obj3d/textures/npc_rat_base_cm.bmp' \
+ 'cae38facbf77db742180b9e58d0eb42f'
+ verify_checksum 'graph/obj3d/textures/npc_worm_body_part1.jpg' \
+ '0b220bffaedc89fa663f08d12630c342'
+ verify_checksum 'graph/obj3d/textures/npc_worm_body_part2.bmp' \
+ '20797cb78f6393a0fb5405969ba9f805'
+ verify_checksum 'graph/obj3d/textures/[wood]_light_door.jpg' \
+ '00d0b018e995e7d013d6e52e92126901'
+ verify_checksum 'misc/arx_default.ttf' \
+ '9a95ff96795c034524ba1c2e94ea12c7'
+ verify_checksum 'misc/arx_russian.ttf' \
+ '921561e83786efcd25f92147b60a13db'
+ verify_checksum 'misc/arx_taiwanese.ttf' \
+ 'da59198061cef0761c6b2fca113f76f6'
+ verify_checksum 'misc/logo.avi' \
+ '63ed31a4eb3d226c23e58cfaa974d484'
+ verify_checksum 'misc/logo.bmp' \
+ 'afff1099c01ffeb03b9a351f7b5966b6'
+ verify_checksum 'sfx.pak' \
+ '2efc9a74c517fd1ee9919900cf4091d2'
+
+ # data.pak is censored in some versions (presumably has less gore)
+ # At least the original german and italian CDs have the censored version.
+ # The censored version has different level files and a different
+ # human_female_villager model.
+ # There are also minor differences in the scripts, but those are
+ # overwritten by data2.pak from the 1.21 patch.
+ data_checksum_original='a91a0b39a046233debbb10b4850e13eb'
+ data_checksum_censored='a88d239dc7919ab113ff45483cb4ad46'
+ verify_checksum 'data.pak' "$data_checksum_original" "$data_checksum_censored"
+
+ # Language-specific files
+ verify_checksum 'loc.pak' "$loc_checksum"
+ # There is no need to check speech.pak here as we already used it to
+ # detect $loc_checksum
+
+ [ $checksum_failed = 0 ] || die "
+ERROR: Checksum mismatch."
+ echo "Checksum match."
+}
+
+if [ "$install_verify_sourced" != "1" ] ; then
+ cd "$checkdir"
+ detect_language
+ verify_checksums
+fi