summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8d728b14f0afd1125b11f7b93ec43c6f15c6a3c9 (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
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: thyTwilightGoth <https://aur.archlinux.org/account/thyTwilightGoth>
# Contributor: Pedro <https://aur.archlinux.org/account/PedroHLC>

pkgname=wlcs-git
pkgver=1.7.0.r79.ge7c53c8
pkgrel=2
pkgdesc="Canonical's protocol-conformance-verifying test suite for Wayland compositor implementations."
arch=(x86_64 i686 armv7h aarch64)
url="https://github.com/canonical/wlcs"
license=('GPL-2.0-or-later OR GPL-3.0-or-later')
depends=(glibc gcc-libs gtest wayland) #boost-libs
makedepends=(git cmake boost wayland-protocols)
provides=(wlcs)
conflicts=(wlcs)
source=("git+https://github.com/canonical/wlcs.git")
sha512sums=('SKIP')

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

build() {
  export CFLAGS+=" -Wno-error=unused-result -Wno-error=maybe-uninitialized"
  export CXXFLAGS+=" -Wno-error=unused-result -Wno-error=maybe-uninitialized"

	local _flags=(
    -DCMAKE_INSTALL_LIBDIR=lib/
    -DCMAKE_INSTALL_LIBEXECDIR=bin/
	)

  cmake -B build -S "wlcs" -Wno-dev \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    "${_flags[@]}"

  cmake --build build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
}