summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaohan Chen2015-06-20 23:00:25 -0400
committerYaohan Chen2015-06-20 23:00:25 -0400
commit05c2e15767ac569b480e291dd98dadd796657533 (patch)
treec53280781201bc99c8540c49e7cb6585d53fb476
downloadaur-05c2e15767ac569b480e291dd98dadd796657533.tar.gz
Initial import
-rw-r--r--.AURINFO23
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD77
-rw-r--r--air-generic-launcher.sh15
-rw-r--r--dofus-beta.desktop9
-rw-r--r--dofus-beta.install17
-rw-r--r--dofus-beta.sh4
-rw-r--r--transition.conf.append8
8 files changed, 182 insertions, 0 deletions
diff --git a/.AURINFO b/.AURINFO
new file mode 100644
index 000000000000..9145d13dd401
--- /dev/null
+++ b/.AURINFO
@@ -0,0 +1,23 @@
+pkgbase = dofus-beta
+ pkgdesc = A manga inspired, Massively Multiplayer Online Role-playing Game (MMORPG) for Adobe AIR (Beta version).
+ pkgver = 2.21
+ pkgrel = 2
+ url = http://www.dofus.com/
+ install = dofus-beta.install
+ arch = i686
+ arch = x86_64
+ license = custom:Dofus License
+ depends = ankama-transition>=3.8.1-3
+ depends = adobe-air-sdk
+ depends = gtk2
+ depends = alsa-lib
+ source = http://dl.ak.ankama.com/games/dofus2-beta/setup/setup-beta-transition-amd64.tar.gz
+ source = http://dl.ak.ankama.com/games/dofus2-beta/setup/setup-beta-transition-x86.tar.gz
+ source = dofus-beta.sh
+ source = dofus-beta.desktop
+ source = air-generic-launcher.sh
+ source = transition.conf.append
+ backup = opt/ankama/dofus-beta/transition.conf
+
+pkgname = dofus-beta
+
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..df64fda91118
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = dofus-beta
+ pkgdesc = A manga inspired, Massively Multiplayer Online Role-playing Game (MMORPG) for Adobe AIR (Beta version).
+ pkgver = 2.21
+ pkgrel = 2
+ url = http://www.dofus.com/
+ install = dofus-beta.install
+ arch = i686
+ arch = x86_64
+ license = custom:Dofus License
+ depends = ankama-transition>=3.8.1-3
+ depends = adobe-air-sdk
+ depends = gtk2
+ depends = alsa-lib
+ backup = opt/ankama/dofus-beta/transition.conf
+ source = http://dl.ak.ankama.com/games/dofus2-beta/setup/setup-beta-transition-amd64.tar.gz
+ source = http://dl.ak.ankama.com/games/dofus2-beta/setup/setup-beta-transition-x86.tar.gz
+ source = dofus-beta.sh
+ source = dofus-beta.desktop
+ source = air-generic-launcher.sh
+ source = transition.conf.append
+ md5sums = d63b778424826a783ca3d5e28d5b3649
+ md5sums = a94dee7dd29de51525e47dee04ca5182
+ md5sums = 91023d67a519421912b3d101ded7ca12
+ md5sums = 0e797e4fcf39e1d06f68b51bfd215040
+ md5sums = f179eaa5e6e6674b1853cf826fc33c3a
+ md5sums = 0241708575069715d56b88b96dcbf7e8
+
+pkgname = dofus-beta
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8f6797b9e8dd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,77 @@
+# Maintainer: Yaohan Chen <yaohan.chen@gmail.com>
+# Contributor: spider-mario <spidermario@free.fr>
+# Contributor: p2k <Patrick.Schneider@uni-ulm.de>
+# Contributor: Schtroumpfette <fpeterschmitt@voila.fr>
+
+pkgname=dofus-beta
+pkgver=2.21
+pkgrel=2
+pkgdesc='A manga inspired, Massively Multiplayer Online Role-playing Game (MMORPG) for Adobe AIR (Beta version).'
+arch=('i686' 'x86_64')
+url='http://www.dofus.com/'
+license=('custom:Dofus License')
+install='dofus-beta.install'
+backup=('opt/ankama/dofus-beta/transition.conf')
+depends=('ankama-transition>=3.8.1-3' 'adobe-air-sdk')
+if [ "$CARCH" == 'x86_64' ]; then
+ depends+=('lib32-gtk2' 'lib32-alsa-lib')
+else
+ depends+=('gtk2' 'alsa-lib')
+fi
+
+source=('http://dl.ak.ankama.com/games/dofus2-beta/setup/setup-beta-transition-amd64.tar.gz'
+ 'http://dl.ak.ankama.com/games/dofus2-beta/setup/setup-beta-transition-x86.tar.gz'
+ 'dofus-beta.sh'
+ 'dofus-beta.desktop'
+ 'air-generic-launcher.sh'
+ 'transition.conf.append')
+md5sums=('d63b778424826a783ca3d5e28d5b3649'
+ 'a94dee7dd29de51525e47dee04ca5182'
+ '91023d67a519421912b3d101ded7ca12'
+ '0e797e4fcf39e1d06f68b51bfd215040'
+ 'f179eaa5e6e6674b1853cf826fc33c3a'
+ '0241708575069715d56b88b96dcbf7e8')
+# Skip this block if PKGBUILD is sourced by updpkgsums (pstree is used for this check,
+# and if not available, this check is skipped)
+if ! ( command -v pstree >/dev/null 2>&1 && \
+ pstree --show-parents $$ | grep -q updpkgsums ) ; then
+ # Remove source and md5sum for the wrong arch
+ if [ "$CARCH" == "x86_64" ];then
+ unset source[1] md5sums[1]
+ elif [ "$CARCH" == 'i686' ]; then
+ unset source[0] md5sums[0]
+ fi
+fi
+
+prepare() {
+ msg2 "Modifying transition configuration to use adl-based launchers"
+ cat 'transition.conf.append' >> 'DofusBeta/transition.conf'
+}
+
+package() {
+ _installdir="$pkgdir/opt/ankama/dofus-beta"
+ install -d "$_installdir"
+
+ cd "$srcdir"
+ msg2 'Installing menu entry...'
+ install -Dm755 'dofus-beta.sh' "$pkgdir/usr/bin/dofus-beta"
+ install -Dm644 'dofus-beta.desktop' "$pkgdir/usr/share/applications/dofus-beta.desktop"
+ install -Dm644 'DofusBeta/share/icon/dofus-icon-128.png' "$pkgdir/usr/share/pixmaps/dofus-beta.png"
+
+ msg2 'Installing main applications...'
+ mv "DofusBeta/"{bin,share,transition.conf} "$_installdir"
+
+ msg2 'Setting up game file permissions...'
+ chgrp -R games $_installdir
+ chmod -R g+w $_installdir
+ chmod 666 "$_installdir/share/META-INF/AIR/application.xml"
+
+ msg2 'Installing adl based launchers...'
+ install -Dm755 'air-generic-launcher.sh' "$_installdir/bin"
+ install -Dm755 'air-generic-launcher.sh' "$_installdir/share/reg/bin"
+
+ msg2 'Installing transition update file...'
+ ln -s '/opt/ankama/transition/' "$_installdir/transition"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/air-generic-launcher.sh b/air-generic-launcher.sh
new file mode 100644
index 000000000000..5271757d3b10
--- /dev/null
+++ b/air-generic-launcher.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# This is a generic launcher script for AIR applications on Arch Linux
+
+SCRIPT_PATH=`readlink -f $0`
+SCRIPT_DIR=`dirname $SCRIPT_PATH`
+BASE_DIR=`readlink -f $SCRIPT_DIR/..`
+
+if [ "`uname -m`" == "x86_64" ]; then
+ export GTK_PATH=/usr/lib32/gtk-2.0
+ export G_FILENAME_ENCODING=UTF-8
+fi
+
+/opt/adobe-air-sdk/bin/adl -nodebug $BASE_DIR/share/META-INF/AIR/application.xml $BASE_DIR/share -- $*
+
diff --git a/dofus-beta.desktop b/dofus-beta.desktop
new file mode 100644
index 000000000000..083901869561
--- /dev/null
+++ b/dofus-beta.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Dofus Beta
+Exec=/usr/bin/dofus-beta
+Icon=dofus-beta
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Game;RolePlaying
diff --git a/dofus-beta.install b/dofus-beta.install
new file mode 100644
index 000000000000..05a5113a3a55
--- /dev/null
+++ b/dofus-beta.install
@@ -0,0 +1,17 @@
+post_install() {
+ chgrp -R games /opt/ankama/dofus-beta
+ chmod -R g+w /opt/ankama/dofus-beta
+ touch /opt/ankama/dofus-beta/share/log4as.xml
+ chmod 666 /opt/ankama/dofus-beta/share/log4as.xml
+ chmod 666 /opt/ankama/dofus-beta/share/META-INF/AIR/application.xml
+ cat <<END
+The game files are installed under group "games". Please add your user
+to this group with "usermod -a -G games", otherwise you will need to
+enter your password when the game auto-updates.
+END
+}
+
+post_upgrade() {
+ post_install
+}
+
diff --git a/dofus-beta.sh b/dofus-beta.sh
new file mode 100644
index 000000000000..4e37e2dd8858
--- /dev/null
+++ b/dofus-beta.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+/usr/bin/transition \
+ --configuration_file=/opt/ankama/dofus-beta/transition.conf \
+ --application-id=ankama-dofus-beta-transition
diff --git a/transition.conf.append b/transition.conf.append
new file mode 100644
index 000000000000..cec8db237503
--- /dev/null
+++ b/transition.conf.append
@@ -0,0 +1,8 @@
+# Use adl instead of Air binaries on Arch Linux
+bypass_air_installation = true
+
+dofus.reg.path = "${root}/share/reg/bin/air-generic-launcher.sh"
+
+launcher.command = """
+"${root}/bin/air-generic-launcher.sh" --lang=${i18n.lang} --update-server-port=${service_port} --updater_version=v2
+"""