desktop/libmarble4/PKGBUILD
2015-08-15 08:32:44 +00:00

58 lines
1.6 KiB
Bash

# Include global configuration
source ../kdeapps.conf
pkgname=libmarble4
_pkgname=marble
pkgver=${_kdever}
pkgrel=2
pkgdesc="KDE4 Marble libraries"
url="http://kde.org/applications/education/marble/"
arch=(x86_64)
license=(GPL LGPL FDL)
depends=(qtwebkit libastro marble-data)
makedepends=(cmake automoc4 gpsd libwlocate qt-mobility)
optdepends=('qt-mobility: enable QtMobility Location Provider' 'gpsd: GPS support' 'libwlocate: WLAN based geolocation')
conflicts=('kdeedu-marble')
provides=('kdeedu-marble')
source=("$_mirror/${_pkgname}-$pkgver.tar.xz")
sha256sums=(`grep ${_pkgname}-$pkgver.tar.xz ../checksums.txt | cut -d " " -f1`)
prepare() {
mkdir -p build
# rename include dir
sed -e 's|marble/MarbleModel.h|marble4/MarbleModel.h|' -i marble-$pkgver/FindMarble.cmake.in
}
build() {
cd build
cmake ../marble-$pkgver \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_MARBLE_TESTS=OFF \
-DBUILD_MARBLE_APPS=OFF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_RPATH=ON \
-DQTONLY=FALSE \
-DWITH_DESIGNER_PLUGIN=OFF \
-DQT5BUILD=FALSE \
-DMARBLE_PLUGIN_PATH=/usr/lib/marble4/plugins
make
}
package() {
cd build
make DESTDIR="$pkgdir" install
# move cmake file
install -Dm644 "$pkgdir"/usr/share/marble/cmake/FindMarble.cmake "$pkgdir"/usr/share/apps/cmake/modules/FindMarble.cmake
# remove files provided by libastro and marble-data
rm -r "$pkgdir"/usr/include/astro
rm -r "$pkgdir"/usr/lib/libastro.*
rm -r "$pkgdir"/usr/share/{appdata,applications,icons,marble}
# rename include dir to avoid conflicts with marble
mv "$pkgdir"/usr/include/marble{,4}
}