summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8a1d953a6dafda87d27487eb49657f7b21484db5 (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
pkgname=vkpeak
pkgver=20240505
pkgrel=1
pkgdesc="A tool which profiles Vulkan devices to find their peak capacities"
arch=('x86_64')
url="https://github.com/nihui/vkpeak"
license=('MIT')
source=("${pkgname}::git+https://github.com/nihui/vkpeak.git#tag=${pkgver}"
        "ncnn::git+https://github.com/Tencent/ncnn.git")
depends=('vulkan-icd-loader')
makedepends=('cmake' 'glslang' 'ninja' 'protobuf' 'vulkan-headers')
sha256sums=('SKIP' 'SKIP')

prepare() {
    cd "${srcdir}/${pkgname}"
    git submodule init
    git config submodule."ncnn".url "${srcdir}/ncnn"
    git -c protocol.file.allow=always submodule update --init --recursive
}
build(){
    cd "${srcdir}/${pkgname}"

    rm -rf build
    mkdir build

    cd build
    cmake ..
    cmake --build . -j $(nproc)
}

package() {
    cd "${srcdir}/${pkgname}"

    install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/vkpeak/LICENSE
    install -Dm755 build/vkpeak "${pkgdir}/usr/bin/vkpeak"
}