summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof AS (3ED)2018-08-30 10:57:46 +0200
committerKrzysztof AS (3ED)2018-08-30 10:57:46 +0200
commitc405b3642fe4952ca71d21bbf577d3a483e60254 (patch)
treebd395761c60b83102143a7e9efefd1aac60711e3
downloadaur-c405b3642fe4952ca71d21bbf577d3a483e60254.tar.gz
init
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD38
-rw-r--r--qsp.mime24
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2cbc53604fe2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = qsp-common
+ pkgdesc = Common files for packages qqsp and qsp-bin (mimetypes, icons)
+ pkgver = 20180830
+ pkgrel = 1
+ url = https://github.com/QSPFoundation/qsp/
+ arch = any
+ license = GPL
+ license = LGPL
+ makedepends = librsvg
+ source = https://raw.githubusercontent.com/QSPFoundation/qsp/45c4e7180704b2940e547eb041bbc5b57c46d9e2/help/qsp-logo-vector.svg
+ source = qsp.mime
+ sha256sums = 12de4d6a91bdc09d334585b04dbb3d2e9ae7277f0274090b9f73c812d414e5dc
+ sha256sums = SKIP
+
+pkgname = qsp-common
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..903fc0da5a82
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: 3ED <krzysztofas at protonmail com>
+
+pkgname=qsp-common
+pkgver=20180830
+pkgrel=1
+epoch=
+pkgdesc="Common files for packages qqsp and qsp-bin (mimetypes, icons)"
+arch=("any")
+url="https://github.com/QSPFoundation/qsp/"
+license=('GPL' 'LGPL')
+makedepends=("librsvg")
+source=(
+ "https://raw.githubusercontent.com/QSPFoundation/qsp/45c4e7180704b2940e547eb041bbc5b57c46d9e2/help/qsp-logo-vector.svg"
+ "qsp.mime"
+)
+sha256sums=('12de4d6a91bdc09d334585b04dbb3d2e9ae7277f0274090b9f73c812d414e5dc'
+ 'SKIP')
+
+prepare() {
+ install -dm755 "$srcdir/hicolor/scalable/apps/"
+ install -m644 "qsp-logo-vector.svg" "$srcdir/hicolor/scalable/apps/qsp.svg"
+
+ for i in 16x16 24x24 32x32 48x48 64x64 96x96 128x128 256x256 512x512; do
+ msg2 "Generating icon: $i raster from vector..."
+ install -dm755 "$srcdir/hicolor/$i/apps/"
+ rsvg-convert -w "${i%%x*}" -h "${i##*x}" -f png \
+ -o "$srcdir/hicolor/$i/apps/qsp.png" "$srcdir/hicolor/scalable/apps/qsp.svg"
+ done
+
+}
+
+package() {
+ install -dm0755 "$pkgdir"/usr/share/{icons,mime/packages}/
+
+ install -m0644 "$srcdir/qsp.mime" "$pkgdir/usr/share/mime/packages/qsp.xml"
+
+ bsdtar -cf - "hicolor" | bsdtar -xf - -C "$pkgdir/usr/share/icons"
+}
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>