diff --git a/020_debian-kernel.sh b/020_debian-kernel.sh index d2cff5c..1f59d9c 100644 --- a/020_debian-kernel.sh +++ b/020_debian-kernel.sh @@ -33,17 +33,17 @@ mkdir -p ${PATCH_DIR} # --directory-prefix=${PATCHES_DIR} \ # https://github.com/LibreELEC/LibreELEC.tv/raw/master/projects/Rockchip/patches/linux/default/*.patch cp -a /space/code_repositories/test-kernel-patches/projects/LibreELEC.tv/projects/Rockchip/patches/linux/default/*.patch \ - ${PATCH_DIR} + ${PATCH_DIR} # Pull the upstream sources mkdir -p ${BUILD_DEST} gbp clone \ - --pristine-tar \ - --debian-branch=${DEBIAN_BRANCH} \ - --upstream-branch=${UPSTREAM_BRANCH} \ - --add-upstream-vcs \ - --verbose \ - https://salsa.debian.org/kernel-team/linux.git ${BUILD_DEST} + --pristine-tar \ + --debian-branch=${DEBIAN_BRANCH} \ + --upstream-branch=${UPSTREAM_BRANCH} \ + --add-upstream-vcs \ + --verbose \ + https://salsa.debian.org/kernel-team/linux.git ${BUILD_DEST} pushd ${BUILD_DEST} git checkout ${DEBIAN_BRANCH} diff --git a/020_hyprland.sh b/020_hyprland.sh index 7815aa5..678afda 100644 --- a/020_hyprland.sh +++ b/020_hyprland.sh @@ -1,1482 +1,31 @@ #!/usr/bin/env bash -set -x -# https://wiki.hyprland.org/Getting-Started/Installation/ - -# An example of a debian package source tree -# git clone https://salsa.debian.org/debian/hyprland.git - -# Install deps -# https://wiki.hyprland.org/Getting-Started/Installation/ - -# NB. Hyprland now statically links to its own fork of wlroots. -# https://github.com/hyprwm/wlroots-hyprland - -# Previous tree from the salsa packaged hyprland by lumin (Mo Zhou ) -## tree -L 3 /space/code_repositories/hyprland/hyprland/debian/ -## /space/code_repositories/hyprland/hyprland/debian/ -## ├── changelog -## ├── control -## ├── copyright -## ├── debhelper-build-stamp -## ├── files -## ├── hyprland -## │   ├── DEBIAN -## │   │   ├── control -## │   │   ├── md5sums -## │   │   ├── shlibs -## │   │   └── triggers -## │   └── usr -## │   ├── bin -## │   ├── lib -## │   └── share -## ├── hyprland-common -## │   ├── DEBIAN -## │   │   ├── control -## │   │   └── md5sums -## │   └── usr -## │   └── share -## ├── hyprland-common.install -## ├── hyprland-common.substvars -## ├── hyprland-dev -## │   ├── DEBIAN -## │   │   ├── control -## │   │   └── md5sums -## │   └── usr -## │   ├── include -## │   └── share -## ├── hyprland-dev.install -## ├── hyprland-dev.substvars -## ├── hyprland.install -## ├── hyprland.substvars -## ├── patches -## │   ├── make.patch -## │   └── series -## ├── rules -## ├── source -## │   └── format -## ├── tmp -## │   └── usr -## │   ├── bin -## │   ├── include -## │   ├── lib -## │   └── share -## └── watch - -conf_print_debian_control() { - cat <<'EOF' -Source: hyprland -Section: x11 -Homepage: https://hyprland.org/ -Priority: optional -Standards-Version: 4.6.2 -Vcs-Git: https://salsa.debian.org/debian/hyperland.git -Vcs-Browser: https://salsa.debian.org/debian/hyperland -Maintainer: Mo Zhou -Build-Depends: - debhelper-compat (= 13), - cmake, - cmake-extras, - meson, - ninja-build, - gettext, - gettext-base, - git, - fontconfig, - libfontconfig-dev, - libffi-dev, - libxml2-dev, - libdrm2, - libdrm-dev, - libxkbcommon-x11-dev, - libxkbregistry-dev, - libxkbcommon-dev, - libpixman-1-dev, - libudev-dev, - libseat-dev, - seatd, - libxcb-dri3-dev, - libvulkan-dev, - libvulkan-volk-dev, - libvkfft-dev, - libgulkan-dev, - libegl-dev, - libgles2, - libegl1-mesa-dev, - glslang-tools, - libinput-bin, - libinput-dev, - libavutil-dev, - libavcodec-dev, - libavformat-dev, - libxcb1, - libxcb-composite0-dev, - libxcb-ewmh2, - libxcb-ewmh-dev, - libxcb-present-dev, - libxcb-icccm4-dev, - libxcb-render-util0, - libxcb-render-util0-dev, - libxcb-res0-dev, - libxcb-xinput-dev, - xdg-desktop-portal-wlr, - hwdata, - hyprwayland-scanner >=0.3.1, - hyprcursor >=0.1.7, - xwayland, - libwayland-server0, - libwayland-dev, - libpango1.0-dev, - wayland-protocols, - libtomlplusplus-dev, - libhyprlang2 >=0.3.2, - libhyprlang-dev, - systemd-dev | libelogind-dev, - libgbm-dev, - libliftoff-dev, - libdisplay-info-dev, - cpio, - -Package: hyprland -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland-common -Suggests: kitty | foot, dolphin, waybar -Description: Tiling compositor with the looks - Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't - sacrifice on its looks. - . - It provides the latest Wayland features, is highly customizable, has all the - eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other - wlr-based compositors and more. - . - This package contains the executables. - -Package: hyprland-dev -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland (= ${binary:Version}) -Description: Tiling compositor with the looks - Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't - sacrifice on its looks. - . - It provides the latest Wayland features, is highly customizable, has all the - eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other - wlr-based compositors and more. - . - This package contains the development files. - -Package: hyprland-common -Architecture: all -Depends: ${misc:Depends} -Description: Tiling compositor with the looks - Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't - sacrifice on its looks. - . - It provides the latest Wayland features, is highly customizable, has all the - eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other - wlr-based compositors and more. - . - This package contains architecture independent files such as wallpapers. - -Package: hyprland-completions -Architecture: all -Depends: ${misc:Depends} -Description: Tiling compositor with the looks - Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't - sacrifice on its looks. - . - It provides the latest Wayland features, is highly customizable, has all the - eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other - wlr-based compositors and more. - . - This package contains the completions for bash, zsh and fish -EOF -} -# conf_print_debian_control | sudo tee debian/control - -conf_print_hyprland_copyright() { - cat <<-'EOF' - Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ - Files-Excluded: subprojects/tracy/* - - Files: * - assets/* - docs/* - example/* - hyprctl/* - hyprpm/* - nix/* - src/* - Copyright: 2022, 2023, vaxerski - License: BSD-3-clause - - Files: debian/* - Copyright: 2024, Mo Zhou - License: BSD-3-clause - - ############################################################################### - - Files: protocols/idle.xml - Copyright: 2015, Martin Gräßlin - License: LGPL-2.1+ - - Files: protocols/pointer-constraints-unstable-v1.xml - Copyright: 2015, Red Hat Inc. - 2014, Jonas Ådahl - License: Expat - - Files: protocols/tablet-unstable-v2.xml - Copyright: 2015, 2016, Red Hat, Inc. - 2014, Stephen "Lyude" Chandler Paul - License: Expat - - Files: protocols/wlr-foreign-toplevel-management-unstable-v1.xml - Copyright: 2018, Ilia Bozhinov - License: NTP - - Files: protocols/wlr-layer-shell-unstable-v1.xml - Copyright: 2017, Drew DeVault - License: NTP - - Files: protocols/wlr-output-power-management-unstable-v1.xml - Copyright: 2019, Purism SPC - License: Expat - - Files: protocols/wlr-screencopy-unstable-v1.xml - Copyright: 2019, Andri Yngvason - 2018, Simon Ser - License: Expat - - ############################################################################### - - Files: subprojects/hyprland-protocols/* - Copyright: 2022, Hypr Development - License: BSD-3-clause - - Files: subprojects/hyprland-protocols/protocols/* - Copyright: 2022, Vaxry - License: BSD-3-clause - - ############################################################################### - - Files: subprojects/udis86/* - Copyright: 2002-2013, Vivek Thampi - License: BSD-2-clause - - Files: subprojects/udis86/m4/* - Copyright: 2008, 2009, Francesco Salvestrini - 2008 Dustin J. Mitchell - 2008, Tim Toolan - License: FSFAP - - ############################################################################### - - Files: subprojects/wlroots-hyprland/* - Copyright: 2023, The wlroots contributors - 2017, 2018, Drew DeVault - 2014, Jari Vetoniemi - License: Expat - - Files: subprojects/wlroots-hyprland/include/wlr/xcursor.h - Copyright: 2012, Intel Corporation - License: UNKNOWN - Please fill license UNKNOWN from header of - - Files: subprojects/wlroots-hyprland/include/xcursor/* - Copyright: 2002, Keith Packard - License: UNKNOWN - Please fill license UNKNOWN from header of - - Files: subprojects/wlroots-hyprland/include/xcursor/cursor_data.h - Copyright: 1999, SuSE, Inc. - License: UNKNOWN - Please fill license UNKNOWN from header of - - Files: subprojects/wlroots-hyprland/protocol/drm.xml - Copyright: 2010, 2011, Intel Corporation - 2008-2011, Kristian Høgsberg - License: HPND-sell-variant or NTP~disclaimer - - Files: subprojects/wlroots-hyprland/protocol/input-method-unstable-v2.xml - Copyright: 2018, Purism SPC - 2017, 2018, Red Hat, Inc. - 2015, 2016, Jan Arne Petersen - 2012, 2013, Collabora, Ltd. - 2010-2013, Intel Corporation - 2008-2011, Kristian Høgsberg - License: UNKNOWN - Please fill license UNKNOWN from header of - - Files: subprojects/wlroots-hyprland/protocol/server-decoration.xml - Copyright: 2015, Martin Gräßlin - License: LGPL-2.1+ - - Files: subprojects/wlroots-hyprland/protocol/virtual-keyboard-unstable-v1.xml - Copyright: 2018, Purism SPC - 2012, 2013, Collabora, Ltd. - 2010-2013, Intel Corporation - 2008-2011, Kristian Høgsberg - License: UNKNOWN - Please fill license UNKNOWN from header of - - Files: subprojects/wlroots-hyprland/protocol/wlr-data-control-unstable-v1.xml - Copyright: 2019, Ivan Molodetskikh - 2018, Simon Ser - License: HPND-sell-variant or NTP~disclaimer - - Files: subprojects/wlroots-hyprland/protocol/wlr-export-dmabuf-unstable-v1.xml - Copyright: 2018, Rostislav Pehlivanov - License: UNKNOWN - Please fill license UNKNOWN from header of - - Files: subprojects/wlroots-hyprland/protocol/wlr-foreign-toplevel-management-unstable-v1.xml - Copyright: 2018, Ilia Bozhinov - License: HPND-sell-variant or NTP~disclaimer - - Files: subprojects/wlroots-hyprland/protocol/wlr-gamma-control-unstable-v1.xml - Copyright: 2018, Simon Ser - 2015, Giulio camuffo - License: HPND-sell-variant or NTP~disclaimer - - Files: subprojects/wlroots-hyprland/protocol/wlr-layer-shell-unstable-v1.xml - Copyright: 2017, Drew DeVault - License: HPND-sell-variant or NTP~disclaimer - - Files: subprojects/wlroots-hyprland/protocol/wlr-output-management-unstable-v1.xml - Copyright: 2019, Purism SPC - License: HPND-sell-variant or NTP~disclaimer - - Files: subprojects/wlroots-hyprland/protocol/wlr-output-power-management-unstable-v1.xml - Copyright: 2019, Purism SPC - License: UNKNOWN - Please fill license UNKNOWN from header of - - Files: subprojects/wlroots-hyprland/protocol/wlr-screencopy-unstable-v1.xml - Copyright: 2019, Andri Yngvason - 2018, Simon Ser - License: UNKNOWN - Please fill license UNKNOWN from header of - - Files: subprojects/wlroots-hyprland/protocol/wlr-virtual-pointer-unstable-v1.xml - Copyright: 2019, Josef Gajdusek - License: UNKNOWN - Please fill license UNKNOWN from header of - - Files: subprojects/wlroots-hyprland/tinywl/* - Copyright: no-info-found - License: CC0-1.0 - - Files: subprojects/wlroots-hyprland/xcursor/wlr_xcursor.c - Copyright: 2012, Intel Corporation - License: UNKNOWN - Please fill license UNKNOWN from header of - - Files: subprojects/wlroots-hyprland/xcursor/xcursor.c - Copyright: 2002, Keith Packard - License: UNKNOWN - Please fill license UNKNOWN from header of - - ############################################################################### - - License: BSD-3-clause - The BSD License - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - . - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - . - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - License: CC0-1.0 - To the extent possible under law, the author(s) have dedicated all - copyright and related and neighboring rights to this software to the public - domain worldwide. This software is distributed without any warranty. - On Debian systems, the complete text of the CC0 license, version 1.0, - can be found in /usr/share/common-licenses/CC0-1.0. - - License: CECILL-C - Please fill license CECILL-C from header of - - License: Expat - The MIT License - . - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the Software - without restriction, including without limitation the rights to - use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to - whom the Software is furnished to do so, subject to the - following conditions: - . - The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the - Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT - WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - - License: FSFAP - Please fill license FSFAP from header of - - License: HPND-sell-variant - Please fill license HPND-sell-variant or NTP~disclaimer from header of - - License: LGPL-2.1+ - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; version 2.1 of the License, or (at - your option) any later version. - On Debian systems, the complete text of version 2.1 of the GNU Lesser - General Public License can be found in '/usr/share/common-licenses/LGPL-2.1'. - - License: NTP~disclaimer - Please fill license HPND-sell-variant or NTP~disclaimer from header of - - License: Unlicense - Please fill license Unlicense from header of - - License: Zlib - The zlib License - . - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - . - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - . - 1. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - . - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - . - 3. This notice may not be removed or altered from any source - distribution. - - License: Expat - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - . - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - EOF -} -# conf_print_hyprland_copyright | tee debian/copyright - -conf_print_hyprland_common_install() { - cat <<-'EOF' - usr/share/hyprland - EOF -} -# conf_print_hyprland_common_install | tee debian/hyprland-common.install - -conf_print_hyprland_common_substvars() { - cat <<-'EOF' - misc:Depends= - misc:Pre-Depends= - EOF -} -# conf_print_hyprland_common_substvars | tee debian/hyprland-common.substvars - -# conf_print_hyprland_dev_install() { -# cat <<-'EOF' -# usr/include/hyprland/protocols/* -# usr/include/hyprland/wlroots/* -# usr/include/hyprland-dev.h -# usr/share/pkgconfig/hyprland.pc -# -# usr/lib/libwlroots.so.13032 -# EOF -# } -## conf_print_hyprland_dev_install | sudo tee debian/hyprland-dev.install - -# conf_print_hyprland_dev_install() { -# cat <<-'EOF' -# usr/include/hyprland/protocols/* -# usr/include/hyprland/wlroots/* -# usr/include/hyprland-dev.h -# usr/share/pkgconfig/hyprland.pc -# -# usr/lib/libwlroots.so.13032 -# EOF -# } -## conf_print_hyprland_dev_install | sudo tee debian/hyprland-dev.install - -conf_print_hyprland_dev_install() { - cat <<-'EOF' - usr/include/ - usr/share/pkgconfig - EOF -} -# conf_print_hyprland_dev_install | sudo tee debian/hyprland-dev.install - -conf_print_hyprland_dev_substvars() { - cat <<-'EOF' - misc:Depends= - misc:Pre-Depends= - EOF -} -# conf_print_hyprland_dev_substvars | tee debian/hyprland-dev.substvars - -#conf_print_hyprland_install() { -# cat <<-'EOF' -# usr/bin/Hyprland -# usr/bin/hyprctl -# usr/bin/hyprpm -# usr/share/wayland-sessions/hyprland.desktop -# usr/share/xdg-desktop-portal/hyprland-portals.conf -# EOF -#} -## conf_print_hyprland_install | sudo tee debian/hyprland.install - -conf_print_hyprland_install() { - cat <<-'EOF' - usr/bin/ - usr/lib/ - usr/share/man - usr/share/wayland-sessions - usr/share/xdg-desktop-portal - EOF -} -# conf_print_hyprland_install | sudo tee debian/hyprland.install - -conf_print_hyprland_substvars() { - cat <<-EOF - shlibs:Depends=hyprland (>= ${VERSION}), libc6 (>= 2.34), libcairo2 (>= 1.2.4), libdisplay-info1 (>= 0.1.1), libdrm2 (>= 2.4.119), libegl1, libeudev1 (>= 3.2.14), libgbm1 (>= 23.3.5), libgcc-s1 (>=13.2.0), libgles2, libglib2.0-0 (>=2.78.4), libhyprlang2 (>= 0.3.2), libinput10 (>=1.25.0), libliftoff0 (>= 0.4.1), libopengl0, libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.52.0), libpixman-1-0 (>= 0.42.0), libseat1 (>= 0.8.0), libstdc++6 (>= 13.2), libtomlplusplus3 (>= 3.4.0), libwayland-client0 (>= 1.20.0), libwayland-server0 (>= 1.22.0), libxcb-composite0, libxcb-dri3-0 (>= 1.13), libxcb-ewmh2 (>= 0.4.1), libxcb-icccm4 (>= 0.4.1), libxcb-present0, libxcb-render-util0, libxcb-render0, libxcb-res0 (>= 1.10), libxcb-shm0 (>= 1.10), libxcb-xfixes0 (>= 1.15), libxcb-xinput0 (>= 1.15), libxcb1, libxkbcommon0 (>= 1.6.0) - misc:Depends= - misc:Pre-Depends= - EOF -} -# conf_print_hyprland_substvars | tee debian/hyprland.substvars - -conf_print_hyprland_completions_install() { - cat <<-'EOF' - usr/share/bash-completion/completions/hyprctl - usr/share/bash-completion/completions/hyprpm - usr/share/fish/vendor_completions.d/hyprctl.fish - usr/share/fish/vendor_completions.d/hyprpm.fish - usr/share/zsh/site-functions/_hyprctl - usr/share/zsh/site-functions/_hyprpm - EOF -} -# conf_print_hyprland_completions_install | sudo tee debian/hyprland.install - -conf_print_hyprland_completions_substvars() { - cat <<-'EOF' - misc:Depends= - misc:Pre-Depends= - EOF -} -# conf_print_hyprland_completions_substvars | tee debian/hyprland-completions.substvars - -# Don't call this use deb_create_watch.py below. -conf_print_github_watch() { - cat <<-EOF - version=4 - - opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/${PROJECT}-$1\.tar\.gz/ \\ - https://github.com/${USER}/${PROJECT}/tags .*/v?(\d\S+)\.tar\.gz - EOF -} -# conf_print_github_watch | sudo tee debian/watch - -conf_print_initial_changelog() { - cat <<-EOF - ${PROJECT}-${VERSION} (${VERSION}) UNRELEASED; urgency=medium - - * Initial release. - - -- root ${TIMESTAMP} - EOF -} -# conf_print_initial_changelog | sudo tee debian/changelog - -# salsa.debian.org files above this point - -conf_print_hyprland_docs_install() { - cat <<-'EOF' - usr/share/man/man1/Hyprland.1 - usr/share/man/man1/hyprctl.1 - usr/share/man/man1/hyprpm.1 - usr/share/doc/hyprland/README.md - usr/share/doc/hyprland/CONTRIBUTING.md - usr/share/doc/hyprland/LICENSE - EOF -} -# conf_print_hyprland_docs_install | sudo tee debian/hyprland-docs.install - -conf_print_hyprland_preinst() { - cat <<-'EOF' - #!/bin/sh - set -e - - # Define the configuration directory - CONFIG_DIR="/etc/hyprland" - - # Check if the configuration directory exists - if [ ! -d "$CONFIG_DIR" ]; then - # Create the configuration directory - mkdir -p "$CONFIG_DIR" - echo "Created configuration directory: $CONFIG_DIR" - fi - - # Check for existing configuration files and back them up - if [ -f "$CONFIG_DIR/hyprland.conf" ]; then - mv "$CONFIG_DIR/hyprland.conf" "$CONFIG_DIR/hyprland.conf.bak" - echo "Backed up existing configuration file to: $CONFIG_DIR/hyprland.conf.bak" - fi - - # Additional pre-installation tasks can be added here - # This script is a starting point. Depending on your project's needs, you - # might want to add more checks or actions to the preinst script. - # For example, you could check for specific dependencies, verify system - # configurations, or perform any other setup tasks required before installing Hyprland. - - Remember, the preinst script is called before the package is unpacked and installed, - so it cannot rely on any files included in its package. Only essential packages and - pre-dependencies (Pre-Depends) may be assumed to be available at this point - EOF -} -# conf_print_hyprland_preinst | sudo tee debian/hyprland.preinst -# chmod +x debian/hyprland.preinst - -conf_print_hyprland_postinst() { - cat <<-'EOF' - #!/bin/sh - set -e - - # Define the binary directory - BIN_DIR="/usr/bin" - - # Create a symbolic link for the Hyprland binary - if [ ! -e "$BIN_DIR/hyprland" ]; then - ln -s "$BIN_DIR/Hyprland" "$BIN_DIR/hyprland" - echo "Created symbolic link for Hyprland" - fi - - # Check if the Wayland session file exists and update it if necessary - SESSION_FILE="/usr/share/wayland-sessions/hyprland.desktop" - if [ -f "$SESSION_FILE" ]; then - # Perform any necessary updates to the session file - echo "Updated Wayland session file: $SESSION_FILE" - fi - - # Additional post-installation tasks can be added here - This script is a starting point. Depending on your project's needs, you might want - to add more checks or actions to the postinst script. For example, you could check - for specific dependencies, verify system configurations, or perform any other setup - tasks required after installing Hyprland. - - Remember, the postinst script is called after the package is unpacked and installed, - so it can rely on any files included in its package. It's a good place to perform any - final setup or configuration tasks that depend on the installed files - EOF -} -# conf_print_hyprland_postinst | sudo tee debian/hyprland.postinst -# chmod +x debian/hyprland.postinst - -# the install operations taken from the Makefile, is we are using the make -# file we don't need to call the from debian/rules - -conf_print_hyprland_setup() { - cat </dev/null || true; fi - - chmod -R 755 ${PREFIX}/include/hyprland - chmod 755 ${PREFIX}/share/pkgconfig - EOF -} -# conf_print_hyprland_headers | sudo tee debian/install-headers.sh -# chmod +x debian/install-headers.sh - -conf_print_hyprland_rules_1() { - cat <<'EOF' -#!/usr/bin/make -f - -# Uncomment and adjust the following lines as needed -#export DH_VERBOSE = 1 -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed - -%: - dh $@ --buildsystem=cmake+ninja - -override_dh_auto_configure: - dh_auto_configure -- \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DNO_SYSTEMD=TRUE - -override_dh_auto_build: - dh_auto_build -- \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_INSTALL_PREFIX:STRING=$(CURDIR)/debian/hyperland \ - -DLEGACY_RENDERER:BOOL=true \ - -S . -B ./build -G Ninja -EOF -} -# conf_print_hyprland_rules_1 | sudo tee debian/rules - -conf_print_hyprland_rules_2() { - cat <<'EOF' -#!/usr/bin/make -f - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -#%: - dh $@ --buildsystem=cmake - -override_dh_auto_test: - if [ -f obj-x86_64-linux-gnu/build.ninja ] && grep -q 'test' obj-x86_64-linux-gnu/build.ninja; then \ - dh_auto_test; \ - else \ - echo "No tests found, skipping test phase."; \ - fi - -override_dh_auto_build: - meson setup build \ - --prefix=/usr \ - --libexecdir=lib \ - --sbindir=bin \ - --buildtype=release \ - --wrap-mode=nodownload \ - -Db_lto=true \ - -Db_pie=true \ - -Ddefault_library=shared \ - -Dxwayland=enabled \ - -Dsystemd=disabled && \ - meson compile -C build - -override_dh_auto_install: - meson install -C build \ - --destdir=$(CURDIR)/debian/hyprland \ - --skip-subprojects hyprland-protocols && \ - install -Dm0644 -t $(CURDIR)/debian/hyprland/usr/share/licenses/hyprland LICENSE && \ - ./debian/install.sh $(CURDIR) -EOF -} -# conf_print_hyprland_rules_2 | sudo tee debian/rules - -conf_print_hyprland_rules_3() { - cat <<'EOF' -#!/usr/bin/make -f -%: - dh $@ --builddirectory=build/ \ - --buildsystem=meson+ninja - -override_dh_auto_configure: -# meson subprojects update --reset - -# use either -Dbuildtype=release|debug or -Doptimisation= and -Ddebug= -override_dh_auto_build: - meson setup build \ - -Dwarning_level=2 \ - -Ddefault_library=static \ - -Dsystemd=disabled \ - -Dxwayland=enabled \ - -Dlegacy_renderer=enabled \ - -Doptimization=3 \ - -Ddebug=true - ninja -C build - -override_dh_auto_install: - ninja -C build install - dh_install -EOF -} -# conf_print_hyprland_rules_3 | sudo tee debian/rules - -# debian/rules are Makefiles and requires tabs so '-EOF' breaks -# the output of the heredoc. So hardleft for this one. -conf_print_hyprland_rules() { - cat <<'EOF' -#!/usr/bin/make -f - -PREFIX=$(CURDIR)/tmp/usr -%: - dh $@ --buildsystem=meson+ninja --builddirectory=build - -override_dh_auto_configure: - dh_auto_configure -- --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DNO_SYSTEMD:STRING=true -DCMAKE_INSTALL_PREFIX:STRING=$(PREFIX) -S . - -override_dh_auto_build: - dh_auto_build -- all - -override_dh_auto_test: - true - -override_dh_auto_install: - $(MAKE) install DESTDIR=$(CURDIR)/tmp/usr prefix=/usr -EOF -} -# conf_print_hyprland_rules | sudo tee debian/rules - -# mkdir -p debian/patches -conf_print_hyprland_make_patch() { - cat <<-'EOF' - Description: correct installation prefix - Forwarded: not needed - diff --git a/Makefile b/Makefile - index 9c5e94d..08f7ae8 100644 - --- a/Makefile - +++ b/Makefile - @@ -1,4 +1,4 @@ - -PREFIX = /usr/local - +PREFIX = $(CURDIR)/debian/tmp/usr - - legacyrenderer: - cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -DLEGACY_RENDERER:BOOL=true -S . -B ./build -G Ninja - EOF -} -# conf_print_hyprland_make_patch | sudo tee debian/patches/00-makefile.patch - -conf_print_hyprland_make_series() { - cat <<-'EOF' - 00-makefile.patch - EOF -} -# conf_print_hyprland_make_series | sudo tee debian/patches/series - -# Function to append build dependencies to debian/control file -append_build_deps() { - # Use name reference to access the original array passed as an argument - local -n DEBIAN_BUILD_DEPS=$1 - local control_file=$2 - - # Temporary file to hold the updated control file content - local temp_control_file="temp_control_file" - - # Create an associative array to filter out duplicates - declare -A unique_deps - for dep in "${DEBIAN_BUILD_DEPS[@]}"; do - unique_deps["$dep"]=1 - done - - # Read the existing control file and append the new unique dependencies - while IFS= read -r line; do - echo "$line" >>"$temp_control_file" - if [[ $line == *"Build-Depends:"* ]]; then - for dep in "${!unique_deps[@]}"; do - echo " $dep," >>"$temp_control_file" - done - fi - done <"$control_file" - - # Replace the original control file with the updated one - mv "$temp_control_file" "$control_file" -} - -missing=( - "vulkan-validationlayers-dev" - "libwayland-egl-backend-des" - "libxcb-errors-dev" -) - -DEBIAN_BUILD_DEPS=( - "build-essential" - "check" - "cmake" - "cmake-extras" - "dh-autoreconf" - "dh-make" - "dh-cmake" - "edid-decode" - "fontconfig" - "gettext" - "gettext-base" - "glslang-tools" - "git" - "hwdata" - "meson" - "ninja-build" - "seatd" - "wget" - "wayland-protocols" - "util-linux" - "vulkan-utility-libraries-dev" - "xdg-desktop-portal-wlr" - "xwayland" - "libavcodec-dev" - "libavformat-dev" - "libavutil-dev" - "libblkid-dev" - "libdrm2" - "libdisplay-info-bin" - "libdisplay-info-dev" - "libdisplay-info1" - "libliftoff-dev" - "libliftoff0" - "libegl1-mesa-dev" - "libegl-dev" - "libelogind-dev" - "libffi-dev" - "libfontconfig-dev" - "libgbm1" - "libgbm-dev" - "libgles2" - "libgles2-mesa-dev" - "libgulkan-dev" - "libinput10" - "libinput-bin" - "libinput-dev" - "libpango1.0-dev" - "libpixman-1-0" - "libpixman-1-dev" - "libseat-dev" - "libtomlplusplus3" - "libudev1" - "libudev-dev" - "libvkfft-dev" - "libvulkan1" - "libvulkan-dev" - "libvulkan-volk-dev" - "libwayland-dev" - "libx11-xcb-dev" - "libxcb1" - "libxcb1-dev" - "libxkbcommon0" - "libxcb-composite0-dev" - "libxcb-dri3-dev" - "libxcb-ewmh2" - "libxcb-ewmh-dev" - "libxcb-icccm4-dev" - "libxcb-image0-dev" - "libxcb-present-dev" - "libxcb-render-util0" - "libxcb-render-util0-dev" - "libxcb-res0-dev" - "libxcb-util1" - "libxcb-util-dev" - "libxcb-xinput-dev" - "libxkbcommon-x11-dev" - "libxkbcommon-dev" - "libxkbregistry-dev" - "libxml2-dev" -) -# "libxcb-errors0" -# "libxcb-errors0-dev" - -sudo apt install -y "${DEBIAN_BUILD_DEPS[@]}" - -# FIXME: select the correct combination of build deps from -# above to be added to the debian/control file. -# The Build-Dep section is a multi-line content. -# -# Add build deps to the debian/control file -# convert array to comma separated list for sed. -BUILD_DEPS=$( - IFS=',' - echo "${PACKAGES[*]}" -) -# sed -i -e '$a\' -e "Build-Depends: $BUILD_DEPS" debian/control - -# Set github user and project name -USER="hyprwm" -PROJECT="Hyprland" -LICENSE="bsd" # Adjust based on the actual license -SECTION="x11/wm" -HOMEPAGE="https://github.com/hyprwm/Hyprland" -PACKAGE="hyprland" -VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name') -VERSION=${VERSION:1} # strip the preceding 'v' -TIMESTAMP=$(date -R) # This generates the current date and time in RFC 2822 format -BUILD_HOME="/var/tmp/hyprland-${VERSION}-git_build" -DEBEMAIL="cyteen@ring-zero.co.uk" -DEBFULLNAME="Cyteen May" -# DEBIAN_BRANCH="suites/excalibur" -DEBIAN_BRANCH="suites/unstable" -DEBIAN_SUITE="${DEBIAN_BRANCH##*/}" -DEBIAN_MIRROR="http://deb.devuan.org/merged" -DEBIAN_ARCH="$(dpkg --print-architecture)" -DEBIAN_INCLUDE="ca-certificates,eatmydata,ccache,git" -DEBIAN_TAG='debian/%(version)s' -UPSTREAM_BRANCH="upstream/latest" -# UPSTREAM_TAG='v%(version)s' -UPSTREAM_TAG='upstream/v%(version)s' -TARGET_DIR="/srv/chroot/unstable-${DEBIAN_ARCH}-sbuild" -DESCRIPTION="Hyprland is a dynamic tiling Wayland compositor based on wlroots," -LONG_DESCRIPTION="Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks. It provides the latest Wayland features, is highly customizable, has all the eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other wlr-based compositors and more..." - -# Check if the target directory exists -if [ ! -d "${TARGET_DIR}" ]; then - echo "Target directory ${TARGET_DIR} does not exist. Creating chroot environment..." - sudo sbuild-createchroot \ - --include="${DEBIAN_INCLUDE}" \ - --merged-usr \ - --make-sbuild-tarball=/srv/chroot/${DEBIAN_SUITE}-${DEBIAN_ARCH}.tar.gz \ - ${DEBIAN_SUITE} ${TARGET_DIR} ${DEBIAN_MIRROR} -else - echo "Target directory ${TARGET_DIR} already exists. Skipping chroot creation." -fi - -# Delete the schroot -# sudo rm -r /srv/chroot/unstable-amd64-sbuild/ -# sudo rm /etc/schroot/chroot.d/unstable-amd64-sbuild-* /etc/sbuild/chroot/unstable-amd64-sbuild - -# Make the BUILD_DEST for git and gbp changeable from just PACKAGE -# gbp prefers no version number in the containing directory. -# BUILD_DEST="${BUILD_HOME}/${PACKAGE}_${VERSION}" -BUILD_DEST="${BUILD_HOME}/${PACKAGE}" -SUBPROJECTS_DEST="${BUILD_DEST}/subprojects" - -# Make the BUILD_HOME directory and clone upstream -mkdir -p ${BUILD_HOME} - -cd ${BUILD_HOME} || exit - -# git clone --recurse-submodules https://github.com/${USER}/${PROJECT}.git ${BUILD_DEST} -# gbp clone https://github.com/${USER}/${PROJECT}.git ${BUILD_DEST} -# git clone https://github.com/${USER}/${PROJECT}.git ${BUILD_DEST} - -# git clone --no-checkout -o ${UPSTREAM_BRANCH} https://github.com/${USER}/${PROJECT}.git ${BUILD_DEST} - -gbp clone \ - --pristine-tar \ - --debian-branch=${DEBIAN_BRANCH} \ - --upstream-branch=${UPSTREAM_BRANCH} \ - --add-upstream-vcs \ - --verbose \ - https://github.com/${USER}/${PROJECT}.git ${BUILD_DEST} - -cd ${BUILD_DEST} || exit -git checkout -b ${DEBIAN_BRANCH} ${VERSION} - -#============================================================================== -# debianize the BUILD_HOME directory -#============================================================================== - -# prepare Debian packaging from an original source archive -dh_make \ - --createorig \ - --single \ - --native \ - --copyright ${LICENSE} \ - --packagename ${PACKAGE}_${VERSION} \ - --yes - -rm debian/*.ex - -mkdir -p debian - -# Install the conf_print heredocs -conf_print_github_watch | sudo tee debian/watch -chmod +x debian/watch -conf_print_debian_control | sudo tee debian/control -conf_print_hyprland_copyright | tee debian/copyright - -conf_print_hyprland_common_install | tee debian/hyprland-common.install -conf_print_hyprland_common_substvars | tee debian/hyprland-common.substvars - -conf_print_hyprland_dev_install | sudo tee debian/hyprland-dev.install -conf_print_hyprland_dev_substvars | tee debian/hyprland-dev.substvars - -conf_print_hyprland_install | tee debian/hyprland.install -conf_print_hyprland_substvars | tee debian/hyprland.substvars - -conf_print_hyprland_completions_install | tee debian/hyprland-completions.install -conf_print_hyprland_completions_substvars | tee debian/hyprland-completions.substvars - -# conf_print_initial_changelog | sudo tee debian/changelog - -conf_print_hyprland_docs_install | sudo tee debian/hyprland-docs.install - -# conf_print_hyprland_preinst | sudo tee debian/hyprland.preinst -# chmod +x debian/hyprland.preinst - -# conf_print_hyprland_postinst | sudo tee debian/hyprland.postinst -# chmod +x debian/hyprland.postinst - -# if we are using the makefile we don't need to call this from the debian/rules -# conf_print_hyprland_setup | sudo tee debian/install.sh -# chmod +x debian/install.sh - -# conf_print_hyprland_prerm | tee debian/hyprland.prerm -# chmod +x debian/hyprland.prerm - -# conf_print_hyprland_postrm | tee debian/hyprland.postrm -# chmod +x debian/hyprland.postrm - -conf_print_hyprland_headers | sudo tee debian/install-headers.sh -chmod +x debian/install-headers.sh - -# we now remake the patch using the patch-queue branch -# conf_print_hyprland_make_patch | sudo tee debian/patches/00-makefile.patch -# conf_print_hyprland_make_series | sudo tee debian/patches/series - -# conf_print_hyprland_rules | sudo tee debian/rules -# conf_print_hyprland_rules_1 | sudo tee debian/rules -# conf_print_hyprland_rules_2 | sudo tee debian/rules -conf_print_hyprland_rules_3 | sudo tee debian/rules - -#============================================================================== -# Call the append function to add the build deps to the controlfile. -# append_build_deps DEBIAN_BUILD_DEPS debian/control - -# Customize the debian directory values -# sed -i 's,^\(Section: \).*,\1'${SECTION}',' debian/control -# sed -i "s,^\(Maintainer: \).*,\1'${DEBFULLNAME}\ \<${DEBEMAIL}\>'," debian/control -# sed -i 's,^\(Homepage: \).*,\1'${HOMEPAGE}',' debian/control -# sed -i "s,^\(Description: \).*,\1${DESCRIPTION}," debian/control -# sed -i "s|.*insert long.*|${LONG_DESCRIPTION}|" debian/control - -sed -i \ - -e "s|^\(Section: \).*|\1${SECTION}|" \ - -e "s|^\(Maintainer: \).*|\1'${DEBFULLNAME}\ \<${DEBEMAIL}\>'|" \ - -e 's|^\(Homepage: \).*|\1'${HOMEPAGE}'|' \ - -e "s|^\(Description: \).*|\1${DESCRIPTION}|" \ - -e "s|.*insert long.*|${LONG_DESCRIPTION}|" \ - debian/control - -# ./debian/install-headers.sh $(CURDIR) && \ - -# mkdir -p $(CURDIR)/debian/hyprland/usr/include/hyprland/wlroots && \ -# mv $(CURDIR)/debian/hyprland/usr/include/wlr \ -# $(CURDIR)/debian/hyprland/usr/include/hyprland/wlroots && \ -# rm -f $(CURDIR)/debian/hyprland/usr/lib/libwlroots.so && \ -# rm -rf $(CURDIR)/debian/hyprland/usr/lib/pkgconfig && \ -# rm -rf $(CURDIR)/debian/hyprland/usr/share/xdg-desktop-portal && \ - -# https://salsa.debian.org/debian/debian-package-init/-/blob/master/deb_create_watch.py -# outputs to debian/watch/ With deb_create_watch.py in your path -EXEC_PREFIX=${HOME}/.local/bin -wget -c -O ${EXEC_PREFIX}/deb_create_watch.py https://salsa.debian.org/debian/debian-package-init/-/raw/master/deb_create_watch.py?inline=false - -python3 ${EXEC_PREFIX}/deb_create_watch.py https://github.com/${USER}/${PROJECT} -# version=4 -# -# opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/hyprlang-$1\.tar\.gz/ \ -# https://github.com/hyprwm/hyprlang/tags .*/v?(\d\S*)\.tar\.gz - -#============================================================================== -# Update Changelog -#============================================================================== - -#--snapshot \ -# --commit \ -# --commit-msg="Commit after debian control pruned of dh_make ex." \ - -# switch to the branch the you wish to contain the debian directory -git checkout -b ${DEBIAN_BRANCH} - -DEBEMAIL="cyteen@ring-zero.co.uk" DEBFULLNAME="Cyteen May" \ - gbp dch \ - --auto \ - --local=devuan \ - --no-git-author \ - --force-distribution \ - --new-version=${VERSION} \ - --release \ - --upstream-branch=${UPSTREAM_BRANCH} \ - --upstream-tag=${UPSTREAM_TAG} \ - --distribution=${DEBIAN_SUITE} \ - --debian-branch=${DEBIAN_BRANCH} \ - --debian-tag=${DEBIAN_TAG} - -#============================================================================== -# Commit the debian directory to the debian branch -git add debian -git commit -m "Post gbp dch commit upstream changelog" -#============================================================================== - -#============================================================================== -# Patch / rebase -#============================================================================== - -# This drops you back to the patch branch -# sudo gbp pq --time-machine=10 --force import - -# alter the Makefile to install to the debian directpry -# sed -i '1s|^PREFIX = /usr/local|PREFIX = $(CURDIR)/debian/tmp/usr|' Makefile -# git add Makefile - -# Export the Patches and Commit the Changes: -# sudo gbp pq export --commit -v -#============================================================================== - -# Post patch / rebase commit. -# git add debian/patches -# git commit -m "Alter Makefile for Debian directory installation" - -# AUR patch https://pastebin.com/7WPZ7ewq - -# we ask gbp buildpackage to deal with dubmodules. -# git submodule update --init --recursive - -# git config submodule.subprojects/wlroots-hyprland.url "${SUBPROJECTS_DEST}/wlroots-hyprland" -# git config submodule.subprojects/hyprland-protocols.url "${SUBPROJECTS_DEST}/hyprland-protocols" -# git config submodule.subprojects/udis86.url "${SUBPROJECTS_DEST}/udis86" -# git config submodule.subprojects/tracy.url "${SUBPROJECTS_DEST}/tracy" - -# git -C subprojects/wlroots-hyprland reset --hard -# sed -E -i -e "s/(soversion = .*$)/soversion = 13032/g" subprojects/wlroots-hyprland/meson.build - -# hyprland/subprojects submodules. -# git+https://github.com/canihavesomecoffee/udis86.git -# git+https://github.com/hyprwm/hyprland-protocols.git -# git+https://github.com/hyprwm/Hyprland.git -# git+https://github.com/hyprwm/wlroots-hyprland.git -# git+https://github.com/wolfpld/tracy.git - -#============================================================================== -## dpkg-buildpackage -us -uc -b -#gbp buildpackage \ -# --git-pristine-tar \ # Use pristine-tar to create orig tarball -# --git-submodules \ # Transparently handle submodules in the upstream tree -# --git-ignore-new \ # Build with uncommitted changes in the source tree -# --git-debian-branch=${DEBIAN_BRANCH} \ # Branch the Debian package is being developed on -# --git-upstream-branch=${UPSTREAM_BRANCH} \ -# --git-export-dir="../build-area" \ # before building the package export the source into EXPORT_DIR -# --git-tag # create a tag after a successful build - -# git checkout -b ${DEBIAN_BRANCH} - -# Adding gitea package registry - https://docs.gitea.com/usage/packages/debian -# "deb [signed-by=/etc/apt/keyrings/gitea-{owner}.asc] https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" -# sudo curl https://gitea.example.com/api/packages/{owner}/debian/repository.key -o /etc/apt/keyrings/gitea-{owner}.asc - -# upload dev to gitea registry -# curl --user your_username:your_password_or_token \ -# --upload-file path/to/file.deb \ -# https://gitea.example.com/api/packages/testuser/debian/pool/bionic/main/upload - -EXTRA_PACKAGES="/space/code_repositories/hyprland/" # directory containing extra debian packages (.deb) -GITEA_OWNER="cyteen" -GITEA_PASS="mlpfinsonik" -GITEA_URL="git2.ring-zero.co.uk" -# GITEA_TOKEN="e844ba5fa9f57645eb1e32cfcb67a60d650dfbf0" -# GITEA_TOKEN="25f01d539f3eea5edf2625f825fb84050af080e4" - -# the gitea asc key -# GITEA_KEY="$(curl https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key)" - -# GITEA_KEY="/etc/apt/trusted.gpg.d/gitea-cyteen.gpg" -# GITEA_KEY="../gitea-cyteen.gpg" -# GITEA_KEY="$(curl -fsSL https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | gpg --dearmor -q)" -# sudo curl -fsSL https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | gpg --dearmor -q -o ${GITEA_KEY} - -# sbuild called for an asc key file which is what gitea provides, and puts it in: -# /etc/apt/trusted.gpg.d/sbuild-extra-repository-IDqCM94OpA.gpg -# GITEA_KEY="/etc/apt/keyrings/gitea-cyteen.asc" - -GITEA_KEY="${BUILD_HOME}/gitea-cyteen.asc" -sudo curl https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | sudo tee ${GITEA_KEY} - -GITEA_DIST="ceres" -GITEA_COMP="main" -GITEA_LIST="deb http://deb.debian.org/debian experimental main" - -# echo "deb https://gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list -# GITEA_LIST="deb [trusted=yes check-date=no] https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" - -# we should use apt-secure - see automate/020_gitea-dpr.sh -GITEA_LIST="deb https://${GITEA_OWNER}:${GITEA_PASS}@${GITEA_URL}/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" -# GITEA_LIST="deb [signed-by=${GITEA_KEY}] https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" - -# full url https://${GITEA_OWNER}:${GITEA_PASS}@git2.ring-zero.co.uk/api/packages/${GITEA_OWNER}/debian/pool/${GITEA_DIST}/main/upload/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" -# echo "deb https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list -# GITEA_LIST="deb https://${GITEA_OWNER}:${GITEA_PASS}@git2.ring-zero.co.uk/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" - -# mimic the resolver behaviour used by the official buildds: - -# add experimental to unstable = see: https://wiki.debian.org/sbuild#CA-4db577cbb51eedbbe4205d14af637002f7fbb9c0_1 -ASPCUD_CRITERIA='-count(solution,APT-Release:=/a=experimental/),-removed,-changed,-new' -# --extra-repository='deb http://deb.debian.org/debian experimental main' \ -# --build-dep-resolver=aspcud \ -# --aspcud-criteria ${ASPCUD_CRITEREA} - -DEPENDS="hyprland-protocols, \ - debhelper-compat, \ - edid-decode, \ - hyprwayland-scanner >=0.3.1, \ - jq, \ - pkg-config, \ - util-linux, \ - vulkan-utility-libraries-dev, \ - wget, \ - libblkid-dev, \ - libgbm1, \ - libhyprlang2, \ - libhyprlang-dev \ - libinput10, \ - libudev1, \ - libvulkan1, \ - libcap-dev, \ - libcairo2-dev, \ - libdisplay-info1, \ - libdisplay-info-bin, \ - libpng-dev, \ - libxcb-util1, \ - libxcb-util-dev, \ - libxcb-render0-dev, \ - libxcb-shm0-dev, \ - libxcb-xfixes0-dev, \ - " -# libwlroots-dev, \ - -# all options to gbp not starting with --git- to the builder, or add to GIT_BUIDLER -GIT_BUILDER='sbuild --arch-all --source --source-only-changes --verbose --dist=unstable' - -# --extra-package="${EXTRA_PACKAGES}" \ -# devuan specific https://git.devuan.org/devuan/documentation/src/branch/master/maintainers/PackagingGuide.md: -# gbp buildpackage \ -# --git-pbuilder \ -# --git-dist=ceres \ -# create \ -# --mirror http://pkgmaster.devuan.org/merged -# -sudo gbp buildpackage \ - --add-depends="${DEPENDS}" \ - --extra-repository="${GITEA_LIST}" \ - --extra-repository-key="${GITEA_KEY}" \ - --build-dep-resolver=aptitude \ - --git-ignore-new \ - --git-ignore-branch \ - --git-pristine-tar \ - --git-submodules \ - --git-builder="${GIT_BUILDER}" \ - --git-debian-branch="${DEBIAN_BRANCH}" \ - --git-debian-tag="${DEBIAN_TAG}" \ - --git-upstream-tag="${UPSTREAM_TAG}" \ - --git-upstream-branch="${UPSTREAM_BRANCH}" \ - --git-export-dir="../build-area" - -# sudo dpkg -i ../${PACKAGE}_${VERSION}_amd64.deb - -# Prevent hanging schroot sessions. -# list all sessions with: schroot -l --all -# -# Re-enter the session -# sudo schroot -c session:unstable-amd64-sbuild-c57f64a1-ea97-4627-bbc4-2f9b03f45015 - -# schroots are mounted under: /var/run/schroot/mount/ - -# Stop the session -# sudo schroot --end-session $(schroot -l --all | grep 'session:unstable-amd64-sbuild-' | awk '{print $1}') +# Debian packages for hyprland have hit unstable and we attempt to build +# debs locally for devuan using gbp. + +sudo apt-get install -y pipewire wireplumber waypipe qt6-wayland + +# status bar + +# xdg-desktop-portal-hyprland +- gbm +apt-get install -y libgbm-dev libgbm1 +apt-get install -y hyprland-protocols +apt-get install -y libhyprlang-dev libhyprlang2 +apt-get install -y libdrm2 libdrm-dev +- libpipewire-0.3 +apt-get intall -y libpipewire-0.3-dev += libspa-0.2 +aot-get install -y libspa-0.2-dev += sdbus-cpp +apt-get install -y libsdbus-c++-dev += wayland-client +apt-get install -y libwayland-client0 += wayland-protocols +apt-get install -y wayland-protocols + +git clone --recursive https://github.com/hyprwm/xdg-desktop-portal-hyprland +cd xdg-desktop-portal-hyprland/ +cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build +cmake --build build +sudo cmake --install build diff --git a/020_klipper.sh b/020_klipper.sh new file mode 100644 index 0000000..fe419cc --- /dev/null +++ b/020_klipper.sh @@ -0,0 +1,78 @@ +#!usr/bin/env bash + +# https://github.com/nhchiu/Klipper-on-Orange-Pi-Zero-2 + +# Update existing release +# apt update --allow-releaseinfo-change && apt dist-upgrade -y +apt-get install git virtualenv -y + +# Add the pi user +adduser pi +adduser pi sudo + +# We need to have klipper, Moonraker, and one of the clients +# Klipper is a 3d-Printer firmware. +# - [klipper](https://www.klipper3d.org/) +# - [klipper install](http://www.klipper3d.org/Installation.html) +# +# A web user interface +# - [Mainsail](https://docs.mainsail.xyz/) +# - [Mainsail](https://docs.mainsail.xyz/setup/getting-started/manual-setup) +# - [Mainsail git](https://github.com/mainsail-crew/mainsail) +# +# Fluidd Klipper web interface for managing your 3d printer. +# - [Fluidd](https://docs.fluidd.xyz/) +# - [Fluidd git](https://github.com/fluidd-core/fluidd) +# +# Moonraker - API Web Server for Klipper +# - [Moonraker](https://moonraker.readthedocs.io/en/latest/) +# - [Moonraker install](https://moonraker.readthedocs.io/en/latest/installation/) +# - [Moonraker git](https://github.com/Arksine/moonraker) +# - [Klipperscreen](https://github.com/jordanruthe/KlipperScreen) +# - [Moonraker-Telegram-Bot](https://github.com/nlef/moonraker-telegram-bot) +# +# PrettyGCode WebGL based GCode preview and simulator +# - [PrettyGCode for Klipper](https://github.com/Kragrathea/pgcode) +# +# Obico 3D printing platform +# This is a Moonraker plugin that enables the Klipper-based 3D printers to connect to Obico. +# - [Obico Cloud for Klipper](https://github.com/TheSpaghettiDetective/moonraker-obico) +# - [Mobileraker's Companion](https://github.com/Clon1998/mobileraker_companion) +# +# Octoprint is a 3d-Printer firmware. +# - [Octoprint](https://docs.octoprint.org/en/master/) +# - [Octoprint](https://github.com/OctoPrint/OctoPrint) +# - [OctoEverywhere for Klipper](https://octoeverywhere.com/?source=kiauh_readme) +# - [OctoApp for Klipper](https://github.com/crysxd/OctoPrint-OctoApp) +# installed to make it functional. + +# We can't use this: +# this is a systemd based script that uses a tui to ask for input. +# [Klipper install and update helper](https://github.com/dw-0/kiauh) + +MainsailOS images includes: +[Mainsail](https://github.com/mainsail-crew/mainsail) + +[Klipper](https://github.com/klipper3d/klipper) + + +Moonraker - API Web Server for Klipper +[Moonraker](https://github.com/arksine/moonraker) + +Webcam daemon +[Crowsnest](https://github.com/mainsail-crew/crowsnest) + +Keep alive daemon +[Sonar](https://github.com/mainsail-crew/sonar) + +Timelapse plugin for Moonraker +[Timelapse](https://github.com/mainsail-crew/moonraker-timelapse) + +Preinstalled software dependencies: + +[Measuring Resonances](https://www.klipper3d.org/Measuring_Resonances.html) + +[Katapult](https://github.com/Arksine/katapult) (formerly known as CanBoot) + +KlipperScreen is a touchscreen GUI that interfaces with Klipper via Moonraker. +[KlipperScreen](https://github.com/jordanruthe/KlipperScreen/) diff --git a/020_klipper_crowsnest.sh b/020_klipper_crowsnest.sh new file mode 100644 index 0000000..bea8067 --- /dev/null +++ b/020_klipper_crowsnest.sh @@ -0,0 +1,8 @@ +#/usr/bin/env bash + +# https://github.com/mainsail-crew/crowsnest + +# # crowsnest +# A wrapper script for webcam streaming on Raspberry Pi OS Lite images like MainsailOS](https://github.com/mainsail-crew/MainsailOS). Mainly written in bash. + +# https://crowsnest.mainsail.xyz/setup/installation diff --git a/020_klipper_fluid.sh b/020_klipper_fluid.sh new file mode 100644 index 0000000..1ff86a3 --- /dev/null +++ b/020_klipper_fluid.sh @@ -0,0 +1,3 @@ +#!/usr/bin +# # Fluidd +# Fluidd is a free and open-source Klipper web interface for managing your 3d printer. diff --git a/020_klipper_mainsail.sh b/020_klipper_mainsail.sh new file mode 100644 index 0000000..18b7418 --- /dev/null +++ b/020_klipper_mainsail.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# # Mainsail +# Makes Klipper more accessible by adding a lightweight, responsive web user +# interface, centred around an intuitive and consistent design philosophy. + +# https://docs.mainsail.xyz/setup/getting-started/manual-setup diff --git a/020_klipper_moonraker.sh b/020_klipper_moonraker.sh new file mode 100644 index 0000000..381382d --- /dev/null +++ b/020_klipper_moonraker.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# # Moonraker - API Web Server for Klipper +# +# Moonraker is a Python 3 based web server that exposes APIs with which +# client applications may use to interact with the 3D printing firmware +# [Klipper](https://github.com/KevinOConnor/klipper). Communication between +# the Klippy host and Moonraker is done over a Unix Domain Socket. Tornado +# is used to provide Moonraker's server functionality. +# +# Documentation for users and developers can be found on +# [Read the Docs](https://moonraker.readthedocs.io/en/latest/). +# +# ### Clients +# +# Note that Moonraker does not come bundled with a client, you will need to +# install one. The following clients are currently available: +# +# - [Mainsail](https://github.com/mainsail-crew/mainsail) by [Mainsail-Crew](https://github.com/mainsail-crew) +# - [Fluidd](https://github.com/fluidd-core/fluidd) by Cadriel +# - [KlipperScreen](https://github.com/jordanruthe/KlipperScreen) by jordanruthe +# - [mooncord](https://github.com/eliteSchwein/mooncord) by eliteSchwein +# +# ### Raspberry Pi Images +# +# Moonraker is available pre-installed with the following Raspberry Pi images: +# +# - [MainsailOS](https://github.com/mainsail-crew/MainsailOS) by [Mainsail-Crew](https://github.com/mainsail-crew) +# - Includes Klipper, Moonraker, and Mainsail +# - [FluiddPi](https://github.com/fluidd-core/FluiddPi) by Cadriel +# - Includes Klipper, Moonraker, and Fluidd + +# [Moonraker install](https://moonraker.readthedocs.io/en/latest/installation/) diff --git a/020_qemu.sh b/020_qemu.sh index ec0ff95..75c6417 100755 --- a/020_qemu.sh +++ b/020_qemu.sh @@ -1,2 +1,5 @@ #!/usr/bin/env bash -apt install -y qemu qemu-kvm qemu-utils + +apt install -y qemu qemu-kvm qemu-utils qemu-user-static qemu-user-static binfmt-support + +sudo update-binfmts --enable qemu-aarch64 qemu-arm diff --git a/git-update.md b/git-update.md new file mode 100644 index 0000000..3a2038e --- /dev/null +++ b/git-update.md @@ -0,0 +1,43 @@ +# the procedure to update sd-card-images repo + +```bash +cat .git/config +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[remote "origin"] + url = git@git2.ring-zero.co.uk:cyteen/sd-card-images.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master +[branch "devuan"] + remote = origin + merge = refs/heads/devuan +[branch "cherry"] + remote = origin + merge = refs/heads/cherry +[branch "add_devuan"] + remote = origin + merge = refs/heads/add_devuan +[remote "upstream"] + url = https://github.com/johang/sd-card-images.git + fetch = +refs/heads/*:refs/remotes/upstream/* +[pull] + ff = only + + +git pull upstream master + +git reset --hard upstream/master + +git push origin master --force + +git branch backup-devuan + +git rebase master + +git push origin devuan --force-with-lease +``` diff --git a/hypr_setup.md b/hypr_setup.md new file mode 100644 index 0000000..56e3fce --- /dev/null +++ b/hypr_setup.md @@ -0,0 +1,21 @@ +# Configuration post install for hyprland wm + +## pipewire/wireplumber + +exec-once=pipewire +exec-once=wireplumber + +## Portal file chooser + +```bash +conf_print_hyprland-portals() { +cat <<-EOF + [preferred] + default=hyprland;gtk + org.freedesktop.impl.portal.FileChooser=kde +EOF +} +conf_print_hyprland-portals | tee ~/.config/xdg-desktop-portal/hyprland-portals.conf +``` + +or use '/usr/share/xdg-desktop-portal/portals.conf' diff --git a/020_hyprwayland-scanner.sh b/hyprland/001_hyprwayland-scanner.sh similarity index 100% rename from 020_hyprwayland-scanner.sh rename to hyprland/001_hyprwayland-scanner.sh diff --git a/hyprland/003_hyprutils.sh b/hyprland/003_hyprutils.sh new file mode 100644 index 0000000..60ffd46 --- /dev/null +++ b/hyprland/003_hyprutils.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +set -x + +# Install deps +sudo apt install -y \ + cmake \ + dh-cmake \ + git \ + build-essential \ + libcairo2 \ + libcairo2-dev \ + libzip4 \ + libzip-dev \ + librsvg2-2 \ + librsvg2-dev + +# Set github user and project name +USER="hyprwm" +PROJECT="hyprutils" +LICENSE="gpl3" +HOMEPAGE="https://github.com/hyprwm/hyprlang" +BUILD_HOME="/var/tmp/hyprlang-git_build" +PACKAGE="hyprutils" +VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name') +VERSION=${VERSION:1} # strip the preceding 'v' +SECTION="x11/wm" +DEBEMAIL="cyteen@ring-zero.co.uk" +DEBFULLNAME="Cyteen May" +DESCRIPTION="A small C++ library for utilities in the Hypr* ecosystem." +LONG_DESCRIPTION="Hyprutils is a small C++ library for utilities used across the Hypr* ecosystem." + +# Make the BUILD_HOME directory and clone upstream +mkdir -p ${BUILD_HOME} +cd ${BUILD_HOME} || exit + +git clone https://github.com/${USER}/${PROJECT}.git ${PACKAGE}-${VERSION} + +cd ${PACKAGE}-${VERSION} || exit + +# debianize the BUILD_HOME directory +dh_make --createorig --single --native --copyright ${LICENSE} --yes + +# Customize the debian directory values +sed -i "s,^\(Description: \).*,\1${DESCRIPTION}," debian/control +sed -i 's,^\(Section: \).*,\1'${SECTION}',' debian/control +sed -i "s,^\(Maintainer: \).*,\1'${DEBFULLNAME}\ \<${DEBEMAIL}\>'," debian/control +sed -i 's,^\(Homepage: \).*,\1'${HOMEPAGE}',' debian/control +sed -i "s|.*insert long.*|${LONG_DESCRIPTION}|" debian/control + +cat <<'EOF' >debian/rules +#!/usr/bin/make -f + +# Uncomment and adjust the following lines as needed +#export DH_VERBOSE = 1 +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +%: + dh $@ --buildsystem=cmake + +override_dh_auto_configure: + dh_auto_configure -- \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" +EOF + +# Build and install Hyprlang using CMake +# cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build +# cmake --build ./build --config Release --target all -j$(nproc 2>/dev/null || getconf NPROCESSORS_CONF) +# sudo cmake --install build + +cat <debian/watch +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/${PROJECT}-$1\.tar\.gz/ \ + https://github.com/${USER}/${PROJECT}/tags .*/v?(\d\S+)\.tar\.gz +EOF + +dpkg-buildpackage -us -uc -b + +echo ${PACKAGE}_${VERSION}_amd64.deb + +sudo dpkg -i ../${PACKAGE}_${VERSION}_amd64.deb diff --git a/020_hyprlang.sh b/hyprland/005_hyprlang.sh similarity index 100% rename from 020_hyprlang.sh rename to hyprland/005_hyprlang.sh diff --git a/020_hyprcursor.sh b/hyprland/007_hyprcursor.sh similarity index 100% rename from 020_hyprcursor.sh rename to hyprland/007_hyprcursor.sh diff --git a/020_hyprland-hyprdots.sh b/hyprland/020_hyprland-hyprdots.sh similarity index 100% rename from 020_hyprland-hyprdots.sh rename to hyprland/020_hyprland-hyprdots.sh diff --git a/020_hyprland-protocols.sh b/hyprland/020_hyprland-protocols.sh similarity index 100% rename from 020_hyprland-protocols.sh rename to hyprland/020_hyprland-protocols.sh diff --git a/hyprland/020_hyprland.sh b/hyprland/020_hyprland.sh new file mode 100644 index 0000000..7815aa5 --- /dev/null +++ b/hyprland/020_hyprland.sh @@ -0,0 +1,1482 @@ +#!/usr/bin/env bash +set -x + +# https://wiki.hyprland.org/Getting-Started/Installation/ + +# An example of a debian package source tree +# git clone https://salsa.debian.org/debian/hyprland.git + +# Install deps +# https://wiki.hyprland.org/Getting-Started/Installation/ + +# NB. Hyprland now statically links to its own fork of wlroots. +# https://github.com/hyprwm/wlroots-hyprland + +# Previous tree from the salsa packaged hyprland by lumin (Mo Zhou ) +## tree -L 3 /space/code_repositories/hyprland/hyprland/debian/ +## /space/code_repositories/hyprland/hyprland/debian/ +## ├── changelog +## ├── control +## ├── copyright +## ├── debhelper-build-stamp +## ├── files +## ├── hyprland +## │   ├── DEBIAN +## │   │   ├── control +## │   │   ├── md5sums +## │   │   ├── shlibs +## │   │   └── triggers +## │   └── usr +## │   ├── bin +## │   ├── lib +## │   └── share +## ├── hyprland-common +## │   ├── DEBIAN +## │   │   ├── control +## │   │   └── md5sums +## │   └── usr +## │   └── share +## ├── hyprland-common.install +## ├── hyprland-common.substvars +## ├── hyprland-dev +## │   ├── DEBIAN +## │   │   ├── control +## │   │   └── md5sums +## │   └── usr +## │   ├── include +## │   └── share +## ├── hyprland-dev.install +## ├── hyprland-dev.substvars +## ├── hyprland.install +## ├── hyprland.substvars +## ├── patches +## │   ├── make.patch +## │   └── series +## ├── rules +## ├── source +## │   └── format +## ├── tmp +## │   └── usr +## │   ├── bin +## │   ├── include +## │   ├── lib +## │   └── share +## └── watch + +conf_print_debian_control() { + cat <<'EOF' +Source: hyprland +Section: x11 +Homepage: https://hyprland.org/ +Priority: optional +Standards-Version: 4.6.2 +Vcs-Git: https://salsa.debian.org/debian/hyperland.git +Vcs-Browser: https://salsa.debian.org/debian/hyperland +Maintainer: Mo Zhou +Build-Depends: + debhelper-compat (= 13), + cmake, + cmake-extras, + meson, + ninja-build, + gettext, + gettext-base, + git, + fontconfig, + libfontconfig-dev, + libffi-dev, + libxml2-dev, + libdrm2, + libdrm-dev, + libxkbcommon-x11-dev, + libxkbregistry-dev, + libxkbcommon-dev, + libpixman-1-dev, + libudev-dev, + libseat-dev, + seatd, + libxcb-dri3-dev, + libvulkan-dev, + libvulkan-volk-dev, + libvkfft-dev, + libgulkan-dev, + libegl-dev, + libgles2, + libegl1-mesa-dev, + glslang-tools, + libinput-bin, + libinput-dev, + libavutil-dev, + libavcodec-dev, + libavformat-dev, + libxcb1, + libxcb-composite0-dev, + libxcb-ewmh2, + libxcb-ewmh-dev, + libxcb-present-dev, + libxcb-icccm4-dev, + libxcb-render-util0, + libxcb-render-util0-dev, + libxcb-res0-dev, + libxcb-xinput-dev, + xdg-desktop-portal-wlr, + hwdata, + hyprwayland-scanner >=0.3.1, + hyprcursor >=0.1.7, + xwayland, + libwayland-server0, + libwayland-dev, + libpango1.0-dev, + wayland-protocols, + libtomlplusplus-dev, + libhyprlang2 >=0.3.2, + libhyprlang-dev, + systemd-dev | libelogind-dev, + libgbm-dev, + libliftoff-dev, + libdisplay-info-dev, + cpio, + +Package: hyprland +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland-common +Suggests: kitty | foot, dolphin, waybar +Description: Tiling compositor with the looks + Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't + sacrifice on its looks. + . + It provides the latest Wayland features, is highly customizable, has all the + eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other + wlr-based compositors and more. + . + This package contains the executables. + +Package: hyprland-dev +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland (= ${binary:Version}) +Description: Tiling compositor with the looks + Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't + sacrifice on its looks. + . + It provides the latest Wayland features, is highly customizable, has all the + eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other + wlr-based compositors and more. + . + This package contains the development files. + +Package: hyprland-common +Architecture: all +Depends: ${misc:Depends} +Description: Tiling compositor with the looks + Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't + sacrifice on its looks. + . + It provides the latest Wayland features, is highly customizable, has all the + eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other + wlr-based compositors and more. + . + This package contains architecture independent files such as wallpapers. + +Package: hyprland-completions +Architecture: all +Depends: ${misc:Depends} +Description: Tiling compositor with the looks + Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't + sacrifice on its looks. + . + It provides the latest Wayland features, is highly customizable, has all the + eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other + wlr-based compositors and more. + . + This package contains the completions for bash, zsh and fish +EOF +} +# conf_print_debian_control | sudo tee debian/control + +conf_print_hyprland_copyright() { + cat <<-'EOF' + Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + Files-Excluded: subprojects/tracy/* + + Files: * + assets/* + docs/* + example/* + hyprctl/* + hyprpm/* + nix/* + src/* + Copyright: 2022, 2023, vaxerski + License: BSD-3-clause + + Files: debian/* + Copyright: 2024, Mo Zhou + License: BSD-3-clause + + ############################################################################### + + Files: protocols/idle.xml + Copyright: 2015, Martin Gräßlin + License: LGPL-2.1+ + + Files: protocols/pointer-constraints-unstable-v1.xml + Copyright: 2015, Red Hat Inc. + 2014, Jonas Ådahl + License: Expat + + Files: protocols/tablet-unstable-v2.xml + Copyright: 2015, 2016, Red Hat, Inc. + 2014, Stephen "Lyude" Chandler Paul + License: Expat + + Files: protocols/wlr-foreign-toplevel-management-unstable-v1.xml + Copyright: 2018, Ilia Bozhinov + License: NTP + + Files: protocols/wlr-layer-shell-unstable-v1.xml + Copyright: 2017, Drew DeVault + License: NTP + + Files: protocols/wlr-output-power-management-unstable-v1.xml + Copyright: 2019, Purism SPC + License: Expat + + Files: protocols/wlr-screencopy-unstable-v1.xml + Copyright: 2019, Andri Yngvason + 2018, Simon Ser + License: Expat + + ############################################################################### + + Files: subprojects/hyprland-protocols/* + Copyright: 2022, Hypr Development + License: BSD-3-clause + + Files: subprojects/hyprland-protocols/protocols/* + Copyright: 2022, Vaxry + License: BSD-3-clause + + ############################################################################### + + Files: subprojects/udis86/* + Copyright: 2002-2013, Vivek Thampi + License: BSD-2-clause + + Files: subprojects/udis86/m4/* + Copyright: 2008, 2009, Francesco Salvestrini + 2008 Dustin J. Mitchell + 2008, Tim Toolan + License: FSFAP + + ############################################################################### + + Files: subprojects/wlroots-hyprland/* + Copyright: 2023, The wlroots contributors + 2017, 2018, Drew DeVault + 2014, Jari Vetoniemi + License: Expat + + Files: subprojects/wlroots-hyprland/include/wlr/xcursor.h + Copyright: 2012, Intel Corporation + License: UNKNOWN + Please fill license UNKNOWN from header of + + Files: subprojects/wlroots-hyprland/include/xcursor/* + Copyright: 2002, Keith Packard + License: UNKNOWN + Please fill license UNKNOWN from header of + + Files: subprojects/wlroots-hyprland/include/xcursor/cursor_data.h + Copyright: 1999, SuSE, Inc. + License: UNKNOWN + Please fill license UNKNOWN from header of + + Files: subprojects/wlroots-hyprland/protocol/drm.xml + Copyright: 2010, 2011, Intel Corporation + 2008-2011, Kristian Høgsberg + License: HPND-sell-variant or NTP~disclaimer + + Files: subprojects/wlroots-hyprland/protocol/input-method-unstable-v2.xml + Copyright: 2018, Purism SPC + 2017, 2018, Red Hat, Inc. + 2015, 2016, Jan Arne Petersen + 2012, 2013, Collabora, Ltd. + 2010-2013, Intel Corporation + 2008-2011, Kristian Høgsberg + License: UNKNOWN + Please fill license UNKNOWN from header of + + Files: subprojects/wlroots-hyprland/protocol/server-decoration.xml + Copyright: 2015, Martin Gräßlin + License: LGPL-2.1+ + + Files: subprojects/wlroots-hyprland/protocol/virtual-keyboard-unstable-v1.xml + Copyright: 2018, Purism SPC + 2012, 2013, Collabora, Ltd. + 2010-2013, Intel Corporation + 2008-2011, Kristian Høgsberg + License: UNKNOWN + Please fill license UNKNOWN from header of + + Files: subprojects/wlroots-hyprland/protocol/wlr-data-control-unstable-v1.xml + Copyright: 2019, Ivan Molodetskikh + 2018, Simon Ser + License: HPND-sell-variant or NTP~disclaimer + + Files: subprojects/wlroots-hyprland/protocol/wlr-export-dmabuf-unstable-v1.xml + Copyright: 2018, Rostislav Pehlivanov + License: UNKNOWN + Please fill license UNKNOWN from header of + + Files: subprojects/wlroots-hyprland/protocol/wlr-foreign-toplevel-management-unstable-v1.xml + Copyright: 2018, Ilia Bozhinov + License: HPND-sell-variant or NTP~disclaimer + + Files: subprojects/wlroots-hyprland/protocol/wlr-gamma-control-unstable-v1.xml + Copyright: 2018, Simon Ser + 2015, Giulio camuffo + License: HPND-sell-variant or NTP~disclaimer + + Files: subprojects/wlroots-hyprland/protocol/wlr-layer-shell-unstable-v1.xml + Copyright: 2017, Drew DeVault + License: HPND-sell-variant or NTP~disclaimer + + Files: subprojects/wlroots-hyprland/protocol/wlr-output-management-unstable-v1.xml + Copyright: 2019, Purism SPC + License: HPND-sell-variant or NTP~disclaimer + + Files: subprojects/wlroots-hyprland/protocol/wlr-output-power-management-unstable-v1.xml + Copyright: 2019, Purism SPC + License: UNKNOWN + Please fill license UNKNOWN from header of + + Files: subprojects/wlroots-hyprland/protocol/wlr-screencopy-unstable-v1.xml + Copyright: 2019, Andri Yngvason + 2018, Simon Ser + License: UNKNOWN + Please fill license UNKNOWN from header of + + Files: subprojects/wlroots-hyprland/protocol/wlr-virtual-pointer-unstable-v1.xml + Copyright: 2019, Josef Gajdusek + License: UNKNOWN + Please fill license UNKNOWN from header of + + Files: subprojects/wlroots-hyprland/tinywl/* + Copyright: no-info-found + License: CC0-1.0 + + Files: subprojects/wlroots-hyprland/xcursor/wlr_xcursor.c + Copyright: 2012, Intel Corporation + License: UNKNOWN + Please fill license UNKNOWN from header of + + Files: subprojects/wlroots-hyprland/xcursor/xcursor.c + Copyright: 2002, Keith Packard + License: UNKNOWN + Please fill license UNKNOWN from header of + + ############################################################################### + + License: BSD-3-clause + The BSD License + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + License: CC0-1.0 + To the extent possible under law, the author(s) have dedicated all + copyright and related and neighboring rights to this software to the public + domain worldwide. This software is distributed without any warranty. + On Debian systems, the complete text of the CC0 license, version 1.0, + can be found in /usr/share/common-licenses/CC0-1.0. + + License: CECILL-C + Please fill license CECILL-C from header of + + License: Expat + The MIT License + . + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated + documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to + whom the Software is furnished to do so, subject to the + following conditions: + . + The above copyright notice and this permission notice shall + be included in all copies or substantial portions of the + Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT + WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE AND NONINFRINGEMENT. IN NO EVENT + SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + License: FSFAP + Please fill license FSFAP from header of + + License: HPND-sell-variant + Please fill license HPND-sell-variant or NTP~disclaimer from header of + + License: LGPL-2.1+ + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; version 2.1 of the License, or (at + your option) any later version. + On Debian systems, the complete text of version 2.1 of the GNU Lesser + General Public License can be found in '/usr/share/common-licenses/LGPL-2.1'. + + License: NTP~disclaimer + Please fill license HPND-sell-variant or NTP~disclaimer from header of + + License: Unlicense + Please fill license Unlicense from header of + + License: Zlib + The zlib License + . + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + . + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + . + 1. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + . + 2. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + . + 3. This notice may not be removed or altered from any source + distribution. + + License: Expat + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + EOF +} +# conf_print_hyprland_copyright | tee debian/copyright + +conf_print_hyprland_common_install() { + cat <<-'EOF' + usr/share/hyprland + EOF +} +# conf_print_hyprland_common_install | tee debian/hyprland-common.install + +conf_print_hyprland_common_substvars() { + cat <<-'EOF' + misc:Depends= + misc:Pre-Depends= + EOF +} +# conf_print_hyprland_common_substvars | tee debian/hyprland-common.substvars + +# conf_print_hyprland_dev_install() { +# cat <<-'EOF' +# usr/include/hyprland/protocols/* +# usr/include/hyprland/wlroots/* +# usr/include/hyprland-dev.h +# usr/share/pkgconfig/hyprland.pc +# +# usr/lib/libwlroots.so.13032 +# EOF +# } +## conf_print_hyprland_dev_install | sudo tee debian/hyprland-dev.install + +# conf_print_hyprland_dev_install() { +# cat <<-'EOF' +# usr/include/hyprland/protocols/* +# usr/include/hyprland/wlroots/* +# usr/include/hyprland-dev.h +# usr/share/pkgconfig/hyprland.pc +# +# usr/lib/libwlroots.so.13032 +# EOF +# } +## conf_print_hyprland_dev_install | sudo tee debian/hyprland-dev.install + +conf_print_hyprland_dev_install() { + cat <<-'EOF' + usr/include/ + usr/share/pkgconfig + EOF +} +# conf_print_hyprland_dev_install | sudo tee debian/hyprland-dev.install + +conf_print_hyprland_dev_substvars() { + cat <<-'EOF' + misc:Depends= + misc:Pre-Depends= + EOF +} +# conf_print_hyprland_dev_substvars | tee debian/hyprland-dev.substvars + +#conf_print_hyprland_install() { +# cat <<-'EOF' +# usr/bin/Hyprland +# usr/bin/hyprctl +# usr/bin/hyprpm +# usr/share/wayland-sessions/hyprland.desktop +# usr/share/xdg-desktop-portal/hyprland-portals.conf +# EOF +#} +## conf_print_hyprland_install | sudo tee debian/hyprland.install + +conf_print_hyprland_install() { + cat <<-'EOF' + usr/bin/ + usr/lib/ + usr/share/man + usr/share/wayland-sessions + usr/share/xdg-desktop-portal + EOF +} +# conf_print_hyprland_install | sudo tee debian/hyprland.install + +conf_print_hyprland_substvars() { + cat <<-EOF + shlibs:Depends=hyprland (>= ${VERSION}), libc6 (>= 2.34), libcairo2 (>= 1.2.4), libdisplay-info1 (>= 0.1.1), libdrm2 (>= 2.4.119), libegl1, libeudev1 (>= 3.2.14), libgbm1 (>= 23.3.5), libgcc-s1 (>=13.2.0), libgles2, libglib2.0-0 (>=2.78.4), libhyprlang2 (>= 0.3.2), libinput10 (>=1.25.0), libliftoff0 (>= 0.4.1), libopengl0, libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.52.0), libpixman-1-0 (>= 0.42.0), libseat1 (>= 0.8.0), libstdc++6 (>= 13.2), libtomlplusplus3 (>= 3.4.0), libwayland-client0 (>= 1.20.0), libwayland-server0 (>= 1.22.0), libxcb-composite0, libxcb-dri3-0 (>= 1.13), libxcb-ewmh2 (>= 0.4.1), libxcb-icccm4 (>= 0.4.1), libxcb-present0, libxcb-render-util0, libxcb-render0, libxcb-res0 (>= 1.10), libxcb-shm0 (>= 1.10), libxcb-xfixes0 (>= 1.15), libxcb-xinput0 (>= 1.15), libxcb1, libxkbcommon0 (>= 1.6.0) + misc:Depends= + misc:Pre-Depends= + EOF +} +# conf_print_hyprland_substvars | tee debian/hyprland.substvars + +conf_print_hyprland_completions_install() { + cat <<-'EOF' + usr/share/bash-completion/completions/hyprctl + usr/share/bash-completion/completions/hyprpm + usr/share/fish/vendor_completions.d/hyprctl.fish + usr/share/fish/vendor_completions.d/hyprpm.fish + usr/share/zsh/site-functions/_hyprctl + usr/share/zsh/site-functions/_hyprpm + EOF +} +# conf_print_hyprland_completions_install | sudo tee debian/hyprland.install + +conf_print_hyprland_completions_substvars() { + cat <<-'EOF' + misc:Depends= + misc:Pre-Depends= + EOF +} +# conf_print_hyprland_completions_substvars | tee debian/hyprland-completions.substvars + +# Don't call this use deb_create_watch.py below. +conf_print_github_watch() { + cat <<-EOF + version=4 + + opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/${PROJECT}-$1\.tar\.gz/ \\ + https://github.com/${USER}/${PROJECT}/tags .*/v?(\d\S+)\.tar\.gz + EOF +} +# conf_print_github_watch | sudo tee debian/watch + +conf_print_initial_changelog() { + cat <<-EOF + ${PROJECT}-${VERSION} (${VERSION}) UNRELEASED; urgency=medium + + * Initial release. + + -- root ${TIMESTAMP} + EOF +} +# conf_print_initial_changelog | sudo tee debian/changelog + +# salsa.debian.org files above this point + +conf_print_hyprland_docs_install() { + cat <<-'EOF' + usr/share/man/man1/Hyprland.1 + usr/share/man/man1/hyprctl.1 + usr/share/man/man1/hyprpm.1 + usr/share/doc/hyprland/README.md + usr/share/doc/hyprland/CONTRIBUTING.md + usr/share/doc/hyprland/LICENSE + EOF +} +# conf_print_hyprland_docs_install | sudo tee debian/hyprland-docs.install + +conf_print_hyprland_preinst() { + cat <<-'EOF' + #!/bin/sh + set -e + + # Define the configuration directory + CONFIG_DIR="/etc/hyprland" + + # Check if the configuration directory exists + if [ ! -d "$CONFIG_DIR" ]; then + # Create the configuration directory + mkdir -p "$CONFIG_DIR" + echo "Created configuration directory: $CONFIG_DIR" + fi + + # Check for existing configuration files and back them up + if [ -f "$CONFIG_DIR/hyprland.conf" ]; then + mv "$CONFIG_DIR/hyprland.conf" "$CONFIG_DIR/hyprland.conf.bak" + echo "Backed up existing configuration file to: $CONFIG_DIR/hyprland.conf.bak" + fi + + # Additional pre-installation tasks can be added here + # This script is a starting point. Depending on your project's needs, you + # might want to add more checks or actions to the preinst script. + # For example, you could check for specific dependencies, verify system + # configurations, or perform any other setup tasks required before installing Hyprland. + + Remember, the preinst script is called before the package is unpacked and installed, + so it cannot rely on any files included in its package. Only essential packages and + pre-dependencies (Pre-Depends) may be assumed to be available at this point + EOF +} +# conf_print_hyprland_preinst | sudo tee debian/hyprland.preinst +# chmod +x debian/hyprland.preinst + +conf_print_hyprland_postinst() { + cat <<-'EOF' + #!/bin/sh + set -e + + # Define the binary directory + BIN_DIR="/usr/bin" + + # Create a symbolic link for the Hyprland binary + if [ ! -e "$BIN_DIR/hyprland" ]; then + ln -s "$BIN_DIR/Hyprland" "$BIN_DIR/hyprland" + echo "Created symbolic link for Hyprland" + fi + + # Check if the Wayland session file exists and update it if necessary + SESSION_FILE="/usr/share/wayland-sessions/hyprland.desktop" + if [ -f "$SESSION_FILE" ]; then + # Perform any necessary updates to the session file + echo "Updated Wayland session file: $SESSION_FILE" + fi + + # Additional post-installation tasks can be added here + This script is a starting point. Depending on your project's needs, you might want + to add more checks or actions to the postinst script. For example, you could check + for specific dependencies, verify system configurations, or perform any other setup + tasks required after installing Hyprland. + + Remember, the postinst script is called after the package is unpacked and installed, + so it can rely on any files included in its package. It's a good place to perform any + final setup or configuration tasks that depend on the installed files + EOF +} +# conf_print_hyprland_postinst | sudo tee debian/hyprland.postinst +# chmod +x debian/hyprland.postinst + +# the install operations taken from the Makefile, is we are using the make +# file we don't need to call the from debian/rules + +conf_print_hyprland_setup() { + cat </dev/null || true; fi + + chmod -R 755 ${PREFIX}/include/hyprland + chmod 755 ${PREFIX}/share/pkgconfig + EOF +} +# conf_print_hyprland_headers | sudo tee debian/install-headers.sh +# chmod +x debian/install-headers.sh + +conf_print_hyprland_rules_1() { + cat <<'EOF' +#!/usr/bin/make -f + +# Uncomment and adjust the following lines as needed +#export DH_VERBOSE = 1 +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +%: + dh $@ --buildsystem=cmake+ninja + +override_dh_auto_configure: + dh_auto_configure -- \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DNO_SYSTEMD=TRUE + +override_dh_auto_build: + dh_auto_build -- \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:STRING=$(CURDIR)/debian/hyperland \ + -DLEGACY_RENDERER:BOOL=true \ + -S . -B ./build -G Ninja +EOF +} +# conf_print_hyprland_rules_1 | sudo tee debian/rules + +conf_print_hyprland_rules_2() { + cat <<'EOF' +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +#%: + dh $@ --buildsystem=cmake + +override_dh_auto_test: + if [ -f obj-x86_64-linux-gnu/build.ninja ] && grep -q 'test' obj-x86_64-linux-gnu/build.ninja; then \ + dh_auto_test; \ + else \ + echo "No tests found, skipping test phase."; \ + fi + +override_dh_auto_build: + meson setup build \ + --prefix=/usr \ + --libexecdir=lib \ + --sbindir=bin \ + --buildtype=release \ + --wrap-mode=nodownload \ + -Db_lto=true \ + -Db_pie=true \ + -Ddefault_library=shared \ + -Dxwayland=enabled \ + -Dsystemd=disabled && \ + meson compile -C build + +override_dh_auto_install: + meson install -C build \ + --destdir=$(CURDIR)/debian/hyprland \ + --skip-subprojects hyprland-protocols && \ + install -Dm0644 -t $(CURDIR)/debian/hyprland/usr/share/licenses/hyprland LICENSE && \ + ./debian/install.sh $(CURDIR) +EOF +} +# conf_print_hyprland_rules_2 | sudo tee debian/rules + +conf_print_hyprland_rules_3() { + cat <<'EOF' +#!/usr/bin/make -f +%: + dh $@ --builddirectory=build/ \ + --buildsystem=meson+ninja + +override_dh_auto_configure: +# meson subprojects update --reset + +# use either -Dbuildtype=release|debug or -Doptimisation= and -Ddebug= +override_dh_auto_build: + meson setup build \ + -Dwarning_level=2 \ + -Ddefault_library=static \ + -Dsystemd=disabled \ + -Dxwayland=enabled \ + -Dlegacy_renderer=enabled \ + -Doptimization=3 \ + -Ddebug=true + ninja -C build + +override_dh_auto_install: + ninja -C build install + dh_install +EOF +} +# conf_print_hyprland_rules_3 | sudo tee debian/rules + +# debian/rules are Makefiles and requires tabs so '-EOF' breaks +# the output of the heredoc. So hardleft for this one. +conf_print_hyprland_rules() { + cat <<'EOF' +#!/usr/bin/make -f + +PREFIX=$(CURDIR)/tmp/usr +%: + dh $@ --buildsystem=meson+ninja --builddirectory=build + +override_dh_auto_configure: + dh_auto_configure -- --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DNO_SYSTEMD:STRING=true -DCMAKE_INSTALL_PREFIX:STRING=$(PREFIX) -S . + +override_dh_auto_build: + dh_auto_build -- all + +override_dh_auto_test: + true + +override_dh_auto_install: + $(MAKE) install DESTDIR=$(CURDIR)/tmp/usr prefix=/usr +EOF +} +# conf_print_hyprland_rules | sudo tee debian/rules + +# mkdir -p debian/patches +conf_print_hyprland_make_patch() { + cat <<-'EOF' + Description: correct installation prefix + Forwarded: not needed + diff --git a/Makefile b/Makefile + index 9c5e94d..08f7ae8 100644 + --- a/Makefile + +++ b/Makefile + @@ -1,4 +1,4 @@ + -PREFIX = /usr/local + +PREFIX = $(CURDIR)/debian/tmp/usr + + legacyrenderer: + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -DLEGACY_RENDERER:BOOL=true -S . -B ./build -G Ninja + EOF +} +# conf_print_hyprland_make_patch | sudo tee debian/patches/00-makefile.patch + +conf_print_hyprland_make_series() { + cat <<-'EOF' + 00-makefile.patch + EOF +} +# conf_print_hyprland_make_series | sudo tee debian/patches/series + +# Function to append build dependencies to debian/control file +append_build_deps() { + # Use name reference to access the original array passed as an argument + local -n DEBIAN_BUILD_DEPS=$1 + local control_file=$2 + + # Temporary file to hold the updated control file content + local temp_control_file="temp_control_file" + + # Create an associative array to filter out duplicates + declare -A unique_deps + for dep in "${DEBIAN_BUILD_DEPS[@]}"; do + unique_deps["$dep"]=1 + done + + # Read the existing control file and append the new unique dependencies + while IFS= read -r line; do + echo "$line" >>"$temp_control_file" + if [[ $line == *"Build-Depends:"* ]]; then + for dep in "${!unique_deps[@]}"; do + echo " $dep," >>"$temp_control_file" + done + fi + done <"$control_file" + + # Replace the original control file with the updated one + mv "$temp_control_file" "$control_file" +} + +missing=( + "vulkan-validationlayers-dev" + "libwayland-egl-backend-des" + "libxcb-errors-dev" +) + +DEBIAN_BUILD_DEPS=( + "build-essential" + "check" + "cmake" + "cmake-extras" + "dh-autoreconf" + "dh-make" + "dh-cmake" + "edid-decode" + "fontconfig" + "gettext" + "gettext-base" + "glslang-tools" + "git" + "hwdata" + "meson" + "ninja-build" + "seatd" + "wget" + "wayland-protocols" + "util-linux" + "vulkan-utility-libraries-dev" + "xdg-desktop-portal-wlr" + "xwayland" + "libavcodec-dev" + "libavformat-dev" + "libavutil-dev" + "libblkid-dev" + "libdrm2" + "libdisplay-info-bin" + "libdisplay-info-dev" + "libdisplay-info1" + "libliftoff-dev" + "libliftoff0" + "libegl1-mesa-dev" + "libegl-dev" + "libelogind-dev" + "libffi-dev" + "libfontconfig-dev" + "libgbm1" + "libgbm-dev" + "libgles2" + "libgles2-mesa-dev" + "libgulkan-dev" + "libinput10" + "libinput-bin" + "libinput-dev" + "libpango1.0-dev" + "libpixman-1-0" + "libpixman-1-dev" + "libseat-dev" + "libtomlplusplus3" + "libudev1" + "libudev-dev" + "libvkfft-dev" + "libvulkan1" + "libvulkan-dev" + "libvulkan-volk-dev" + "libwayland-dev" + "libx11-xcb-dev" + "libxcb1" + "libxcb1-dev" + "libxkbcommon0" + "libxcb-composite0-dev" + "libxcb-dri3-dev" + "libxcb-ewmh2" + "libxcb-ewmh-dev" + "libxcb-icccm4-dev" + "libxcb-image0-dev" + "libxcb-present-dev" + "libxcb-render-util0" + "libxcb-render-util0-dev" + "libxcb-res0-dev" + "libxcb-util1" + "libxcb-util-dev" + "libxcb-xinput-dev" + "libxkbcommon-x11-dev" + "libxkbcommon-dev" + "libxkbregistry-dev" + "libxml2-dev" +) +# "libxcb-errors0" +# "libxcb-errors0-dev" + +sudo apt install -y "${DEBIAN_BUILD_DEPS[@]}" + +# FIXME: select the correct combination of build deps from +# above to be added to the debian/control file. +# The Build-Dep section is a multi-line content. +# +# Add build deps to the debian/control file +# convert array to comma separated list for sed. +BUILD_DEPS=$( + IFS=',' + echo "${PACKAGES[*]}" +) +# sed -i -e '$a\' -e "Build-Depends: $BUILD_DEPS" debian/control + +# Set github user and project name +USER="hyprwm" +PROJECT="Hyprland" +LICENSE="bsd" # Adjust based on the actual license +SECTION="x11/wm" +HOMEPAGE="https://github.com/hyprwm/Hyprland" +PACKAGE="hyprland" +VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name') +VERSION=${VERSION:1} # strip the preceding 'v' +TIMESTAMP=$(date -R) # This generates the current date and time in RFC 2822 format +BUILD_HOME="/var/tmp/hyprland-${VERSION}-git_build" +DEBEMAIL="cyteen@ring-zero.co.uk" +DEBFULLNAME="Cyteen May" +# DEBIAN_BRANCH="suites/excalibur" +DEBIAN_BRANCH="suites/unstable" +DEBIAN_SUITE="${DEBIAN_BRANCH##*/}" +DEBIAN_MIRROR="http://deb.devuan.org/merged" +DEBIAN_ARCH="$(dpkg --print-architecture)" +DEBIAN_INCLUDE="ca-certificates,eatmydata,ccache,git" +DEBIAN_TAG='debian/%(version)s' +UPSTREAM_BRANCH="upstream/latest" +# UPSTREAM_TAG='v%(version)s' +UPSTREAM_TAG='upstream/v%(version)s' +TARGET_DIR="/srv/chroot/unstable-${DEBIAN_ARCH}-sbuild" +DESCRIPTION="Hyprland is a dynamic tiling Wayland compositor based on wlroots," +LONG_DESCRIPTION="Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks. It provides the latest Wayland features, is highly customizable, has all the eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other wlr-based compositors and more..." + +# Check if the target directory exists +if [ ! -d "${TARGET_DIR}" ]; then + echo "Target directory ${TARGET_DIR} does not exist. Creating chroot environment..." + sudo sbuild-createchroot \ + --include="${DEBIAN_INCLUDE}" \ + --merged-usr \ + --make-sbuild-tarball=/srv/chroot/${DEBIAN_SUITE}-${DEBIAN_ARCH}.tar.gz \ + ${DEBIAN_SUITE} ${TARGET_DIR} ${DEBIAN_MIRROR} +else + echo "Target directory ${TARGET_DIR} already exists. Skipping chroot creation." +fi + +# Delete the schroot +# sudo rm -r /srv/chroot/unstable-amd64-sbuild/ +# sudo rm /etc/schroot/chroot.d/unstable-amd64-sbuild-* /etc/sbuild/chroot/unstable-amd64-sbuild + +# Make the BUILD_DEST for git and gbp changeable from just PACKAGE +# gbp prefers no version number in the containing directory. +# BUILD_DEST="${BUILD_HOME}/${PACKAGE}_${VERSION}" +BUILD_DEST="${BUILD_HOME}/${PACKAGE}" +SUBPROJECTS_DEST="${BUILD_DEST}/subprojects" + +# Make the BUILD_HOME directory and clone upstream +mkdir -p ${BUILD_HOME} + +cd ${BUILD_HOME} || exit + +# git clone --recurse-submodules https://github.com/${USER}/${PROJECT}.git ${BUILD_DEST} +# gbp clone https://github.com/${USER}/${PROJECT}.git ${BUILD_DEST} +# git clone https://github.com/${USER}/${PROJECT}.git ${BUILD_DEST} + +# git clone --no-checkout -o ${UPSTREAM_BRANCH} https://github.com/${USER}/${PROJECT}.git ${BUILD_DEST} + +gbp clone \ + --pristine-tar \ + --debian-branch=${DEBIAN_BRANCH} \ + --upstream-branch=${UPSTREAM_BRANCH} \ + --add-upstream-vcs \ + --verbose \ + https://github.com/${USER}/${PROJECT}.git ${BUILD_DEST} + +cd ${BUILD_DEST} || exit +git checkout -b ${DEBIAN_BRANCH} ${VERSION} + +#============================================================================== +# debianize the BUILD_HOME directory +#============================================================================== + +# prepare Debian packaging from an original source archive +dh_make \ + --createorig \ + --single \ + --native \ + --copyright ${LICENSE} \ + --packagename ${PACKAGE}_${VERSION} \ + --yes + +rm debian/*.ex + +mkdir -p debian + +# Install the conf_print heredocs +conf_print_github_watch | sudo tee debian/watch +chmod +x debian/watch +conf_print_debian_control | sudo tee debian/control +conf_print_hyprland_copyright | tee debian/copyright + +conf_print_hyprland_common_install | tee debian/hyprland-common.install +conf_print_hyprland_common_substvars | tee debian/hyprland-common.substvars + +conf_print_hyprland_dev_install | sudo tee debian/hyprland-dev.install +conf_print_hyprland_dev_substvars | tee debian/hyprland-dev.substvars + +conf_print_hyprland_install | tee debian/hyprland.install +conf_print_hyprland_substvars | tee debian/hyprland.substvars + +conf_print_hyprland_completions_install | tee debian/hyprland-completions.install +conf_print_hyprland_completions_substvars | tee debian/hyprland-completions.substvars + +# conf_print_initial_changelog | sudo tee debian/changelog + +conf_print_hyprland_docs_install | sudo tee debian/hyprland-docs.install + +# conf_print_hyprland_preinst | sudo tee debian/hyprland.preinst +# chmod +x debian/hyprland.preinst + +# conf_print_hyprland_postinst | sudo tee debian/hyprland.postinst +# chmod +x debian/hyprland.postinst + +# if we are using the makefile we don't need to call this from the debian/rules +# conf_print_hyprland_setup | sudo tee debian/install.sh +# chmod +x debian/install.sh + +# conf_print_hyprland_prerm | tee debian/hyprland.prerm +# chmod +x debian/hyprland.prerm + +# conf_print_hyprland_postrm | tee debian/hyprland.postrm +# chmod +x debian/hyprland.postrm + +conf_print_hyprland_headers | sudo tee debian/install-headers.sh +chmod +x debian/install-headers.sh + +# we now remake the patch using the patch-queue branch +# conf_print_hyprland_make_patch | sudo tee debian/patches/00-makefile.patch +# conf_print_hyprland_make_series | sudo tee debian/patches/series + +# conf_print_hyprland_rules | sudo tee debian/rules +# conf_print_hyprland_rules_1 | sudo tee debian/rules +# conf_print_hyprland_rules_2 | sudo tee debian/rules +conf_print_hyprland_rules_3 | sudo tee debian/rules + +#============================================================================== +# Call the append function to add the build deps to the controlfile. +# append_build_deps DEBIAN_BUILD_DEPS debian/control + +# Customize the debian directory values +# sed -i 's,^\(Section: \).*,\1'${SECTION}',' debian/control +# sed -i "s,^\(Maintainer: \).*,\1'${DEBFULLNAME}\ \<${DEBEMAIL}\>'," debian/control +# sed -i 's,^\(Homepage: \).*,\1'${HOMEPAGE}',' debian/control +# sed -i "s,^\(Description: \).*,\1${DESCRIPTION}," debian/control +# sed -i "s|.*insert long.*|${LONG_DESCRIPTION}|" debian/control + +sed -i \ + -e "s|^\(Section: \).*|\1${SECTION}|" \ + -e "s|^\(Maintainer: \).*|\1'${DEBFULLNAME}\ \<${DEBEMAIL}\>'|" \ + -e 's|^\(Homepage: \).*|\1'${HOMEPAGE}'|' \ + -e "s|^\(Description: \).*|\1${DESCRIPTION}|" \ + -e "s|.*insert long.*|${LONG_DESCRIPTION}|" \ + debian/control + +# ./debian/install-headers.sh $(CURDIR) && \ + +# mkdir -p $(CURDIR)/debian/hyprland/usr/include/hyprland/wlroots && \ +# mv $(CURDIR)/debian/hyprland/usr/include/wlr \ +# $(CURDIR)/debian/hyprland/usr/include/hyprland/wlroots && \ +# rm -f $(CURDIR)/debian/hyprland/usr/lib/libwlroots.so && \ +# rm -rf $(CURDIR)/debian/hyprland/usr/lib/pkgconfig && \ +# rm -rf $(CURDIR)/debian/hyprland/usr/share/xdg-desktop-portal && \ + +# https://salsa.debian.org/debian/debian-package-init/-/blob/master/deb_create_watch.py +# outputs to debian/watch/ With deb_create_watch.py in your path +EXEC_PREFIX=${HOME}/.local/bin +wget -c -O ${EXEC_PREFIX}/deb_create_watch.py https://salsa.debian.org/debian/debian-package-init/-/raw/master/deb_create_watch.py?inline=false + +python3 ${EXEC_PREFIX}/deb_create_watch.py https://github.com/${USER}/${PROJECT} +# version=4 +# +# opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/hyprlang-$1\.tar\.gz/ \ +# https://github.com/hyprwm/hyprlang/tags .*/v?(\d\S*)\.tar\.gz + +#============================================================================== +# Update Changelog +#============================================================================== + +#--snapshot \ +# --commit \ +# --commit-msg="Commit after debian control pruned of dh_make ex." \ + +# switch to the branch the you wish to contain the debian directory +git checkout -b ${DEBIAN_BRANCH} + +DEBEMAIL="cyteen@ring-zero.co.uk" DEBFULLNAME="Cyteen May" \ + gbp dch \ + --auto \ + --local=devuan \ + --no-git-author \ + --force-distribution \ + --new-version=${VERSION} \ + --release \ + --upstream-branch=${UPSTREAM_BRANCH} \ + --upstream-tag=${UPSTREAM_TAG} \ + --distribution=${DEBIAN_SUITE} \ + --debian-branch=${DEBIAN_BRANCH} \ + --debian-tag=${DEBIAN_TAG} + +#============================================================================== +# Commit the debian directory to the debian branch +git add debian +git commit -m "Post gbp dch commit upstream changelog" +#============================================================================== + +#============================================================================== +# Patch / rebase +#============================================================================== + +# This drops you back to the patch branch +# sudo gbp pq --time-machine=10 --force import + +# alter the Makefile to install to the debian directpry +# sed -i '1s|^PREFIX = /usr/local|PREFIX = $(CURDIR)/debian/tmp/usr|' Makefile +# git add Makefile + +# Export the Patches and Commit the Changes: +# sudo gbp pq export --commit -v +#============================================================================== + +# Post patch / rebase commit. +# git add debian/patches +# git commit -m "Alter Makefile for Debian directory installation" + +# AUR patch https://pastebin.com/7WPZ7ewq + +# we ask gbp buildpackage to deal with dubmodules. +# git submodule update --init --recursive + +# git config submodule.subprojects/wlroots-hyprland.url "${SUBPROJECTS_DEST}/wlroots-hyprland" +# git config submodule.subprojects/hyprland-protocols.url "${SUBPROJECTS_DEST}/hyprland-protocols" +# git config submodule.subprojects/udis86.url "${SUBPROJECTS_DEST}/udis86" +# git config submodule.subprojects/tracy.url "${SUBPROJECTS_DEST}/tracy" + +# git -C subprojects/wlroots-hyprland reset --hard +# sed -E -i -e "s/(soversion = .*$)/soversion = 13032/g" subprojects/wlroots-hyprland/meson.build + +# hyprland/subprojects submodules. +# git+https://github.com/canihavesomecoffee/udis86.git +# git+https://github.com/hyprwm/hyprland-protocols.git +# git+https://github.com/hyprwm/Hyprland.git +# git+https://github.com/hyprwm/wlroots-hyprland.git +# git+https://github.com/wolfpld/tracy.git + +#============================================================================== +## dpkg-buildpackage -us -uc -b +#gbp buildpackage \ +# --git-pristine-tar \ # Use pristine-tar to create orig tarball +# --git-submodules \ # Transparently handle submodules in the upstream tree +# --git-ignore-new \ # Build with uncommitted changes in the source tree +# --git-debian-branch=${DEBIAN_BRANCH} \ # Branch the Debian package is being developed on +# --git-upstream-branch=${UPSTREAM_BRANCH} \ +# --git-export-dir="../build-area" \ # before building the package export the source into EXPORT_DIR +# --git-tag # create a tag after a successful build + +# git checkout -b ${DEBIAN_BRANCH} + +# Adding gitea package registry - https://docs.gitea.com/usage/packages/debian +# "deb [signed-by=/etc/apt/keyrings/gitea-{owner}.asc] https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" +# sudo curl https://gitea.example.com/api/packages/{owner}/debian/repository.key -o /etc/apt/keyrings/gitea-{owner}.asc + +# upload dev to gitea registry +# curl --user your_username:your_password_or_token \ +# --upload-file path/to/file.deb \ +# https://gitea.example.com/api/packages/testuser/debian/pool/bionic/main/upload + +EXTRA_PACKAGES="/space/code_repositories/hyprland/" # directory containing extra debian packages (.deb) +GITEA_OWNER="cyteen" +GITEA_PASS="mlpfinsonik" +GITEA_URL="git2.ring-zero.co.uk" +# GITEA_TOKEN="e844ba5fa9f57645eb1e32cfcb67a60d650dfbf0" +# GITEA_TOKEN="25f01d539f3eea5edf2625f825fb84050af080e4" + +# the gitea asc key +# GITEA_KEY="$(curl https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key)" + +# GITEA_KEY="/etc/apt/trusted.gpg.d/gitea-cyteen.gpg" +# GITEA_KEY="../gitea-cyteen.gpg" +# GITEA_KEY="$(curl -fsSL https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | gpg --dearmor -q)" +# sudo curl -fsSL https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | gpg --dearmor -q -o ${GITEA_KEY} + +# sbuild called for an asc key file which is what gitea provides, and puts it in: +# /etc/apt/trusted.gpg.d/sbuild-extra-repository-IDqCM94OpA.gpg +# GITEA_KEY="/etc/apt/keyrings/gitea-cyteen.asc" + +GITEA_KEY="${BUILD_HOME}/gitea-cyteen.asc" +sudo curl https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | sudo tee ${GITEA_KEY} + +GITEA_DIST="ceres" +GITEA_COMP="main" +GITEA_LIST="deb http://deb.debian.org/debian experimental main" + +# echo "deb https://gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list +# GITEA_LIST="deb [trusted=yes check-date=no] https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" + +# we should use apt-secure - see automate/020_gitea-dpr.sh +GITEA_LIST="deb https://${GITEA_OWNER}:${GITEA_PASS}@${GITEA_URL}/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" +# GITEA_LIST="deb [signed-by=${GITEA_KEY}] https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" + +# full url https://${GITEA_OWNER}:${GITEA_PASS}@git2.ring-zero.co.uk/api/packages/${GITEA_OWNER}/debian/pool/${GITEA_DIST}/main/upload/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" +# echo "deb https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list +# GITEA_LIST="deb https://${GITEA_OWNER}:${GITEA_PASS}@git2.ring-zero.co.uk/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" + +# mimic the resolver behaviour used by the official buildds: + +# add experimental to unstable = see: https://wiki.debian.org/sbuild#CA-4db577cbb51eedbbe4205d14af637002f7fbb9c0_1 +ASPCUD_CRITERIA='-count(solution,APT-Release:=/a=experimental/),-removed,-changed,-new' +# --extra-repository='deb http://deb.debian.org/debian experimental main' \ +# --build-dep-resolver=aspcud \ +# --aspcud-criteria ${ASPCUD_CRITEREA} + +DEPENDS="hyprland-protocols, \ + debhelper-compat, \ + edid-decode, \ + hyprwayland-scanner >=0.3.1, \ + jq, \ + pkg-config, \ + util-linux, \ + vulkan-utility-libraries-dev, \ + wget, \ + libblkid-dev, \ + libgbm1, \ + libhyprlang2, \ + libhyprlang-dev \ + libinput10, \ + libudev1, \ + libvulkan1, \ + libcap-dev, \ + libcairo2-dev, \ + libdisplay-info1, \ + libdisplay-info-bin, \ + libpng-dev, \ + libxcb-util1, \ + libxcb-util-dev, \ + libxcb-render0-dev, \ + libxcb-shm0-dev, \ + libxcb-xfixes0-dev, \ + " +# libwlroots-dev, \ + +# all options to gbp not starting with --git- to the builder, or add to GIT_BUIDLER +GIT_BUILDER='sbuild --arch-all --source --source-only-changes --verbose --dist=unstable' + +# --extra-package="${EXTRA_PACKAGES}" \ +# devuan specific https://git.devuan.org/devuan/documentation/src/branch/master/maintainers/PackagingGuide.md: +# gbp buildpackage \ +# --git-pbuilder \ +# --git-dist=ceres \ +# create \ +# --mirror http://pkgmaster.devuan.org/merged +# +sudo gbp buildpackage \ + --add-depends="${DEPENDS}" \ + --extra-repository="${GITEA_LIST}" \ + --extra-repository-key="${GITEA_KEY}" \ + --build-dep-resolver=aptitude \ + --git-ignore-new \ + --git-ignore-branch \ + --git-pristine-tar \ + --git-submodules \ + --git-builder="${GIT_BUILDER}" \ + --git-debian-branch="${DEBIAN_BRANCH}" \ + --git-debian-tag="${DEBIAN_TAG}" \ + --git-upstream-tag="${UPSTREAM_TAG}" \ + --git-upstream-branch="${UPSTREAM_BRANCH}" \ + --git-export-dir="../build-area" + +# sudo dpkg -i ../${PACKAGE}_${VERSION}_amd64.deb + +# Prevent hanging schroot sessions. +# list all sessions with: schroot -l --all +# +# Re-enter the session +# sudo schroot -c session:unstable-amd64-sbuild-c57f64a1-ea97-4627-bbc4-2f9b03f45015 + +# schroots are mounted under: /var/run/schroot/mount/ + +# Stop the session +# sudo schroot --end-session $(schroot -l --all | grep 'session:unstable-amd64-sbuild-' | awk '{print $1}') diff --git a/hyprland/README.md b/hyprland/README.md new file mode 100644 index 0000000..a704df3 --- /dev/null +++ b/hyprland/README.md @@ -0,0 +1,143 @@ +# Hyprland for debian + +Here we have a number of scripts to build the dependencies for hyprland tiling +wayland compositor. + +Our goal is to have a 'debian' way to build these packages using gitbuildpackage +to update from upstream, apply patches in a patch queue branch and output debian +packages which can be added to the gitea package repo using the automate/utils +helper scripts. + +NB. We have a working example from salsa in [/space/code_repositories/hyprland/](https://salsa.debian.org/debian/hyprland/) that successfully built the 0.36 and upgraded to 0.39.1 +using these watch files which were missing from the salsa [hyperland](https://salsa.debian.org/debian/hyprland) and [hyperlang](https://salsa.debian.org/debian/hyprlang) repos: + +```bash +conf_print_debian-watch_hyprland() { +cat <<-'EOF' + version=4 + + opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/hyprland-$1\.tar\.gz/ \ + https://github.com/hyprwm/hyprland/tags .*/v?(\d\S*)\.tar\.gz +EOF +} +# conf_print_debian-watch_hyprland | sudo tee debian/watch +``` + +This is now included in the salsa hyperlang repo: + +```bash +conf_print_debian-watch_hyprlang() { +cat <<-'EOF' | tee debian/watch + version=4 + + opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/hyprlang-$1\.tar\.gz/ \ + https://github.com/hyprwm/hyprlang/tags .*/v?(\d\S*)\.tar\.gz +EOF +} +# conf_print_debian-watch_hyprlang | sudo tee debian/watch +``` + +From phind: + +```bash +version=4 +opts="searchmode=html, filenamemangle=s/.+\/v?(\d+\.\d+)\.tar\.gz/hyprland-protocols-$1.tar.gz/" +https://github.com/hyprwm/hyprland-protocols/tags .*/v?(\d+\.\d+)\.tar\.gz + +``` + +From salsa repo: + +```bash +version=4 +opts="searchmode=html" \ + https://github.com/hyprwm/hyprland-protocols/tags \ + https://github.com/hyprwm/hyprland-protocols/archive/refs/tags/v(\d+)\.(\d+).tar\.gz +``` + +This did not work for 0.4.0 or 0.4.1 + +## resulting packages + +the hyprland build provides: + +- hyprland +- hyprland-common +- hyprland-completitions (locally added) +- hyprland-dev + +the hyperlang build provides: + +- hyprlang +- libhyprlang-dev +- libhyprlang2 + +dpkg -i libudis86-0_0+20221013-1_amd64.deb +dpkg -i udcli_0+20221013-1_amd64.deb +dpkg -i hyprwayland-scanner_0.3.10-1_amd64.deb +dpkg -i libhyprlang2_0.5.2-1_amd64.deb +dpkg -i libhyprcursor0_0.1.9-1_amd64.deb +dpkg -i libhyprutils0_0.1.5-1_amd64.deb +dpkg -i hyprcursor-util_0.1.9-1_amd64.deb +dpkg -i hyprland-protocols_0.3.0-1_all.deb +dpkg -i hyprland_0.41.2+ds-1_amd64.deb +dpkg -i hyprland-backgrounds_0.41.2+ds-1_all.deb +dpkg -i hyprpaper_0.7.0-1_amd64.deb +so far we have manually updated these from the debian source directory with uscan command from the devscripts package: + +```bash + +conf_print_debian-watch_hyprland | sudo tee debian/watch +uscan --no-download --verbose +uscan +while dquilt push; do dquilt refresh; done +dch +``` + +```bash +UPSTREAM_VERSION="0.3.0" +LOCAL_VERSION="1" +gbp import-orig --uscan +gbp pqapply +gbp dch -N ${UPSTREAM_VERSION}-${LOCAL_VERSION} -R +git add . +git commit -m "Update debian/changelog for version ${UPSTREAM_VERSION)-${LOCAL_VERSION}" +``` + +## build sequence for build from git + +NB these scripts only build a debianized upstream git packages, better to fix the salsa packages. + +- [hyprwayland-scanner](https://salsa.debian.org/debian/hyprland-protocols) - available in debian unstable + + 001_hyprwayland-scanner.sh [hyprwayland-scanner - A Hyprland implementation of wayland-scanner, in and for C++.](https://github.com/hyprwm/hyprwayland-scanner) + +- [hyprutils](https://salsa.debian.org/NyxTrail/hyprutils) available in debian + + 003_hyprutils.sh [hyprutils - Hyprutils is a small C++ library for utilities used across the Hypr\* ecosystem.](https://github.com/hyprwm/hyprutils) + +- [hyprlang](https://salsa.debian.org/NyxTrail/hyprlang) available in debian + + 005_hyprlang.sh [hyprlang - The official implementation library for the hypr config language.](https://github.com/hyprwm/hyprlang) + +- [hypcursor](https://salsa.debian.org/NyxTrail/hyprcursor) available in debian + + 007_hyprcursor.sh [hyprcursor - The hyprland cursor format, library and utilities.](https://github.com/hyprwm/hyprcursor) + +- [hyprland-protocols](https://salsa.debian.org/debian/hyprland-protocols) - available in debian unstable + + 010_hyprland-protocols.sh [hyprland-protocols - Wayland protocol extensions for Hyprland](https://github.com/hyprwm/hyprland-protocols) + +- [hyprland](https://salsa.debian.org/NyxTrail/hyprland) available in debian + + 020_hyprland.sh [Hyprland - Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.](https://github.com/hyprwm/Hyprland) + +And a bonus - dot files to configure a pretty hypr (not working yet): + +- [hyprpaper](https://github.com/hyprwm/hyprpaper) - wallpaper utility for Hyprland with the ability to dynamically change wallpapers through sockets. + +- hyprdots + + 025_hyprland-hyprdots.sh [hyprland dotfiles to be converted from arch.](https://github.com/prasanthrangan/hyprdots) + +### gitbuildpackage script automate/020_hyprland.sh diff --git a/utils/update-schroots.sh b/utils/update-schroots.sh new file mode 100644 index 0000000..9e57560 --- /dev/null +++ b/utils/update-schroots.sh @@ -0,0 +1,5 @@ +#!usr/bin/env bash + +for chroot in $(schroot -l --exclude-aliases | grep ^source:); do + (sbuild-update -udcar "$chroot" 2>&1) +done