forked from void-linux/void-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
hyprland |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Template file for 'hyprland' | ||
pkgname=hyprland | ||
version=0.38.0 | ||
revision=1 | ||
build_style=cmake | ||
hostmakedepends="cpio glslang hwids jq meson | ||
ninja pkg-config wayland-devel" | ||
makedepends="cairo-devel hyprcursor hyprlang libdisplay-info-devel | ||
libdrm-devel libgbm-devel libglvnd-devel libinput-devel libliftoff-devel | ||
libseat-devel libxcb-devel libxkbcommon-devel pango-devel tomlplusplus | ||
wayland-devel wayland-protocols xcb-util-errors-devel | ||
xcb-util-renderutil-devel xcb-util-wm-devel xorg-server-xwayland" | ||
short_desc="Dynamic tiling Wayland compositor that doesn't sacrifice on its looks" | ||
maintainer="Makrennel <[email protected]>" | ||
license="BSD-3-Clause" | ||
homepage="https://hyprland.org/" | ||
changelog="https://github.com/hyprwm/Hyprland/releases" | ||
distfiles="https://github.com/hyprwm/Hyprland/archive/refs/tags/v${version}.tar.gz" | ||
checksum=da143e1d685b8d7f4a8b79142ad7030ebdb4e0d65a210accd934f421e7f9f4d6 | ||
|
||
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then | ||
makedepends+=" libexecinfo-devel" | ||
depends+=" libexecinfo" | ||
fi | ||
|
||
do_build() { | ||
# build hyprland | ||
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then | ||
cmake --no-warn-unused-cli \ | ||
-DCMAKE_CXX_FLAGS="-lexecinfo" \ | ||
-DCMAKE_BUILD_TYPE:STRING=Release \ | ||
-DNO_SYSTEMD:STRING=true \ | ||
-S . -B ./build -G Ninja | ||
else | ||
cmake --no-warn-unused-cli \ | ||
-DCMAKE_BUILD_TYPE:STRING=Release \ | ||
-DNO_SYSTEMD:STRING=true \ | ||
-S . -B ./build -G Ninja | ||
fi | ||
|
||
cmake --build ./build --config Release --target all -j${XBPS_MAKEJOBS} | ||
chmod -R 777 ./build | ||
} | ||
|
||
do_install() { | ||
# license | ||
vlicense LICENSE | ||
|
||
# binaries | ||
vbin build/Hyprland | ||
vbin build/hyprctl/hyprctl | ||
vbin build/hyprpm/hyprpm | ||
|
||
# assets | ||
vmkdir usr/share/wayland-sessions | ||
vmkdir usr/share/hyprland | ||
vmkdir usr/share/xdg-desktop-portal | ||
|
||
install -Dm0644 assets/*.png ${DESTDIR}/usr/share/hyprland | ||
vinstall assets/header.svg 644 usr/share/hyprland | ||
vinstall assets/hyprland-portals.conf 644 usr/share/xdg-desktop-portal | ||
vinstall example/hyprland.desktop 644 usr/share/wayland-sessions | ||
vinstall example/hyprland.conf 644 usr/share/hyprland | ||
|
||
vman docs/Hyprland.1 | ||
vman docs/hyprctl.1 | ||
|
||
# wlroots | ||
vinstall subprojects/wlroots/build/libwlroots.so.13032 644 usr/lib | ||
|
||
# headers | ||
vmkdir usr/include/hyprland | ||
vmkdir usr/include/hyprland/protocols | ||
vmkdir usr/include/hyprland/wlroots | ||
vmkdir usr/share/pkgconfig | ||
|
||
find src -name '*.h*' -print0 | cpio --quiet -0dump ${DESTDIR}/usr/include/hyprland | ||
|
||
pushd subprojects/wlroots/include | ||
find . -name '*.h*' -print0 | cpio --quiet -0dump ${DESTDIR}/usr/include/hyprland/wlroots | ||
popd | ||
|
||
pushd subprojects/wlroots/build/include | ||
find . -name '*.h*' -print0 | cpio --quiet -0dump ${DESTDIR}/usr/include/hyprland/wlroots | ||
popd | ||
|
||
vinstall build/hyprland.pc 644 usr/share/pkgconfig | ||
install -Dm0644 protocols/*-protocol.h ${DESTDIR}/usr/include/hyprland/protocols | ||
|
||
} | ||
|
||
hyprland-devel_package() { | ||
depends="${sourcepkg}>=${version}_${revision} ${hostmakedepends} ${makedepends}" | ||
short_desc="Dynamic tiling Wayland compositor - development files" | ||
pkg_install() { | ||
vmove usr/include | ||
vmove usr/share/pkgconfig | ||
} | ||
} |