summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabioLolix2023-07-08 08:48:01 +0200
committerFabioLolix2023-07-08 08:48:01 +0200
commitca4cea7d08c14c69f2ca81e83809bc769a8eb041 (patch)
tree1c727f37007794ae7a4d221fdb5d103e6acc2352
parentbcd1db63e0a880697a6e59cb5e3ec0a7f3e9ea9e (diff)
downloadaur-ca4cea7d08c14c69f2ca81e83809bc769a8eb041.tar.gz
revision
-rw-r--r--PKGBUILD186
1 files changed, 111 insertions, 75 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 41d56f499703..5fc18a2d9393 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,89 +1,125 @@
# Maintainer: ThatOneCalculator <kainoa@t1c.dev>
-_pkgname="hyprland"
-pkgname="${_pkgname}-git"
-pkgver=r2580.71ef1bde
-pkgrel=3
+pkgname=hyprland-git
+pkgver=r3043.f49af187
+pkgrel=2
pkgdesc="A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks."
-arch=(any)
+arch=(x86_64 aarch64)
url="https://github.com/hyprwm/Hyprland"
-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}")
+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)
-sha256sums=('SKIP')
-options=(!makeflags !buildflags !strip)
+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")
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP')
pkgver() {
- 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)"
- )
+ cd Hyprland
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+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 -c protocol.file.allow=always submodule update
+
+ make fixwlr
+ sed -i '/^release:/{n;s/-D/-DCMAKE_SKIP_RPATH=ON -D/}' Makefile
+ # respect build flags to allow full RELRO
+ sed -i '/CXX/ s|)|) $(CXXFLAGS)|;/CXX/ s|$| $(LDFLAGS)|;' hyprctl/Makefile
}
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 ..
+ cd Hyprland
+ pushd subprojects/wlroots
+ meson build/ --prefix="$srcdir/tmpwlr" --buildtype=release
+ ninja -C build/
+ mkdir -p "$srcdir/tmpwlr"
+ ninja -C build/ install
+ popd
+ pushd subprojects/udis86
+ cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja
+ cmake --build ./build --config Release --target all
+ popd
+ make protocols
+ make release
+ pushd hyprctl
+ make all
}
package() {
- 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"
+ cd Hyprland
+ find src -name '*.hpp' -exec install -Dm0644 {} "$pkgdir/usr/include/hyprland/{}" \;
+ pushd subprojects/wlroots/include
+ find . -name '*.h' -exec install -Dm0644 {} "$pkgdir/usr/include/hyprland/wlroots/{}" \;
+ popd
+ pushd subprojects/wlroots/build/include
+ # fix $srcdir reference
+ sed -i '/ICONDIR/ s|".*"|"/usr/share/icons"|' config.h
+ find . -name '*.h' -exec install -Dm0644 {} "$pkgdir/usr/include/hyprland/wlroots/{}" \;
+ popd
+ mkdir -p "$pkgdir/usr/include/hyprland/protocols"
+ cp protocols/*-protocol.h "$pkgdir/usr/include/hyprland/protocols"
+ pushd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
+ popd
+ install -Dm0644 -t "$pkgdir/usr/share/pkgconfig" build/hyprland.pc
+ install -Dm0755 -t "$pkgdir/usr/bin" build/Hyprland
+ install -Dm0755 -t "$pkgdir/usr/bin" hyprctl/hyprctl
+ install -Dm0644 -t "$pkgdir/usr/share/hyprland" assets/*.png
+ install -Dm0644 -t "$pkgdir/usr/share/wayland-sessions" "example/hyprland.desktop"
+ install -Dm0644 -t "$pkgdir/usr/share/hyprland" "example/hyprland.conf"
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/${pkgname}" LICENSE
+ install -Dm0755 -t "$pkgdir/usr/lib" "$srcdir/tmpwlr/lib/libwlroots.so.12032"
}