mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
80 lines
3.1 KiB
Bash
80 lines
3.1 KiB
Bash
pkgbase=flightgear
|
|
pkgname=('flightgear' 'flightgear-data')
|
|
pkgver=2017.3.1
|
|
pkgrel=1
|
|
_pkgver=${pkgver%.*}
|
|
pkgdesc="An open-source, multi-platform flight simulator."
|
|
url="http://www.flightgear.org/"
|
|
arch=('x86_64')
|
|
depends=('fltk' 'libxmu' 'libxi' 'openal' 'openscenegraph' 'zlib' 'subversion' 'libxrandr' 'glu')
|
|
makedepends=('boost' 'cmake' 'mesa' 'sharutils' 'qt5-base' 'plib' 'freeglut' 'freealut' 'glew' 'qt5-declarative')
|
|
license=('GPL')
|
|
screenshot="http://www.flightgear.org/wp-content/gallery/gallery-v2-6/737-300_egkk_hom.jpg"
|
|
categories=('games')
|
|
options=('!makeflags' '!strip')
|
|
source=( #flightgear
|
|
"http://downloads.sourceforge.net/project/flightgear/release-$_pkgver/flightgear-$pkgver.tar.bz2"
|
|
# flightgear-data
|
|
"http://downloads.sourceforge.net/project/flightgear/release-$_pkgver/FlightGear-$pkgver-data.tar.bz2"
|
|
# addons - global object and sharedmodels (from latest version)
|
|
# "http://downloads.sourceforge.net/project/flightgear/scenery/GlobalObjects.tgz"
|
|
# "http://downloads.sourceforge.net/project/flightgear/scenery/SharedModels.tgz"
|
|
#simgear
|
|
"http://downloads.sourceforge.net/project/flightgear/release-$_pkgver/simgear-$pkgver.tar.bz2")
|
|
sha1sums=('058f6694ee2132b31c4e8ed9933a060fa66fac7a'
|
|
'c42dd213b20fe3ba4ffac259308696fe57d2152f'
|
|
'34c7aab6723a157a51fc87eb3d047d44be2ccce3')
|
|
|
|
prepare() {
|
|
mkdir -p fake_install
|
|
}
|
|
|
|
build() {
|
|
#build simgear
|
|
cd simgear-$pkgver
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib .
|
|
make
|
|
make DESTDIR=../fake_install install
|
|
|
|
# build flightgear
|
|
cd ../$pkgbase-$pkgver
|
|
INCLUDEPATH+=../fake_install/usr/include/simgear
|
|
LD_PRELOAD=../fake_install/usr/lib/{libSimGearCore.a,libSimGearScene.a}
|
|
cmake \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DFG_DATA_DIR:STRING="/usr/share/flightgear/data" \
|
|
-DSimGear_DIR=../fake_install/usr/lib/cmake/SimGear
|
|
# uudecode -o package/flightgear.png package/flightgear.png.uue
|
|
make
|
|
sed -i 's|Exec=.*|Exec=fgfs --fg-root=/usr/share/flightgear/data|' package/org.flightgear.FlightGear.desktop
|
|
}
|
|
|
|
package_flightgear() {
|
|
depends+=('flightgear-data' 'qt5-base')
|
|
|
|
cd $pkgbase-$pkgver
|
|
|
|
make DESTDIR=$pkgdir install
|
|
|
|
# Desktop Integration
|
|
install -Dm0644 package/org.flightgear.FlightGear.desktop $pkgdir/usr/share/applications/org.flightgear.FlightGear.desktop
|
|
install -Dm0644 package/flightgear.ico $pkgdir/usr/share/icons/flightgear.ico
|
|
# install -Dm0644 package/flightgear.png $pkgdir/usr/share/icons/flightgear.png
|
|
install -Dm0644 scripts/completion/fg-completion.bash $pkgdir/usr/share/bash-completion/completions/fgfs
|
|
ln -sf flightgear $pkgdir/usr/share/FlightGear
|
|
}
|
|
|
|
package_flightgear-data(){
|
|
pkgdesc="Base-Data for FlightGear - contains aircraft and world map addons"
|
|
arch=('x86_64')
|
|
|
|
install -d $pkgdir/usr/share/flightgear
|
|
mv fgdata/ $pkgdir/usr/share/flightgear/data
|
|
# use aircraft addon
|
|
# cp -r Models/* $pkgdir/usr/share/flightgear/data/Models
|
|
# use world map addon
|
|
# cp -r Objects/* $pkgdir/usr/share/flightgear/data/Scenery/Objects
|
|
chown root:root $pkgdir/usr/share/flightgear/data
|
|
}
|