summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 18d9b88a1fd5c1eacae4fc2114b41517bb7d9586 (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
# Maintainer Xichen Zhou <xzhou@xeechou.net>

pkgname=taiwins-git
_pkgname=taiwins
pkgrel=1
pkgver=v0.2.0.r0.g5f1f4ea
pkgdesc="Tiling and floating wayland window manager focused on speed and size"
url="https://taiwins.org"
license=('GPL2')
source=("git+https://github.com/${_pkgname}/${_pkgname}#tag=v0.2.0")
md5sums=('SKIP')
arch=('x86_64')

depends=( 'glibc' 'wayland>=1.17' 'libxkbcommon' 'libinput' 'pixman>=0.25.0'
          'libdrm>=2.4.68' 'pam' 'systemd-libs' 'dbus' 'lua>=5.3.0' 'libxcursor'
          'cairo' 'fontconfig' 'freetype2' 'librsvg' 'libgl' 'libegl' 'libgles'
          'wlroots>=0.11.0')

makedepends=('meson' 'ninja' 'git' 'wayland-protocols>=1.18')

pkgver() {
    cd $srcdir/${_pkgname}
    git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    cd $srcdir/${_pkgname}
    git fetch origin --tag
    git submodule update --init --recursive
    if [ ! -d "subprojects/ctypes" ]; then
        meson wrap promote subprojects/twclient/subprojects/ctypes
    fi
    git submodule deinit subprojects/wlroots
    rm -rf subprojects/wlroots
    meson -Dbuildtype=release --prefix /usr build
}

build() {
    cd $srcdir/${_pkgname}
    ninja -C build
}

package() {
    cd $srcdir/${_pkgname}
    DESTDIR=$pkgdir ninja -C build install
    install -Dm644 $srcdir/${_pkgname}/subprojects/twclient/LICENSE "$pkgdir/usr/share/licenses/twclient/LICENSE"
    install -Dm644 $srcdir/${_pkgname}/LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}

#vim: syntax=sh