summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 40d8a58c62f46361ec3c7e2b7b18309c7cc09e7c (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
# Maintainer: Ferdinand Bachmann <ferdinand.bachmann@yrlf.at>
# Contributor: David Runge <dvzrv@archlinux.org>

_pkgbase=wl-mirror
pkgname=wl-mirror-git
pkgver=0.16.2.r0.g2abe912
pkgrel=2
pkgdesc="a simple Wayland output mirror client"
url="https://github.com/Ferdi265/wl-mirror"
arch=(x86_64)
license=(GPL3+)
provides=("wl-mirror=${pkgver%%.r*}")
conflicts=('wl-mirror')
depends=(
  bash
  glibc
  libglvnd
  wayland
)
makedepends=(
  cmake
  ninja
  scdoc
)
optdepends=(
  'slurp: for selecting regions and outputs in wl-present'
  'pipectl: for managing named pipes in wl-present'
  'wofi: for interactive selection of options in wl-present'
  'wmenu: for interactive selection of options in wl-present'
  'rofi: for interactively selecting options in wl-present'
  'dmenu: for interactive selection of options in wl-present'
)
source=(
  'git+https://github.com/Ferdi265/wl-mirror'
  'git+https://gitlab.freedesktop.org/wayland/wayland-protocols'
  'git+https://gitlab.freedesktop.org/wlroots/wlr-protocols'
)
sha512sums=('SKIP' 'SKIP' 'SKIP')
b2sums=('SKIP' 'SKIP' 'SKIP')

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

prepare() {
    cd "$_pkgbase"
    git submodule init
    git config submodule.proto/wayland-protocols.url "$srcdir/wayland-protocols"
    git config submodule.proto/wlr-protocols.url "$srcdir/wlr-protocols"
    git -c protocol.file.allow=always submodule update
}

build() {
  local cmake_options=(
    -B build
    -D CMAKE_BUILD_TYPE=None
    -D CMAKE_INSTALL_PREFIX=/usr
    -D INSTALL_EXAMPLE_SCRIPTS=ON
    -D INSTALL_DOCUMENTATION=ON
    -G Ninja
    -S $_pkgbase
    )

  cmake "${cmake_options[@]}"
  cmake --build build --verbose
}

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