summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1126604863daa1663362117bae910daa6bcf84eb (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
# 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.r108.g9e60b36
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=("gcc-libs" "glibc" "kcmutils" "kirigami" "libglvnd" "libplasma"
         "lz4" "qt6-base" "vulkan-icd-loader")
makedepends=("cmake" "extra-cmake-modules" "git" "mpv" "ninja" "vulkan-headers")
optdepends=("mpv: alternative video backend")
provides=("plasma6-wallpapers-wallpaper-engine")
conflicts=("plasma6-wallpapers-wallpaper-engine")
source=("${pkgname}::git+${url}.git#branch=main"
        "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" "file://${srcdir}/${repo}"
        done
        git -c protocol.file.allow=always submodule update --remote
    done
}
pkgver(){
    cd "${srcdir}/${pkgname}"
    git describe --tags --long | sed 's/v//;s/-/.r/;s/-/./g'
}
build(){
    cmake -B build -S "${srcdir}/${pkgname}" -G Ninja \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=None \
        -DQT_MAJOR_VERSION=6 \
        -DBUILD_QML=ON \
        -DUSE_PLASMAPKG=OFF
    cmake --build build
}
package(){
    depends+=("kdeclarative" "plasma-workspace" "plasma5support"
              "python" "python-websockets" "qt6-5compat"
              "qt6-declarative" "qt6-multimedia" "qt6-webchannel"
              "qt6-webengine" "qt6-websockets" "gst-libav")
    DESTDIR="${pkgdir}" cmake --install build
}