2016-03-02 07:34:47 +08:00
|
|
|
pkgbase=flightgear
|
|
|
|
pkgname=('flightgear' 'flightgear-data')
|
2016-09-15 14:46:42 +08:00
|
|
|
pkgver=2016.3.1
|
|
|
|
_pkgver=2016.3
|
2016-05-18 13:11:07 +08:00
|
|
|
pkgrel=1
|
2011-05-13 09:43:18 +08:00
|
|
|
pkgdesc="An open-source, multi-platform flight simulator."
|
2014-04-04 18:53:29 +08:00
|
|
|
arch=('x86_64')
|
2016-03-02 07:34:47 +08:00
|
|
|
depends=('fltk' 'libxmu' 'libxi' 'openal' 'openscenegraph' 'zlib' "simgear=$pkgver" 'subversion' 'libxrandr' 'glu')
|
|
|
|
makedepends=('boost' 'cmake' 'mesa' 'sharutils' "simgear=$pkgver")
|
|
|
|
license=('GPL')
|
|
|
|
url="http://flightgear.sourceforge.net/"
|
2012-04-15 03:36:44 +08:00
|
|
|
screenshot="http://www.flightgear.org/wp-content/gallery/gallery-v2-6/737-300_egkk_hom.jpg"
|
2012-03-07 19:00:46 +08:00
|
|
|
categories=('games')
|
2016-03-02 07:34:47 +08:00
|
|
|
options=('!makeflags' '!strip')
|
2016-05-18 13:11:07 +08:00
|
|
|
source=(# flightgear
|
2016-03-02 07:34:47 +08:00
|
|
|
"http://downloads.sourceforge.net/project/flightgear/release-$_pkgver/flightgear-$pkgver.tar.bz2"
|
2016-05-18 13:11:07 +08:00
|
|
|
"build-fix.patch"
|
2016-03-02 07:34:47 +08:00
|
|
|
# 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")
|
2016-09-15 14:46:42 +08:00
|
|
|
sha1sums=('77f18e78a8310b7a936abba386bac66223d7ee4a'
|
2016-05-18 13:11:07 +08:00
|
|
|
'3261cab4abe211c86602cdf3965a612407f77f9d'
|
2016-09-15 14:46:42 +08:00
|
|
|
'c6f63b5868c91f160f1adb6c5775b781cc8143f2'
|
|
|
|
'62d1c85661bccfe3f7bfd0075cddeed05bb6692e'
|
|
|
|
'86acad2b4067960a95615d25dcd54a6a2bfd3ecb')
|
2016-05-18 13:11:07 +08:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd $srcdir/flightgear-$pkgver
|
|
|
|
patch -p1 -i $srcdir/build-fix.patch
|
|
|
|
}
|
2011-05-13 09:43:18 +08:00
|
|
|
|
|
|
|
build() {
|
2014-04-04 18:53:29 +08:00
|
|
|
|
2016-03-02 07:34:47 +08:00
|
|
|
# build flightgear
|
|
|
|
cd $pkgbase-$pkgver
|
2012-04-15 03:36:44 +08:00
|
|
|
cmake \
|
2014-04-04 18:53:29 +08:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
|
|
-DFG_DATA_DIR:STRING="/usr/share/flightgear/data" .
|
|
|
|
uudecode -o package/flightgear.png package/flightgear.png.uue
|
2011-05-13 09:43:18 +08:00
|
|
|
make
|
2016-03-02 07:34:47 +08:00
|
|
|
sed -i 's|Exec=.*|Exec=fgfs --fg-root=/usr/share/flightgear/data|' package/flightgear.desktop
|
2011-05-13 09:43:18 +08:00
|
|
|
}
|
|
|
|
|
2016-03-02 07:34:47 +08:00
|
|
|
package_flightgear() {
|
|
|
|
depends=('flightgear-data')
|
2012-04-15 03:36:44 +08:00
|
|
|
|
2016-03-02 07:34:47 +08:00
|
|
|
cd $pkgbase-$pkgver
|
2012-04-15 03:36:44 +08:00
|
|
|
|
2011-05-13 09:43:18 +08:00
|
|
|
make DESTDIR=$pkgdir install
|
|
|
|
|
2014-04-04 18:53:29 +08:00
|
|
|
# Desktop Integration
|
|
|
|
install -Dm0644 package/flightgear.desktop $pkgdir/usr/share/applications/flightgear.desktop
|
|
|
|
install -Dm0644 package/flightgear.ico $pkgdir/usr/share/icons/flightgear.ico
|
|
|
|
install -Dm0644 package/flightgear.png $pkgdir/usr/share/icons/flightgear.png
|
2016-03-02 07:34:47 +08:00
|
|
|
install -Dm0644 scripts/completion/fg-completion.bash $pkgdir/usr/share/bash-completion/completions/fgfs
|
2014-04-04 18:53:29 +08:00
|
|
|
ln -sf flightgear $pkgdir/usr/share/FlightGear
|
2016-03-02 07:34:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package_flightgear-data(){
|
|
|
|
pkgdesc="Base-Data for FlightGear - contains aircraft and world map addons"
|
|
|
|
arch=('any')
|
2014-04-04 18:53:29 +08:00
|
|
|
|
2016-03-02 07:34:47 +08:00
|
|
|
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
|
2011-09-01 08:56:55 +08:00
|
|
|
}
|