ysflight/PKGBUILD

65 lines
1.9 KiB
Bash
Raw Permalink Normal View History

2015-06-09 19:07:37 +02:00
# Maintainer: Yves G. <theYinYeti@yalis.fr>
pkgname=ysflight
pkgver=20181124
2023-12-27 22:56:37 +01:00
pkgrel=2
2015-06-09 19:07:37 +02:00
pkgdesc="A portable flight simulator"
arch=('x86_64')
2015-06-09 19:07:37 +02:00
url="http://wwwe.ysflight.com/"
license=('freeware')
2023-12-27 22:56:37 +01:00
depends=('glu')
makedepends=(python)
2015-06-09 19:07:37 +02:00
ysflight_dir="/opt/ysflight-$pkgver"
2023-12-27 22:56:37 +01:00
source=('YsflightForLinux.zip::https://ysflight.org/files/20181124YsflightForMacAndLinux.zip'
2015-06-09 19:07:37 +02:00
'ysflight.sh')
md5sums=('26a8f7bcc79eb710895547f052a09fef'
'540ca8dec29fec23c67f830c6cce5d5c')
prepare() {
cd "${srcdir}"
2015-06-09 19:07:37 +02:00
sed -i "s#YSFLIGHT_DIR#${ysflight_dir}#g" ysflight.sh
cd "${srcdir}/Ysflight"
sed -ri "
s#^([[:blank:]]*)input\\(.*#\\1pass#
s#join\\(\"~\",\"Desktop\"#join(\"${pkgdir}/usr/share/applications\"#
s#Exec=\"\\+exe#Exec=/usr/bin/\"+os.path.basename(exe)#
s#isfile\\(iconfile\\)#isfile(\"${pkgdir}\"+iconfile)#
/Path=/d
s#YSFLIGHTPATH=.*#YSFLIGHTPATH=\"${ysflight_dir}\"#
s#to ~/YSFLIGHT.COM/ysflight#to ${ysflight_dir}#
s#(isdir|rmtree)\\(YSFLIGHTPATH\\)#\\1(\"${pkgdir}\"+YSFLIGHTPATH)#
s#(copytree\\(FindYsflight.*,)YSFLIGHTPATH#\1\"${pkgdir}\"+YSFLIGHTPATH#
s#(FileCheck\\()YSFLIGHT#\1\"${pkgdir}\"+YSFLIGHT#
" InstallInLinux.py
2015-06-09 19:07:37 +02:00
}
package() {
echo '
[WARNING!]
[WARNING!] This installer does its best to enforce
[WARNING!] Linux standard file locations. Unfortunately,
[WARNING!]$HOME/Documents/YSFLIGHT.COM ”
[WARNING!] is hard-coded into the binary programs…
[WARNING!]
'
2015-06-09 19:07:37 +02:00
cd "${pkgdir}"
mkdir -p usr/bin usr/share/applications opt
cd "${srcdir}/Ysflight"
python InstallInLinux.py
cd "${pkgdir}"
2015-06-09 19:07:37 +02:00
find "${ysflight_dir#/}" -type d -exec chmod 755 {} \;
find "${ysflight_dir#/}" ! -type d -exec chmod 444 {} \;
chmod 555 "${ysflight_dir#/}"/ysflight64_*
install -Dm555 "${srcdir}/ysflight.sh" usr/bin/ysflight
2015-06-09 19:07:37 +02:00
touch usr/bin/ysflight
ln -s ysflight usr/bin/ysflight64_gl1
ln -s ysflight usr/bin/ysflight64_gl2
ln -s ysflight usr/bin/ysflight64_nownd
2015-06-09 19:07:37 +02:00
}