hyprland/debian/rules

41 lines
1.5 KiB
Makefile
Executable File

#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O2
export DEB_BUILD_HARDENING_FORTIFY = 1
%:
dh $@
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/src/wlroots-stamp
rm -f subprojects/udis86/libudis86/itab*
rm -rf subprojects/wlroots/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
#override_dh_auto_configure:
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_TARGET_MULTIARCH)"