archrelease: copy trunk to community-any
[arch-community.git] / hyprland / trunk / PKGBUILD
blob2f6729fc101e25af6e5cfabd239939012afe1355
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: ThatOneCalculator <kainoa@t1c.dev>
4 pkgname=hyprland
5 pkgver=0.25.0
6 pkgrel=1
7 pkgdesc='a highly customizable dynamic tiling Wayland compositor'
8 arch=(x86_64 aarch64)
9 url="https://github.com/hyprwm/${pkgname^}"
10 license=(BSD)
11 depends=(cairo
12          gcc-libs
13          glibc
14          glslang
15          libdisplay-info
16          libdrm
17          libglvnd
18          libinput
19          libliftoff
20          libx11
21          libxcb
22          libxcomposite
23          libxfixes
24          libxkbcommon
25          libxrender
26          opengl-driver
27          pango
28          pixman
29          pixman
30          polkit
31          seatd
32          systemd-libs
33          vulkan-icd-loader
34          vulkan-validation-layers
35          wayland
36          wayland-protocols
37          xcb-proto
38          xcb-util
39          xcb-util-errors
40          xcb-util-keysyms
41          xcb-util-renderutil
42          xcb-util-wm
43          xorg-xinput
44          xorg-xwayland)
45 depends+=(libdisplay-info.so)
46 makedepends=(cmake
47              gdb
48              meson
49              ninja
50              vulkan-headers
51              xorgproto)
52 _archive="${pkgname^}-$pkgver"
53 source=("$_archive.tar.gz::$url/releases/download/v$pkgver/source-v$pkgver.tar.gz")
54 sha256sums=('c91029085daa80437b1ef5ac10cd849795a8ce32d36663eff949af5f9337217b')
56 prepare() {
57         ln -sf hyprland-source "$_archive"
58         cd "$_archive"
59         make fixwlr
60         sed -i -e '/^release:/{n;s/-D/-DCMAKE_SKIP_RPATH=ON -D/}' Makefile
61         # https://github.com/hyprwm/Hyprland/issues/2226
62         sed -i -e 's/\(.*GIT_COMMIT_HASH \)\(.*\)/\1"\2"/' src/defines.hpp
65 build() {
66         cd "$_archive"
67         pushd subprojects/wlroots
68         meson build/ --prefix="$srcdir/tmpwlr" --buildtype=release
69         ninja -C build/
70         mkdir -p "$srcdir/tmpwlr"
71         ninja -C build/ install
72         popd
73         pushd subprojects/udis86
74         cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja
75         cmake --build ./build --config Release --target all
76         popd
77         make protocols
78         make release
79         pushd hyprctl
80         make all
83 package() {
84         cd "$_archive"
85         install -Dm0755 -t "$pkgdir/usr/bin" build/Hyprland
86         install -Dm0755 -t "$pkgdir/usr/bin" hyprctl/hyprctl
87         install -Dm0644 -t "$pkgdir/usr/share/$pkgname" assets/*.png
88         install -Dm0644 -t "$pkgdir/usr/share/wayland-sessions" "example/$pkgname.desktop"
89         install -Dm0644 -t "$pkgdir/usr/share/$pkgname" "example/$pkgname.conf"
90         install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
91         install -Dm0755 -t "$pkgdir/usr/lib" "$srcdir/tmpwlr/lib/libwlroots.so.12032"