desktop/marble/PKGBUILD
2019-01-08 21:37:37 +01:00

91 lines
2.6 KiB
Bash

# Include global configuration
pkgbase=marble
pkgname=(marble libastro marble-data)
pkgver=18.12.1
pkgrel=1
pkgdesc="Desktop Globe"
arch=(x86_64)
url="https://www.kde.org/applications/system/marble"
screenshot="http://www.kde.org/images/screenshots/marble.png"
license=(GPL)
makedepends=(extra-cmake-modules gpsd libwlocate phonon-qt5 qt5-webkit krunner kparts knewstuff qt5-tools) # quazip-qt5
options=('docs' 'debug')
source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig})
sha256sums=('9e3f078279f07dabf83dbc52f0cecf479020bbaf886ca9a3631e275509905541'
'SKIP')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid <aacid@kde.org>
F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck@kde.org>
prepare() {
mkdir -p build
# fix installation designer plugins path
sed 's|LIB_SUFFIX}/plugins|LIB_SUFFIX}/qt/plugins|g' -i $pkgbase-$pkgver/CMakeLists.txt
# only build the KDE app
sed -e '/mobile/d' \
-e '/qt/d' \
-e '/Quick/d' \
-e '/touch/d' \
-i $pkgbase-$pkgver/src/apps/CMakeLists.txt
}
build() {
cd build
cmake ../${pkgname}-${pkgver} \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DKDE_INSTALL_LIBDIR=lib \
-DKDE_INSTALL_SYSCONFDIR=/etc \
-DKDE_INSTALL_LIBEXECDIR=lib \
-DUDEV_RULES_INSTALL_DIR=/usr/lib/udev/rules.d \
-DBUILD_TESTING=OFF \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON "$@" \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_MARBLE_EXAMPLES=OFF \
-DBUILD_MARBLE_TOOLS=ON \
-DBUILD_MARBLE_TESTS=OFF \
-DMOBILE=OFF
make
}
package_libastro() {
pkgdesc='Marble astronomy library'
depends=(gcc-libs)
conflicts=('kdeedu-marble<15.07')
cd build/src/lib/astro
make DESTDIR="$pkgdir" install
}
package_marble() {
depends=(libastro marble-data qt5-webkit kparts knewstuff hicolor-icon-theme)
optdepends=('gpsd: GPS based geolocation'
'quazip-qt5: reading and displaying .kmz files'
'libwlocate: WLAN based geolocation'
'phonon-qt5: enables the use of audio and video content'
'krunner: Krunner plugin')
conflicts=('kdeedu-marble<15.04.3-1')
replaces=('kdeedu-marble')
groups=(kde-applications kdeedu)
cd build
make DESTDIR="$pkgdir" install
# provided by libastro
rm -r "$pkgdir"/usr/include/astro
rm -r "$pkgdir"/usr/lib/{libastro.*,cmake/Astro}
# provided by marble-data
rm -r "$pkgdir"/usr/share/{icons,marble/data,mime}
}
package_marble-data() {
pkgdesc='Data for Marble'
conflicts=('kdeedu-marble<15.07')
cd build/data
make DESTDIR="$pkgdir" install
}