void-packages/srcpkgs/flightgear/template
Enno Boland f40cd77686 srcpkgs: remove pullmoll from maintainers field. 😢
Set them to Orphaned for now.

If you'd like to pick up a package, feel free.
2021-04-10 16:34:44 +02:00

61 lines
2.2 KiB
Bash

# Template file for 'flightgear'
pkgname=flightgear
version=2020.1.3
revision=2
build_style=cmake
configure_args="-DFG_DATA_DIR:STRING=/usr/share/flightgear/fgdata
-DOpenGL_GL_PREFERENCE=GLVND -DTRANSLATIONS_SRC_DIR=${wrksrc}/fgdata/Translations"
hostmakedepends="fltk gettext pkg-config $(vopt_if qt qt5-tools)"
makedepends="MesaLib-devel boost-devel freealut-devel libevent-devel
libfreeglut-devel fltk-devel libglvnd-devel libgsm-devel glew-devel speex-devel
sqlite-devel osg-devel plib-devel libcurl-devel simgear
$(vopt_if qt 'qt5-devel qt5-tools-devel qt5-declarative-devel qt5-svg-devel')"
depends="flightgear-data>=${version}"
short_desc="Sophisticated flight simulator"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://www.flightgear.org/"
distfiles="
$SOURCEFORGE_SITE/project/flightgear/release-${version%.*}/${pkgname}-${version}.tar.bz2
$SOURCEFORGE_SITE/project/flightgear/release-${version%.*}/FlightGear-${version}-data.tar.bz2"
checksum="
1f07e8ef2c558dae3b9738e313b57e711d38e569f85d49fc2c5ae647e3949a17
2196f4ffcdeaae3a8b0a2b6ebf62a456bfd0198abb6c0619f763204d89804a03"
python_version=2
nocross=https://build.voidlinux.org/builders/armv7l-musl_builder/builds/4773/steps/shell_3/logs/stdio
build_options="qt"
build_options_default="qt"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-host-tools $(vopt_if qt 'qt5-devel qt5-declarative-devel')"
fi
# Suppress warnings regarding auto_ptr
CXXFLAGS="-Wno-deprecated-declarations"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" libexecinfo-devel"
configure_args+=" -DCMAKE_EXE_LINKER_FLAGS=-lexecinfo"
fi
post_extract() {
if [ -d "${wrksrc}/../fgdata" ]; then
mv ${wrksrc}/../fgdata ${wrksrc}
fi
}
post_install() {
vinstall package/org.flightgear.FlightGear.desktop 644 usr/share/applications
vinstall package/flightgear.ico 644 usr/share/icons
vinstall ${FILESDIR}/flightgear.png 644 usr/share/pixmaps
sed -i ${DESTDIR}/usr/share/applications/*.desktop \
-e "s;Exec=.*;Exec=fgfs --fg-root=/usr/share/flightgear/fgdata;"
}
flightgear-data_package() {
short_desc+=" - data files"
pkg_install() {
vmkdir usr/share/flightgear
mv ${wrksrc}/fgdata ${PKGDESTDIR}/usr/share/flightgear
}
}