summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorY2015-06-09 19:07:37 +0200
committerY2015-06-09 19:07:37 +0200
commit440d893b68c91c0d7d49b3781a1d86e6c9371e12 (patch)
treebd781ce729a410b9159e5e3405e1a2535d54b496
downloadaur-440d893b68c91c0d7d49b3781a1d86e6c9371e12.tar.gz
version 20150523
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD44
-rwxr-xr-xysflight-server.desktop11
-rwxr-xr-xysflight.desktop10
-rw-r--r--ysflight.pngbin0 -> 18673 bytes
-rwxr-xr-xysflight.sh44
6 files changed, 135 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f46662cf6122
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+# Generated by makepkg 4.2.1
+# Tue Jun 9 17:02:44 UTC 2015
+pkgbase = ysflight
+ pkgdesc = A portable flight simulator
+ pkgver = 20150523
+ pkgrel = 2
+ url = http://wwwe.ysflight.com/
+ arch = i686
+ arch = x86_64
+ license = freeware
+ depends = zenity
+ depends = lib32-libpulse
+ depends = lib32-glu
+ source = http://ysflight.in.coocan.jp/download/YsflightForLinux.zip
+ source = ysflight.desktop
+ source = ysflight-server.desktop
+ source = ysflight.png
+ source = ysflight.sh
+ md5sums = 2257ce6d2041f55f7a17a1d4034983af
+ md5sums = d137828b093f2e16f289f5a3d922f31c
+ md5sums = eb042809766b50b7195065f8d2e0692b
+ md5sums = a544483da4de1585434c0c134eb60be0
+ md5sums = a72ce06ebea39126edd88d512d763115
+
+pkgname = ysflight
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ccad3ebcc453
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Yves G. <theYinYeti@yalis.fr>
+
+pkgname=ysflight
+pkgver=20150523
+pkgrel=2
+pkgdesc="A portable flight simulator"
+arch=('i686' 'x86_64')
+url="http://wwwe.ysflight.com/"
+license=('freeware')
+depends=(zenity lib32-libpulse lib32-glu)
+ysflight_dir="/opt/ysflight-$pkgver"
+
+source=('http://ysflight.in.coocan.jp/download/YsflightForLinux.zip'
+ 'ysflight.desktop'
+ 'ysflight-server.desktop'
+ 'ysflight.png'
+ 'ysflight.sh')
+md5sums=('2257ce6d2041f55f7a17a1d4034983af'
+ 'd137828b093f2e16f289f5a3d922f31c'
+ 'eb042809766b50b7195065f8d2e0692b'
+ 'a544483da4de1585434c0c134eb60be0'
+ 'a72ce06ebea39126edd88d512d763115')
+
+build() {
+ cd "${srcdir}/"
+ sed -i "s#YSFLIGHT_DIR#${ysflight_dir}#g" ysflight.sh
+}
+
+package() {
+ cd "${pkgdir}/"
+
+ mkdir -p "$(dirname "${ysflight_dir#/}")"
+ cp -a "${srcdir}/Ysflight" "${ysflight_dir#/}"
+ find "${ysflight_dir#/}" -type d -exec chmod 755 {} \;
+ find "${ysflight_dir#/}" ! -type d -exec chmod 444 {} \;
+ chmod 555 "${ysflight_dir#/}"/ysflight/ysflight*_*
+
+ install -Dm755 "${srcdir}/ysflight.sh" usr/bin/ysflight
+ touch usr/bin/ysflight
+ ln -s ysflight usr/bin/ysflight-server
+ install -Dm444 "${srcdir}/ysflight.png" usr/share/pixmaps/ysflight.png
+ install -Dm755 "${srcdir}/ysflight.desktop" usr/share/applications/ysflight.desktop
+ install -Dm755 "${srcdir}/ysflight-server.desktop" usr/share/applications/ysflight-server.desktop
+}
diff --git a/ysflight-server.desktop b/ysflight-server.desktop
new file mode 100755
index 000000000000..76caadd8c56d
--- /dev/null
+++ b/ysflight-server.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Server for YsFlight
+Name[fr]=Serveur YsFlight
+Comment=A portable flight simulator
+Comment[fr]=Simulateur de vol multi-plateformes
+Exec=ysflight-server
+Icon=ysflight
+Terminal=true
+Categories=Game;Simulation;
diff --git a/ysflight.desktop b/ysflight.desktop
new file mode 100755
index 000000000000..47feac6cf89b
--- /dev/null
+++ b/ysflight.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=YsFlight
+Comment=A portable flight simulator
+Comment[fr]=Simulateur de vol multi-plateformes
+Exec=ysflight
+Icon=ysflight
+Terminal=false
+Categories=Game;Simulation;
diff --git a/ysflight.png b/ysflight.png
new file mode 100644
index 000000000000..02181eafcf68
--- /dev/null
+++ b/ysflight.png
Binary files differ
diff --git a/ysflight.sh b/ysflight.sh
new file mode 100755
index 000000000000..947d4ff24cf4
--- /dev/null
+++ b/ysflight.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# Mirror files to the home directory
+if [ ! -d "$HOME/.config/ysflight" ]; then
+ [ -d "$HOME/.config" ] || mkdir "$HOME/.config"
+ cp -r "YSFLIGHT_DIR/ysflight/config" "$HOME/.config/ysflight"
+fi
+if [ -d "$HOME/.cache/ysflight" ] && [ "$0" -nt "$HOME/.cache/ysflight" ]; then
+ rm -rf "$HOME/.cache/ysflight"
+fi
+if [ ! -d "$HOME/.cache/ysflight" ]; then
+ mkdir -p "$HOME/.cache/ysflight"
+ # lndir without lndir…
+ find "YSFLIGHT_DIR/ysflight" -mindepth 1 -printf '%y\t%P\n' \
+ | while IFS=$'\t' read t n; do case $t in
+ d) mkdir "$HOME/.cache/ysflight/$n" ;;
+ *) ln -s "YSFLIGHT_DIR/ysflight/$n" "$HOME/.cache/ysflight/$n" ;;
+ esac; done
+ rm -rf "$HOME/.cache/ysflight/config"
+ ln -s "$HOME/.config/ysflight" "$HOME/.cache/ysflight/config"
+fi
+
+# Launch YsFlight
+cd "$HOME/.cache/ysflight/"
+arch=$(uname -m | grep -o 64 || echo 32)
+conf="$HOME/.config/ysflight/archlinux"
+
+if [ "${0##*/}" == 'ysflight-server' ]; then
+ exec ./ysflight${arch}_nownd "$@"
+else
+ # Setup
+ while [ ! -f "$HOME/.config/ysflight/archlinux" ]; do
+ version=$(zenity --list --radiolist --print-column=2 --hide-column=2 \
+ --title 'Choose your YsFlight binary' \
+ --text "The choice is stored in ${conf}; remove this file to get this dialog again." \
+ --column="Choice" --column "" --column="Binary" \
+ 1 gl1 'OpenGL 1.x' \
+ 2 gl2 'OpenGL 2.0' || exit 1)
+ [ -n "$version" ] && printf 'version="%s"\n' "$version" >"$conf"
+ done
+ . "$conf"
+ # Run
+ exec ./ysflight${arch}_${version} "$@"
+fi