summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0eb92bf46d9b7ad609c2ad8edae67a63cf19c989 (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
# Maintainer: Solomon Choina <shlomochoina@gmail.com>
# Co-Maintainer: Frank Tao <frank.tao@uwaterloo.ca>
pkgname=wayfire-git
pkgver=0.7.3.r207.g5dbf0d0f
pkgrel=1
pkgdesc="3D wayland compositor"
arch=('x86_64')
url="https://github.com/WayfireWM/wayfire"
license=('MIT')
depends=('cairo' 'pango' 'doctest' 'freetype2' 'glm' 'nlohmann-json'
         'libdrm' 'libevdev' 'libglvnd' 'libinput' 'libjpeg' 
         'libpng' 'libxkbcommon' 'libxml2' 'pixman' 'polkit' 
         'pkgconf' 'seatd' 'xcb-util-errors' 'xcb-util-renderutil' 
         'xcb-util-wm' 'xorg-xwayland' 'wayland' 'wayland-protocols')
makedepends=('git' 'glslang' 'meson' 'ninja' 'cmake' 'vulkan-headers')
optdepends=('xorg-xeyes')
provides=("${pkgname%-git}" 'wlroots-git' 'wf-config-git')
conflicts=("$pkgname" 'wlroots-git' 'wlroots' 'wf-config-git' 'wf-config')
replaces=()
options=()

source=('git+https://github.com/WayfireWM/wayfire')
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/wayfire"
  tag=$(git tag -l | awk '/^[0-9.]+$/ {print $0} /^v{1}[0-9.]+$/ {print substr($0,2)}'|sort -n|tail -n1)
  printf "$tag.r%s.g%s" "$(git rev-list --count v${tag}..HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$srcdir/wayfire/"
    arch-meson \
        --buildtype=release \
        -Dxwayland=auto \
        -Duse_system_wlroots=disabled \
        -Duse_system_wfconfig=disabled \
        -Db_lto=true \
        -Db_pie=true \
        build
    ninja -C build
    sed "/WF_SRC_DIR/d" -i build/config.h
}


package() {
    cd "$srcdir/wayfire"
    DESTDIR="$pkgdir/" ninja -C build install
    install -Dm644 wayfire.desktop $pkgdir/usr/share/wayland-sessions/wayfire.desktop 
    cp wayfire.ini $pkgdir/usr/share
}