From 750153de678ae80b2a87bf7e3b4d0d6c1d485c08 Mon Sep 17 00:00:00 2001 From: "alan (NyxTrail)" Date: Mon, 17 Jun 2024 06:04:03 +0000 Subject: [PATCH] Improve d/rules - wlroots dependency is now statically built into the binary. Remove all special conditions that were written to take care of this. - Unapply patches applied to wlroots as part of clean target - Make dh_clean ignore scripts/generateVersion.sh.bak --- debian/rules | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/debian/rules b/debian/rules index db70cf8..eed7d55 100755 --- a/debian/rules +++ b/debian/rules @@ -10,32 +10,36 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O2 override_dh_auto_build: dh_auto_build -- PREFIX=/usr all -# Ignore makeshlibs. Our included binary is a custom copy of wlroots -# that is installed into a private directory (/usr/lib/hyprland/). -override_dh_makeshlibs: - : - override_dh_auto_install: - # chrpath -r /usr/lib/hyprland build/Hyprland # Fix permission on hyprland.pc (Hyprland sets 777 on everything in # build/ directory) chmod 644 build/hyprland.pc + # dh_auto_install auto detects the correct DESTDIR. # Modify PREFIX so that this DESTDIR is actually taken into account. # (Upstream Makefile supports PREFIX, but not DESTDIR) dh_auto_install -- PREFIX='$${DESTDIR}/usr' override_dh_clean: - dh_clean # call clear target provided by Hyprland make clear + # clean up some directories created during the build rm -rf subprojects/wlroots-hyprland/src/wlroots-hyprland-stamp rm -f subprojects/udis86/libudis86/itab* rm -rf subprojects/wlroots-hyprland/tmp - # Hyprland made this change. Revert it or dpkg-source will complain that - # meson.build does not match the one in the original source tarball - # sed -E -i -e 's/^soversion = .*/soversion = version_minor.to_int() - 5/g' subprojects/wlroots/meson.build + + # Reverse the patches in subprojects/wlroots-hyprland + cd subprojects/wlroots-hyprland ; \ + patches=$$(find patches/ -type f -name '*.patch') ; \ + echo $$patches ; \ + for PATCH in $$patches ; do \ + patch -p1 -r /dev/null -N --dry-run -s < $$PATCH || patch -p1 -r /dev/null -R -s < $$PATCH ; \ + done ; + + # Do not delete scripts/generateVersion.sh.bak + dh_clean -X scripts/generateVersion.sh.bak + #override_dh_auto_configure: # dh_auto_configure -- \