summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c5bffcf43259b3afe6ce390eeb86d49de3954491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Maintainer: Sich <little_sich@tuta.io>
pkgname=celestia-qt5-git
pkgver=r7341.1e8446d40
pkgrel=1
pkgdesc="Real-time space simulation (git version with Qt5 and video capture)"
arch=(x86_64)
license=(GPL-2.0-or-later)
url="https://celestiaproject.space"
depends=('mesa' 'libepoxy' 'fmt' 'eigen' 'freetype2' 'libjpeg-turbo' 'libpng' 'glu' 'qt5-base' 'qt5-tools' 'ffmpeg' 'luajit')
makedepends=('git' 'cmake' 'make' 'boost' 'gperf' 'imagemagick')
provides=('celestia')
conflicts=('celestia')
source=(git+https://github.com/CelestiaProject/Celestia.git
        git+https://github.com/CelestiaProject/CelestiaContent.git)
sha512sums=('SKIP'
            'SKIP')

pkgver() {
    cd "$srcdir/Celestia"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd "$srcdir/Celestia"
    git submodule update --init
}

build() {
    cd "$srcdir/Celestia"
    cmake -B build \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DENABLE_QT5=ON \
        -DENABLE_FFMPEG=ON \
        -Wno-dev
    cd build && make
    cd "$srcdir/CelestiaContent"
    cmake -B build -DCMAKE_INSTALL_PREFIX=/usr
    cd build && make
}

package() {
    cd "$srcdir/Celestia/build"
    make DESTDIR="${pkgdir}" install
    cd "$srcdir/CelestiaContent/build"
    make DESTDIR="${pkgdir}" install
}