archrelease: copy trunk to community-any
[ArchLinux/community.git] / river / trunk / PKGBUILD
blob2115e2d568acded30f247c3af119295b43226643
1 # Maintainer: Daurnimator <daurnimator@archlinux.org>
2 # Contributor: Andrea Feletto <andrea@andreafeletto.com>
4 pkgname=river
5 pkgver=0.2.4
6 pkgrel=1
7 pkgdesc='A dynamic tiling wayland compositor'
8 arch=('x86_64')
9 url='https://github.com/riverwm/river'
10 license=('GPL3')
11 depends=('libevdev'
12          'libxkbcommon'
13          'mesa'
14          'pixman'
15          'wayland'
16          'wlroots'
17          'xorg-xwayland')
18 makedepends=('scdoc'
19              'wayland-protocols'
20              'zig')
21 optdepends=('polkit: access seat through systemd-logind')
22 source=("https://github.com/riverwm/river/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"{,.sig})
23 validpgpkeys=('5FBDF84DD2278DB2B8AD8A5286DED400DDFD7A11') # Isaac Freund <mail@isaacfreund.com>
24 sha256sums=('26c1c41a65ce3804069afad6988410515cf478d2b76303ebc699766d3d4dc69f'
25             'SKIP')
27 build() {
28   cd "$pkgname-$pkgver"
29   
30   DESTDIR="build" zig build \
31     --prefix /usr \
32     --search-prefix /usr \
33     -Dtarget=native-linux.5.15-gnu.2.37 \
34     -Dcpu=baseline \
35     -Dpie \
36     -Drelease-safe \
37     -Dxwayland
40 check() {
41   cd "$pkgname-$pkgver"
42   
43   zig build test \
44     --prefix /usr \
45     --search-prefix /usr \
46     -Dtarget=native-linux.5.15-gnu.2.37 \
47     -Dcpu=baseline \
48     -Dpie \
49     -Drelease-safe \
50     -Dxwayland
53 package() {
54   cd "$pkgname-$pkgver"
56   cp -a build/* "$pkgdir"
58   install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
59   install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
60   install -Dm644 contrib/river.desktop -t "$pkgdir/usr/share/wayland-sessions"
62   install -d "$pkgdir/usr/share/$pkgname"
63   cp -a example "$pkgdir/usr/share/$pkgname"