diff --git a/hyprland-git/PKGBUILD b/hyprland-git/PKGBUILD index f1f9693..8d5a571 100644 --- a/hyprland-git/PKGBUILD +++ b/hyprland-git/PKGBUILD @@ -1,121 +1,90 @@ -# Maintainer: FabioLolix -# Maintainer: éclairevoyant -# Contributor: ThatOneCalculator +# Maintainer: ThatOneCalculator -pkgname=hyprland-git -pkgver=0.30.0.r95.8af3e7be +_pkgname="hyprland" +pkgname="${_pkgname}-git" +pkgver=r3423.ffacd2ef pkgrel=1 pkgdesc="A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks." -arch=(x86_64 aarch64) +arch=(any) url="https://github.com/hyprwm/Hyprland" -license=(BSD) -depends=(cairo - gcc-libs - glib2 - glibc - glslang - libdisplay-info - libdrm - libglvnd - libinput - libliftoff - libx11 - libxcb - libxcomposite - libxfixes - libxkbcommon - libxrender - opengl-driver - pango - pixman - pixman - polkit - seatd - systemd-libs - vulkan-icd-loader - vulkan-validation-layers - wayland - wayland-protocols - xcb-proto - xcb-util - xcb-util-errors - xcb-util-keysyms - xcb-util-renderutil - xcb-util-wm - xorg-xinput - xorg-xwayland) -depends+=(libdisplay-info.so) -makedepends=(cmake - gdb - git - meson - ninja - vulkan-headers - xorgproto) -provides=("hyprland=${pkgver%%.r*}") -conflicts=(hyprland) -source=("git+https://github.com/hyprwm/Hyprland.git" - "git+https://gitlab.freedesktop.org/wlroots/wlroots.git" - "git+https://github.com/hyprwm/hyprland-protocols.git" - "git+https://github.com/canihavesomecoffee/udis86.git" - "git+https://github.com/wolfpld/tracy.git") -b2sums=('SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP') - -pick_mr() { - git pull origin pull/$1/head --no-edit -} - -prepare() { - cd Hyprland - git submodule init - git config submodule.wlroots.url "$srcdir/wlroots" - git config submodule.subprojects/hyprland-protocols.url "$srcdir/hyprland-protocols" - git config submodule.subprojects/udis86.url "$srcdir/udis86" - git config submodule.subprojects/tracy.url "$srcdir/tracy" - git -c protocol.file.allow=always submodule update - - if [[ -z "$(git config --get user.name)" ]]; then - git config user.name local && git config user.email '<>' && git config commit.gpgsign false - fi - # Pick pull requests from github using `pick_mr `. - - pushd subprojects/wlroots - patch -p1 < ../packagefiles/wlroots-meson-build.patch - popd -} +license=('BSD') +depends=( + libxcb + xcb-proto + xcb-util + xcb-util-keysyms + libxfixes + libx11 + libxcomposite + xorg-xinput + libxrender + pixman + wayland-protocols + cairo + pango + polkit + glslang + libinput + libxcb + libxkbcommon + opengl-driver + pixman + wayland + xcb-util-errors + xcb-util-renderutil + xcb-util-wm + seatd + vulkan-icd-loader + vulkan-validation-layers + xorg-xwayland + libliftoff + libdisplay-info + pango) +makedepends=( + git + cmake + ninja + gcc + gdb + meson + vulkan-headers + wayland-protocols + xorgproto) +source=("${_pkgname}::git+https://github.com/hyprwm/Hyprland.git") +conflicts=("${_pkgname}") +provides=(hyprland) +sha256sums=('SKIP') +options=(!makeflags !buildflags !strip) pkgver() { - git -C Hyprland describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g' + cd "$_pkgname" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) } build() { - cd Hyprland - - arch-meson build --buildtype=release -Db_pch=false -Ddefault_library=shared - ln -sf wlroots build/subprojects/wlroots/include/wlr - meson compile -C build + cd "${srcdir}/${_pkgname}" + git submodule update --init + make fixwlr + cd "./subprojects/wlroots/" && meson build/ --prefix="${srcdir}/tmpwlr" --buildtype=release && ninja -C build/ && mkdir -p "${srcdir}/tmpwlr" && ninja -C build/ install && cd ../ + cd udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) && cd ../.. + make protocols + make release + cd ./hyprctl && make all && cd .. } package() { - cd Hyprland - - meson install -C build --destdir "$pkgdir" - - rm -rf "$pkgdir/usr/include/hyprland/wlroots/wlr" - ln -sf . "$pkgdir/usr/include/hyprland/wlroots/wlr" - # resolve conflicts with system wlr - rm "$pkgdir/usr/lib/libwlroots.so" - rm "$pkgdir/usr/lib/pkgconfig/wlroots.pc" - # resolve conflicts with xdg-desktop-portal-hyprland from repo - rm -rf "$pkgdir/usr/share/xdg-desktop-portal" - # FIXME: meson.build shall install version.h - install -Dm0644 -t "$pkgdir/usr/include/hyprland/src" src/version.h - - # license - install -Dm0644 -t "$pkgdir/usr/share/licenses/${pkgname}" LICENSE + cd "${srcdir}/${_pkgname}" + mkdir -p "${pkgdir}/usr/share/wayland-sessions" + mkdir -p "${pkgdir}/usr/share/hyprland" + install -Dm755 build/Hyprland -t "${pkgdir}/usr/bin" + install -Dm755 hyprctl/hyprctl -t "${pkgdir}/usr/bin" + install -Dm644 assets/*.png -t "${pkgdir}/usr/share/hyprland" + install -Dm644 example/hyprland.desktop -t "${pkgdir}/usr/share/wayland-sessions" + install -Dm644 example/hyprland.conf -t "${pkgdir}/usr/share/hyprland" + install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}" + install -Dm755 ../tmpwlr/lib/libwlroots.so.12032 -t "${pkgdir}/usr/lib" } -# vi: et ts=2 sw=2 +