summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1d68a1e7af8184c3a127b3985b0d29a902e1f674 (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
80
81
82
83
84
85
86
87
88
#Maintainer: archdevlab <https://github.com/archdevlab>
#Credits: Laurent Carlier <lordheavym@gmail.com>

pkgname=vulkan-tools-git
pkgdesc='Vulkan Utilities and Tools (git version)'
pkgver=1.3.292.r1.g7d5cdf6
pkgrel=1
arch=(x86_64)
url='https://github.com/KhronosGroup/Vulkan-Tools'
license=(Apache-2.0)
makedepends=(cmake python vulkan-headers vulkan-icd-loader wayland-protocols glslang spirv-tools git ninja make volk)
depends=(libx11 wayland libvulkan.so)
conflicts=(vulkan-tools)
provides=(vulkan-tools vulkan-tools-git)
source=(git+https://github.com/KhronosGroup/Vulkan-Tools.git)

pkgver(){
 cd "${srcdir}"/Vulkan-Tools
 git describe --long --tags --abbrev=7 --match='v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build(){
  rm -rf "${srcdir}"/{build,build-wayland}

  #"${srcdir}"/Vulkan-Tools/scripts/update_deps.py --config release

  #cmake -C helper.cmake -B "${srcdir}"/build -S "${srcdir}"/Vulkan-Tools \
  cmake -B "${srcdir}"/build -S "${srcdir}"/Vulkan-Tools \
  -G Ninja \
  -D CMAKE_BUILD_TYPE=Release \
  -D CMAKE_INSTALL_PREFIX=/usr \
  -D CMAKE_INSTALL_BINDIR=bin \
  -D CMAKE_INSTALL_LIBDIR=lib \
  -D CMAKE_INSTALL_INCLUDEDIR=include \
  -D CMAKE_INSTALL_SYSCONFDIR=/etc \
  -D CMAKE_INSTALL_DATADIR=share \
  -D VULKAN_HEADERS_INSTALL_DIR=/usr \
  -D VOLK_INSTALL_DIR=/usr \
  -D VULKAN_LOADER_INSTALL_DIR=/usr \
  -D CMAKE_SKIP_RPATH=True \
  -D BUILD_WSI_XCB_SUPPORT=ON \
  -D BUILD_WSI_XLIB_SUPPORT=ON \
  -D BUILD_WSI_WAYLAND_SUPPORT=ON \
  -D BUILD_CUBE=ON \
  -D BUILD_VULKANINFO=ON \
  -D BUILD_ICD=OFF \
  -Wno-dev

  #cmake -C helper.cmake -B "${srcdir}"/build-wayland -S "${srcdir}"/Vulkan-Tools \
  cmake -B "${srcdir}"/build-wayland -S "${srcdir}"/Vulkan-Tools \
  -G Ninja \
  -D CMAKE_BUILD_TYPE=Release \
  -D CMAKE_INSTALL_PREFIX=/usr \
  -D CMAKE_INSTALL_BINDIR=bin \
  -D CMAKE_INSTALL_LIBDIR=lib \
  -D CMAKE_INSTALL_INCLUDEDIR=include \
  -D CMAKE_INSTALL_SYSCONFDIR=/etc \
  -D CMAKE_INSTALL_DATADIR=share \
  -D VULKAN_HEADERS_INSTALL_DIR=/usr \
  -D VOLK_INSTALL_DIR=/usr \
  -D VULKAN_LOADER_INSTALL_DIR=/usr \
  -D CMAKE_SKIP_RPATH=True \
  -D BUILD_WSI_XCB_SUPPORT=OFF \
  -D BUILD_WSI_XLIB_SUPPORT=OFF \
  -D BUILD_WSI_WAYLAND_SUPPORT=ON \
  -D BUILD_CUBE=ON \
  -D CUBE_WSI_SELECTION=WAYLAND \
  -D BUILD_VULKANINFO=OFF \
  -D BUILD_ICD=OFF \
  -Wno-dev

  ninja -j$(nproc) -C "${srcdir}"/build
  ninja -j$(nproc) -C "${srcdir}"/build-wayland
}

package(){
  DESTDIR="${pkgdir}" ninja -j$(nproc) -C "${srcdir}"/build install

  install -m755 "${srcdir}"/build-wayland/cube/vkcube-wayland "${pkgdir}"/usr/bin/

  # install license
  install -dm755 "${pkgdir}"/usr/share/licenses/"${pkgname}"
  install -m644 "${srcdir}"/Vulkan-Tools/LICENSE.txt "${pkgdir}"/usr/share/licenses/"${pkgname}"/
}

sha256sums=(SKIP)

# vim:set ts=8 sts=2 sw=2 et: