summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e18492e5a807ce55b3f64680e1e049b4c630555c (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Maintainer: catsout <outline941 at live.com>
# Contributor: Epix <epixtm@protonmail.com>
# Contributor: Manuel Hüsers <aur@huesers.de>


pkgname=plasma6-wallpapers-wallpaper-engine-git
pkgver=0.5.4.r74.gdad1870
pkgrel=1
pkgdesc="A simple kde wallpaper plugin integrating wallpaper engine"
arch=('x86_64')
url="https://github.com/catsout/wallpaper-engine-kde-plugin"
license=('GPL-2.0-only')
depends=(
    "plasma5support" "gst-libav" "python-websockets" "qt6-declarative"
    "qt6-websockets" "qt6-webchannel" "vulkan-driver" "libplasma"
    "kpackage" "qt6-5compat" "qt6-webengine" "qt6-multimedia"
    "plasma-workspace" "kdeclarative"
)
makedepends=(
    "vulkan-headers" "extra-cmake-modules" "git" "cmake" "mpv"
)
optdepends=(
	"mpv: alternative video backend"
)
provides=("plasma6-wallpapers-wallpaper-engine")
conflicts=("plasma6-wallpapers-wallpaper-engine")
source=(
    "${pkgname}::git+${url}.git#branch=qt6"
    "backend_scene::git+https://github.com/catsout/wallpaper-scene-renderer.git"
    "git+https://github.com/KhronosGroup/glslang.git"
    "nlohmann::git+https://github.com/nlohmann/json.git"
    "git+https://github.com/KhronosGroup/SPIRV-Reflect.git"
    "Eigen::git+https://gitlab.com/libeigen/eigen.git"
    "git+https://github.com/mackron/miniaudio.git"
    "git+https://github.com/google/googletest.git"
)
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

prepare(){
    declare -ra modules=(
      "${srcdir}/${pkgname}" "${srcdir}/${pkgname}/src/backend_scene"
      "${srcdir}/${pkgname}/src/backend_scene/third_party/SPIRV-Reflect"
    )
    for p in "${modules[@]}"
    do
        cd "${p}"
        git submodule init
        grep submodule .gitmodules | sed 's/\[submodule "//;s/"\]//' | while read -r module
        do
            repo=$(basename "${module}")
            git config "submodule.${module}.url" "${srcdir}/${repo}"
        done
        git -c protocol.file.allow=always submodule update
    done
}
pkgver(){
    cd "${srcdir}/${pkgname}"
    git describe --tags --long | sed 's/v//;s/-/.r/;s/-/./g'
}
build(){
    cmake -B build -S "${srcdir}/${pkgname}" \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=None \
        -DQT_MAJOR_VERSION=6 \
        -DBUILD_QML=ON \
        -DUSE_PLASMAPKG=OFF \
        -DSPIRV_REFLECT_STATIC_LIB=ON
    cmake --build build
}
package(){
    DESTDIR="${pkgdir}" cmake --install build
}