summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof (3ED) AS2015-07-02 10:03:49 +0200
committerKrzysztof (3ED) AS2015-07-02 10:03:49 +0200
commit70b59977eccd6a5e42f0006fe04adaf6f71afde3 (patch)
tree7d317a1af0171677e2c553e380f54d5f7c49b78b
downloadaur-70b59977eccd6a5e42f0006fe04adaf6f71afde3.tar.gz
moving files, making space for additional scripts, aur4 and other stuff
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD51
-rw-r--r--qsp-gui.desktop12
-rw-r--r--qsp-gui.install15
-rw-r--r--qsp-qui.sh70
-rw-r--r--qsp.mime24
6 files changed, 200 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5878ed7f9a28
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = qsp-bin
+ pkgdesc = Quest Soft Player is another interactive fiction player (only for qsp format)
+ pkgver = 5.7.0
+ pkgrel = 3
+ url = http://qsp.su/
+ install = qsp-gui.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ depends = libjpeg6
+ depends = libpng12
+ depends = gtk2
+ depends = cairo
+ depends = libsm
+ source = http://qsp.su/attachments/qsp570.tar.bz2
+ source = https://raw.githubusercontent.com/QSPFoundation/qsp/45c4e7180704b2940e547eb041bbc5b57c46d9e2/help/qsp-logo-vector.svg
+ source = qsp-qui.sh
+ source = qsp-gui.desktop
+ source = qsp.mime
+ sha256sums = fabd48411d59d18b9c663a96490316634c5ef9bdf4208f559c952f9581299dda
+ sha256sums = 12de4d6a91bdc09d334585b04dbb3d2e9ae7277f0274090b9f73c812d414e5dc
+ sha256sums = ce1ebd984d333cf6ea052875c3c7573ad3837474859eb8a58c29466c9f549255
+ sha256sums = d2a84ebbc0d2c40200781791f2a8a10d126bf93b053532377b872c3d723bc130
+ sha256sums = b68fd7e3cfb840a5ba6958a691cd5f360b3d9181995e27ded46182d63343c1f3
+
+pkgname = qsp-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..dd9f7513b84e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: 3ED <krzysztof1987@gmail.com>
+pkgname=qsp-bin
+pkgver=5.7.0
+pkgrel=3
+pkgdesc="Quest Soft Player is another interactive fiction player (only for qsp format)"
+arch=('i686' 'x86_64')
+url="http://qsp.su/"
+license=('GPL' 'LGPL')
+depends=('libjpeg6' 'libpng12' 'gtk2' 'cairo' 'libsm')
+install=qsp-gui.install
+_tarname="qsp${pkgver//\./}"
+
+[ "$CARCH" = "x86_64" ] && _tarname="${_tarname}_64"
+
+source=("http://qsp.su/attachments/${_tarname}.tar.bz2"
+ "https://raw.githubusercontent.com/QSPFoundation/qsp/45c4e7180704b2940e547eb041bbc5b57c46d9e2/help/qsp-logo-vector.svg"
+ "qsp-qui.sh"
+ "qsp-gui.desktop"
+ "qsp.mime")
+sha256sums=('fabd48411d59d18b9c663a96490316634c5ef9bdf4208f559c952f9581299dda'
+ '12de4d6a91bdc09d334585b04dbb3d2e9ae7277f0274090b9f73c812d414e5dc'
+ 'ce1ebd984d333cf6ea052875c3c7573ad3837474859eb8a58c29466c9f549255'
+ 'd2a84ebbc0d2c40200781791f2a8a10d126bf93b053532377b872c3d723bc130'
+ 'b68fd7e3cfb840a5ba6958a691cd5f360b3d9181995e27ded46182d63343c1f3')
+
+[ "$CARCH" = "x86_64" ] && sha256sums[0]='0d1f22209fd0ab39c64b8834634f599de16ac96cb03b30ab385ce57a5eb6022f'
+
+prepare() {
+ cd "$srcdir"
+
+ install -dm755 "$srcdir/hicolor/scalable/apps/"
+ install -m644 "$srcdir/qsp-logo-vector.svg" "$srcdir/hicolor/scalable/apps/qsp.svg"
+
+ for i in 16x16 24x24 32x32 48x48 64x64 96x96 128x128 256x256; do
+ install -dm755 "$srcdir/hicolor/$i/apps/"
+ rsvg-convert -w "${i%%x*}" -h "${i##*x}" -f png \
+ -o "$srcdir/hicolor/$i/apps/qsp.png" "$srcdir/qsp-logo-vector.svg"
+ done
+}
+package() {
+ install -dm755 "$pkgdir"/usr/{bin,lib/qsp,share/{applications,icons,mime/packages}}
+ install -m755 "$srcdir/qsp-qui.sh" "$pkgdir/usr/bin/qsp-gui"
+ install -m644 "$srcdir/qsp-gui.desktop" "$pkgdir/usr/share/applications/"
+ install -m644 "$srcdir/qsp.mime" "$pkgdir/usr/share/mime/packages/qsp.xml"
+
+ cd "$srcdir"
+ bsdtar -cf - hicolor | bsdtar -xf - -C "$pkgdir/usr/share/icons/"
+
+ cd "$_tarname"
+ bsdtar -cf - * | bsdtar -xf - -C "$pkgdir/usr/lib/qsp/"
+}
diff --git a/qsp-gui.desktop b/qsp-gui.desktop
new file mode 100644
index 000000000000..3d4f48ad29cc
--- /dev/null
+++ b/qsp-gui.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Name=Quest Soft Player
+Comment=Quest Soft Player is another interactive story player (it's own qsp format)
+Exec=qsp-gui
+Icon=qsp
+Terminal=false
+StartupNotify=false
+Categories=Application;Game;
+MimeType=application/x-qsp
diff --git a/qsp-gui.install b/qsp-gui.install
new file mode 100644
index 000000000000..a0611f7a3229
--- /dev/null
+++ b/qsp-gui.install
@@ -0,0 +1,15 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor
+ update-desktop-database -q
+ update-mime-database usr/share/mime > /dev/null 2>&1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/qsp-qui.sh b/qsp-qui.sh
new file mode 100644
index 000000000000..d5dafc6c8b7d
--- /dev/null
+++ b/qsp-qui.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+# ARCHLINUX_QSP_LAUNCHER v0.2 (c) 3ED @ terms of GPL3
+# License: /usr/share/licenses/common/GPL3
+
+# get original bin dir from "any location"
+get_QSP_BIN_PATH() {
+ local bin="$1" path="$2"
+
+ if [[ "$0" =~ / ]]; then
+ read QSP_BIN_PATH < <(realpath -- "$0")
+ else
+ if hash "$0" &> /dev/null; then
+ read QSP_BIN_PATH < <(hash -t "$0")
+ else
+ if [ -f "./$0" ]; then
+ read QSP_BIN_PATH < <(realpath -- "./$0")
+ fi
+ fi
+ fi
+
+ if [ -z "$QSP_BIN_PATH" ]; then
+ QSP_BIN_PATH=/usr/bin
+ else
+ read QSP_BIN_PATH < <(dirname -- "$QSP_BIN_PATH")
+ fi
+
+ if [ -n "$path" ]; then
+ QSP_BIN_PATH+="$path"
+ fi
+
+ test -f "$QSP_BIN_PATH/$bin"
+}
+
+# convert all paths by realpath
+qet_QSP_ARGV() {
+ local i double_minus from_realpath
+
+ for i in "$@"; do
+ if [ -z "$double_minus"]; then
+ from_realpath=
+ case "$i" in
+ "--") double_minus=yes; QSP_ARGV+=("$i");;
+ "-"*) QSP_ARGV+=("$i");;
+ "") continue;;
+ *) read from_realpath < <(realpath -- "$i"); QSP_ARGV+=("$from_realpath");;
+ esac
+ else
+ read from_realpath < <(realpath -- "$i"); QSP_ARGV+=("$from_realpath")
+ fi
+ done
+
+ test "${#QSP_ARGV[@]}" -gt "0"
+}
+
+# launch qsp...
+qsp_launch() {
+ local QSP_BIN=qsp-gui
+
+ get_QSP_BIN_PATH "$QSP_BIN" "/../lib/qsp/" || exit 127
+
+ if qet_QSP_ARGV "$@"; then
+ cd "$QSP_BIN_PATH"
+ exec -- ./"$QSP_BIN" "${QSP_ARGV[@]}"
+ else
+ cd "$QSP_BIN_PATH"
+ exec -- ./"$QSP_BIN"
+ fi
+}
+
+qsp_launch "$@"
diff --git a/qsp.mime b/qsp.mime
new file mode 100644
index 000000000000..d3ab70e2760d
--- /dev/null
+++ b/qsp.mime
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-qsp">
+ <comment>QSP interactive fiction</comment>
+ <comment xml:lang="en">QSP interactive fiction</comment>
+ <comment xml:lang="pl">QSP fikcja interaktywna</comment>
+ <icon name="qsp"/>
+ <magic priority="50">
+ <match value="Q\0S\0P\0G\0A\0M\0E\0\r" type="string" offset="0" />
+ </magic>
+ <glob pattern="*.qsp"/>
+ </mime-type>
+ <mime-type type="application/x-qsp-sav">
+ <comment>QSP interactive fiction (save game)</comment>
+ <comment xml:lang="en">QSP interactive fiction (save game)</comment>
+ <comment xml:lang="pl">QSP fikcja interaktywna (zapis gry)</comment>
+ <magic priority="50">
+ <match value="Q\0\0\0S\0\0\0P\0\0\0S\0\0\0A" type="string" offset="0">
+ <match value="M\0\0\0E\0\0\0\r" type="string" offset="40" />
+ </match>
+ </magic>
+ <glob pattern="*.sav"/>
+ </mime-type>
+</mime-info>