[neon/backports-jammy/libdecor-0] debian: backport libdecor-0 for libsdl2 for plasma-desktop joystick kcm

Carlos De Maine null at kde.org
Fri Nov 10 21:27:31 GMT 2023


Git commit 3a67ab79f8f3d538a61d7069ce670dc3652fd5a4 by Carlos De Maine.
Committed on 10/11/2023 at 22:27.
Pushed by carlosdem into branch 'master'.

backport libdecor-0 for libsdl2 for plasma-desktop joystick kcm

A  +11   -0    debian/.gitignore
A  +97   -0    debian/changelog
A  +1    -0    debian/clean
A  +129  -0    debian/control
A  +57   -0    debian/copyright
A  +5    -0    debian/gbp.conf
A  +2    -0    debian/libdecor-0-0.install
A  +63   -0    debian/libdecor-0-0.symbols.in
A  +3    -0    debian/libdecor-0-dev.install
A  +1    -0    debian/libdecor-0-plugin-1-cairo.install
A  +1    -0    debian/libdecor-0-plugin-1-gtk.install
A  +3    -0    debian/libdecor-tests.install
A  +39   -0    debian/rules
A  +1    -0    debian/shlibs.local
A  +1    -0    debian/source/format
A  +11   -0    debian/tests/control
A  +50   -0    debian/tests/libdecor-0-dev
A  +67   -0    debian/tests/run-with-display
A  +5    -0    debian/upstream/metadata
A  +4    -0    debian/watch

https://invent.kde.org/neon/backports-jammy/libdecor-0/-/commit/3a67ab79f8f3d538a61d7069ce670dc3652fd5a4

diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644
index 0000000..bbf459b
--- /dev/null
+++ b/debian/.gitignore
@@ -0,0 +1,11 @@
+/*.debhelper.log
+/*.substvars
+/.debhelper/
+/debhelper-build-stamp
+/files
+/libdecor-0-0.symbols
+/libdecor-0-0/
+/libdecor-0-dev/
+/libdecor-0-plugin-1-cairo/
+/libdecor-tests/
+/tmp/
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..d7c2639
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,97 @@
+libdecor-0 (0.2.0-1) unstable; urgency=medium
+
+  * New upstream release, functionally equivalent to 0.1.99~git20230907-1
+  * Revert "d/gbp.conf: Branch for debian/snapshots, upstream/snapshots
+    branches"
+  * Release to unstable
+
+ -- Simon McVittie <smcv at debian.org>  Tue, 26 Sep 2023 17:35:34 +0100
+
+libdecor-0 (0.1.99~git20230907-1) experimental; urgency=medium
+
+  * New upstream git snapshot, similar to upcoming 0.2.0 release
+  * d/p/libecor-make-getter-for-min-max-limits-public.patch:
+    Drop patch, included in the upstream snapshot
+  * d/copyright: Update
+  * d/control: Add libdecor-0-plugin-1-gtk and install it by default.
+    The -cairo plugin is still available, but doesn't match any application
+    toolkits, while the new -gtk plugin matches GTK applications.
+  * d/tests/run-with-display: Use absolute path to WAYLAND_DISPLAY socket.
+    This means we can still use the Wayland display, even if dh_auto_test
+    changes our XDG_RUNTIME_DIR.
+  * d/gbp.conf: Branch for debian/snapshots, upstream/snapshots branches
+  * Upload to experimental for NEW processing
+
+ -- Simon McVittie <smcv at debian.org>  Tue, 19 Sep 2023 12:18:54 +0100
+
+libdecor-0 (0.1.1-2) unstable; urgency=medium
+
+  [ Christian Rauch ]
+  * Update URLs to new upstream repo on the freedesktop.org GitLab instance
+
+  [ Simon McVittie ]
+  * d/upstream/metadata: Canonicalize Gitlab URLs
+  * d/p/libecor-make-getter-for-min-max-limits-public.patch,
+    d/p/debian/libdecor-0-0.symbols.in:
+    Add patch from upstream to promote two symbols from plugin-only to
+    public (API only, no ABI change).
+    SDL 2.27.x snapshots want to use these.
+  * d/.gitignore: Add
+  * Update standards version to 4.6.2 (no changes needed)
+
+ -- Simon McVittie <smcv at debian.org>  Wed, 08 Feb 2023 20:01:25 +0000
+
+libdecor-0 (0.1.1-1) unstable; urgency=medium
+
+  [ Christian Rauch ]
+  * New upstream release
+    - Drop all patches, included in the upstream release
+  * Update private symbols
+
+  [ Simon McVittie ]
+  * Distinguish between public and private symbols.
+    To do this, generate the .symbols file from a template, so that the
+    private symbols generate a lockstep dependency on the current binary
+    version.
+  * Update autopkgtest.
+    Now that more symbols used in the demo programs are auto-discovered,
+    the autopkgtest needs to copy config.h from a libdecor build.
+  * Standards-Version: 4.6.1 (no changes required)
+
+  [ Debian Janitor ]
+  * Remove constraints unnecessary since buster
+    - Build-Depends: Drop versioned constraint on meson and
+      wayland-protocols
+
+ -- Simon McVittie <smcv at debian.org>  Tue, 01 Nov 2022 22:22:04 +0000
+
+libdecor-0 (0.1.0-3) unstable; urgency=medium
+
+  * d/control: Add Vcs-Git, Vcs-Browser
+  * Set Rules-Requires-Root to no
+
+ -- Simon McVittie <smcv at debian.org>  Tue, 14 Dec 2021 16:10:27 +0000
+
+libdecor-0 (0.1.0-2) unstable; urgency=medium
+
+  * Mark all patches as applied upstream
+  * d/patches: Add some more bug fixes from upstream
+    - This requires a build-dependency on libopengl-dev when building
+      the manual tests
+  * Use https format URI in copyright file
+  * d/upstream/metadata: Add
+  * Standards-Version: 4.6.0 (no changes needed)
+  * Upload to unstable
+
+ -- Simon McVittie <smcv at debian.org>  Sat, 06 Nov 2021 16:23:30 +0000
+
+libdecor-0 (0.1.0-1) experimental; urgency=medium
+
+  [ Christian Rauch ]
+  * Initial release (Closes: #988116)
+
+  [ Simon McVittie ]
+  * d/control: Set Maintainer to the SDL team
+  * Various packaging and test improvements
+
+ -- Simon McVittie <smcv at debian.org>  Wed, 11 Aug 2021 16:06:55 +0100
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..2f4d1ad
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+debian/libdecor-0-0.symbols
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b220323
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,129 @@
+Source: libdecor-0
+Section: x11
+Priority: optional
+Maintainer: Debian SDL packages maintainers <pkg-sdl-maintainers at lists.alioth.debian.org>
+Uploaders:
+ Christian Rauch <Rauch.Christian at gmx.de>,
+ Simon McVittie <smcv at debian.org>
+Build-Depends:
+ debhelper-compat (= 13),
+ libcairo2-dev,
+ libdbus-1-dev,
+ libegl-dev <!noinsttest>,
+ libgl-dev <!noinsttest>,
+ libgtk-3-dev,
+ libopengl-dev <!noinsttest>,
+ libpango1.0-dev,
+ libwayland-dev (>= 1.18),
+ libxkbcommon-dev <!noinsttest>,
+ meson,
+ pkg-config,
+ wayland-protocols,
+Rules-Requires-Root: no
+Standards-Version: 4.6.2
+Homepage: https://gitlab.freedesktop.org/libdecor/libdecor
+Vcs-Git: https://salsa.debian.org/sdl-team/libdecor-0.git
+Vcs-Browser: https://salsa.debian.org/sdl-team/libdecor-0
+
+Package: libdecor-0-0
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends:
+ ${misc:Pre-Depends},
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+Recommends:
+ default-libdecor-0-plugin-1 | libdecor-0-plugin-1,
+Conflicts:
+ libdecor,
+Replaces:
+ libdecor,
+Description: client-side window decoration library
+ libdecor is a library that can help Wayland clients draw window
+ decorations for them. It aims to provide multiple backends that implements the
+ decoration drawing.
+ .
+ This package contains the runtime library.
+
+Package: libdecor-0-dev
+Section: libdevel
+Architecture: any
+Depends:
+ libdecor-0-0 (= ${binary:Version}),
+ libwayland-dev,
+ ${misc:Depends},
+Conflicts:
+ libdecor-dev,
+Replaces:
+ libdecor-dev,
+Multi-Arch: same
+Description: client-side window decoration library - development files
+ libdecor is a library that can help Wayland clients draw window
+ decorations for them. It aims to provide multiple backends that implements the
+ decoration drawing.
+ .
+ This package contains development files.
+
+Package: libdecor-0-plugin-1-cairo
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends:
+ ${misc:Pre-Depends},
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+Provides:
+ libdecor-0-plugin-1,
+Conflicts:
+ libdecor-plugin-cairo,
+Replaces:
+ libdecor-plugin-cairo,
+Description: libdecor decoration plugin using Cairo
+ libdecor is a library that can help Wayland clients draw window
+ decorations for them. It aims to provide multiple backends that implements the
+ decoration drawing.
+ .
+ This package contains a backend that draws window decorations using Cairo.
+
+Package: libdecor-0-plugin-1-gtk
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends:
+ ${misc:Pre-Depends},
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+Provides:
+ default-libdecor-0-plugin-1,
+ libdecor-0-plugin-1,
+Conflicts:
+ libdecor-plugin-gtk,
+Replaces:
+ libdecor-plugin-gtk,
+Description: libdecor decoration plugin using GTK
+ libdecor is a library that can help Wayland clients draw window
+ decorations for them. It aims to provide multiple backends that implements the
+ decoration drawing.
+ .
+ This package contains a backend that draws window decorations using GTK.
+
+Package: libdecor-tests
+Build-Profiles: <!noinsttest>
+Section: misc
+Architecture: any
+Pre-Depends:
+ ${misc:Pre-Depends},
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+Description: manual tests for libdecor
+ libdecor is a library that can help Wayland clients draw window
+ decorations for them. It aims to provide multiple backends that implements the
+ decoration drawing.
+ .
+ This package contains manual test programs. Automated tests might be added
+ to this package in future versions.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..bbadaf9
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,57 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: libdecor
+Source: https://gitlab.freedesktop.org/libdecor/libdecor
+
+Files:     *
+Copyright: 2010 Intel Corporation
+           2011 Benjamin Franzke
+           2017-2018 Red Hat Inc.
+           2018-2019 Jonas Ådahl
+           2019-2021 Christian Rauch
+License:   Expat
+
+Files:     src/plugins/common/libdecor-cairo-blur.*
+Copyright: 2008 Kristian Høgsberg
+           2012 Intel Corporation
+License:   Expat
+
+Files:     debian/*
+Copyright: 2021 Christian Rauch
+License:   Expat
+
+Files:     debian/tests/run-with-display
+Copyright: 2021 Marco Trevisan
+License:   GPL-3.0+
+
+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.
+
+License: GPL-3.0+
+ SPDX license expression "GPL-3.0-or-later":
+ https://spdx.org/licenses/GPL-3.0-or-later.html
+ .
+ This license identifier refers to the choice to use code under
+ GPL-3.0-or-later (i.e., GPL-3.0 or some later version), as distinguished
+ from use of code under GPL-3.0-only. The license notice (as seen in the
+ Standard License Header field below) states which of these applies the
+ code in the file. The example in the exhibit to the license shows the
+ license notice for the "or later" approach.
+ .
+ On Debian systems, the complete text of the GNU General Public License
+ version 3 can be found in "/usr/share/common-licenses/GPL-3.0".
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..18988af
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,5 @@
+[DEFAULT]
+pristine-tar = True
+debian-branch = debian/latest
+upstream-branch = upstream/latest
+upstream-vcs-tag = %(version)s
diff --git a/debian/libdecor-0-0.install b/debian/libdecor-0-0.install
new file mode 100644
index 0000000..1c2c5a9
--- /dev/null
+++ b/debian/libdecor-0-0.install
@@ -0,0 +1,2 @@
+usr/lib/*/libdecor-0.so.0
+usr/lib/*/libdecor-0.so.0.*
diff --git a/debian/libdecor-0-0.symbols.in b/debian/libdecor-0-0.symbols.in
new file mode 100644
index 0000000..200f647
--- /dev/null
+++ b/debian/libdecor-0-0.symbols.in
@@ -0,0 +1,63 @@
+libdecor-0.so.0 libdecor-0-0 #MINVER#
+| libdecor-0-0 (= ${DEB_VERSION})
+* Build-Depends-Package: libdecor-0-dev
+
+# Public symbols
+ libdecor_configuration_get_content_size at Base 0.1.0
+ libdecor_configuration_get_window_state at Base 0.1.0
+ libdecor_decorate at Base 0.1.0
+ libdecor_dispatch at Base 0.1.0
+ libdecor_frame_close at Base 0.1.0
+ libdecor_frame_commit at Base 0.1.0
+ libdecor_frame_get_max_content_size at Base 0.1.1
+ libdecor_frame_get_min_content_size at Base 0.1.1
+ libdecor_frame_get_title at Base 0.1.0
+ libdecor_frame_get_xdg_surface at Base 0.1.0
+ libdecor_frame_get_xdg_toplevel at Base 0.1.0
+ libdecor_frame_has_capability at Base 0.1.0
+ libdecor_frame_is_floating at Base 0.1.0
+ libdecor_frame_is_visible at Base 0.1.0
+ libdecor_frame_map at Base 0.1.0
+ libdecor_frame_move at Base 0.1.0
+ libdecor_frame_popup_grab at Base 0.1.0
+ libdecor_frame_popup_ungrab at Base 0.1.0
+ libdecor_frame_ref at Base 0.1.0
+ libdecor_frame_resize at Base 0.1.0
+ libdecor_frame_set_app_id at Base 0.1.0
+ libdecor_frame_set_capabilities at Base 0.1.0
+ libdecor_frame_set_fullscreen at Base 0.1.0
+ libdecor_frame_set_max_content_size at Base 0.1.0
+ libdecor_frame_set_maximized at Base 0.1.0
+ libdecor_frame_set_min_content_size at Base 0.1.0
+ libdecor_frame_set_minimized at Base 0.1.0
+ libdecor_frame_set_parent at Base 0.1.0
+ libdecor_frame_set_title at Base 0.1.0
+ libdecor_frame_set_visibility at Base 0.1.0
+ libdecor_frame_show_window_menu at Base 0.1.0
+ libdecor_frame_translate_coordinate at Base 0.1.0
+ libdecor_frame_unref at Base 0.1.0
+ libdecor_frame_unset_capabilities at Base 0.1.0
+ libdecor_frame_unset_fullscreen at Base 0.1.0
+ libdecor_frame_unset_maximized at Base 0.1.0
+ libdecor_get_fd at Base 0.1.0
+ libdecor_new at Base 0.1.0
+ libdecor_state_free at Base 0.1.0
+ libdecor_state_new at Base 0.1.0
+ libdecor_unref at Base 0.1.0
+
+# Private symbols
+ libdecor_frame_dismiss_popup at Base 0 1
+ libdecor_frame_get_capabilities at Base 0 1
+ libdecor_frame_get_content_height at Base 0 1
+ libdecor_frame_get_content_width at Base 0 1
+ libdecor_frame_get_window_state at Base 0 1
+ libdecor_frame_get_wl_surface at Base 0 1
+ libdecor_frame_toplevel_commit at Base 0 1
+ libdecor_get_wl_display at Base 0 1
+ libdecor_notify_plugin_error at Base 0 1
+ libdecor_notify_plugin_ready at Base 0 1
+ libdecor_plugin_init at Base 0 1
+ libdecor_plugin_release at Base 0 1
+ libdecor_state_get_content_height at Base 0 1
+ libdecor_state_get_content_width at Base 0 1
+ libdecor_state_get_window_state at Base 0 1
diff --git a/debian/libdecor-0-dev.install b/debian/libdecor-0-dev.install
new file mode 100644
index 0000000..a9697a2
--- /dev/null
+++ b/debian/libdecor-0-dev.install
@@ -0,0 +1,3 @@
+usr/include/libdecor-0/libdecor.h
+usr/lib/*/libdecor-0.so
+usr/lib/*/pkgconfig/libdecor-0.pc
diff --git a/debian/libdecor-0-plugin-1-cairo.install b/debian/libdecor-0-plugin-1-cairo.install
new file mode 100644
index 0000000..0c98a6f
--- /dev/null
+++ b/debian/libdecor-0-plugin-1-cairo.install
@@ -0,0 +1 @@
+usr/lib/*/libdecor/plugins-1/libdecor-cairo.so
diff --git a/debian/libdecor-0-plugin-1-gtk.install b/debian/libdecor-0-plugin-1-gtk.install
new file mode 100644
index 0000000..9b2fb80
--- /dev/null
+++ b/debian/libdecor-0-plugin-1-gtk.install
@@ -0,0 +1 @@
+usr/lib/*/libdecor/plugins-1/libdecor-gtk.so
diff --git a/debian/libdecor-tests.install b/debian/libdecor-tests.install
new file mode 100644
index 0000000..ab0ffdf
--- /dev/null
+++ b/debian/libdecor-tests.install
@@ -0,0 +1,3 @@
+usr/bin/libdecor-c++-demo
+usr/bin/libdecor-demo
+usr/bin/libdecor-egl
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..66ee1c3
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,39 @@
+#!/usr/bin/make -f
+#export DH_VERBOSE = 1
+#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
+
+include /usr/share/dpkg/default.mk
+
+lib = libdecor-0-0
+
+%:
+	dh $@
+
+debian/$(lib).symbols: debian/$(lib).symbols.in
+	sed -e 's/[$$]{DEB_VERSION}/${DEB_VERSION}/g' \
+		< $< > $@
+
+built_binaries := $(shell dh_listpackages)
+configure_options =
+
+ifneq ($(filter libdecor-tests,$(built_binaries)),)
+configure_options += -Ddemo=true
+configure_options += -Dinstall_demo=true
+else
+configure_options += -Ddemo=false
+endif
+
+override_dh_auto_configure:
+	dh_auto_configure -- $(configure_options)
+
+ifeq ($(DEB_DISTRIBUTION),UNRELEASED)
+# We can't expect the symbols file to be fully up to date for a snapshot,
+# so only fail if we broke ABI. This overrides the -c4 below.
+export DPKG_GENSYMBOLS_CHECK_LEVEL = 1
+endif
+
+override_dh_makeshlibs: debian/$(lib).symbols
+	dh_makeshlibs -- -c4
diff --git a/debian/shlibs.local b/debian/shlibs.local
new file mode 100644
index 0000000..44d5f37
--- /dev/null
+++ b/debian/shlibs.local
@@ -0,0 +1 @@
+libdecor-0 0 libdecor-0-0 (= ${binary:Version})
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..f5d7e80
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,11 @@
+Tests: libdecor-0-dev
+Restrictions: allow-stderr, build-needed, superficial
+Depends:
+ build-essential,
+ libdbus-1-dev,
+ libdecor-0-dev,
+ libwayland-dev,
+ libxkbcommon-dev,
+ pkg-config,
+ wayland-protocols,
+ weston,
diff --git a/debian/tests/libdecor-0-dev b/debian/tests/libdecor-0-dev
new file mode 100755
index 0000000..2e0ec46
--- /dev/null
+++ b/debian/tests/libdecor-0-dev
@@ -0,0 +1,50 @@
+#!/bin/sh
+# Copyright 2020-2022 Collabora Ltd.
+# Copyright 2021 Christian Rauch.
+# SPDX-License-Identifier: MIT
+
+set -eux
+
+if [ -n "${AUTOPKGTEST_ARTIFACTS-}" ]; then
+    WORKDIR="$AUTOPKGTEST_ARTIFACTS"
+else
+    WORKDIR="$(mktemp -d)"
+    trap 'cd /; rm -fr "$WORKDIR"' 0 INT QUIT ABRT PIPE TERM
+fi
+
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+else
+    CROSS_COMPILE=
+fi
+
+srcdir="$(pwd)"
+cp obj-*/config.h "$WORKDIR"
+cp demo/demo.c "$WORKDIR"
+cp src/cursor-settings.h "$WORKDIR"
+cp src/cursor-settings.c "$WORKDIR"
+cp src/os-compatibility.c "$WORKDIR"
+cp src/os-compatibility.h "$WORKDIR"
+cp src/utils.h "$WORKDIR"
+wayland-scanner client-header /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml "$WORKDIR/xdg-shell-client-protocol.h"
+wayland-scanner private-code /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml "$WORKDIR/xdg-shell-protocol.c"
+cd "$WORKDIR"
+
+"${CROSS_COMPILE}gcc" \
+    -D_GNU_SOURCE \
+    cursor-settings.c \
+    demo.c \
+    os-compatibility.c \
+    xdg-shell-protocol.c \
+    -o test \
+    $("${CROSS_COMPILE}pkg-config" \
+        --cflags \
+        --libs \
+        dbus-1 \
+        libdecor-0 \
+        wayland-client \
+        wayland-cursor \
+        xkbcommon \
+    )
+"$srcdir/debian/tests/run-with-display" wayland \
+./test --timed-quit
diff --git a/debian/tests/run-with-display b/debian/tests/run-with-display
new file mode 100755
index 0000000..0391e60
--- /dev/null
+++ b/debian/tests/run-with-display
@@ -0,0 +1,67 @@
+#!/bin/sh
+# vim:set sw=4 sts=4 et:
+#
+# Run a wrapped command in a fake display environment
+#
+# Copyright 2021 Marco Trevisan <marco at ubuntu.com>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# Assume a Debian Policy §10.4-compatible shell like dash or bash (with the
+# 'local' builtin)
+# shellcheck disable=SC2039
+
+set -e
+
+me="$(basename "$0")"
+
+usage () {
+    local status="${1-2}"
+
+    if [ "$status" -ne 0 ]; then
+        exec >&2
+    fi
+
+    echo "Usage: $me [wayland|x11] COMMAND [ARGS...]"
+    exit "$status"
+}
+
+display="$1"
+
+case "$display" in
+    wayland)
+        shift
+        if [ -z "$XDG_RUNTIME_DIR" ]; then
+            our_xrd="$(mktemp -d -t xdg-runtime-XXXXXXXX)"
+            export XDG_RUNTIME_DIR="$our_xrd"
+        fi
+        if ! command -v weston > /dev/null; then
+            echo "No weston available"
+            exit 1
+        fi
+        socket="wayland-$(od -vAn -N1 -tu1 < /dev/urandom | tr -d '[:space:]')"
+        weston --backend=headless-backend.so --socket="$socket" --idle-time=0 2>&1 &
+        weston_pid=$!
+        trap 'kill $weston_pid; [ -n $our_xrd ] && rm -rfv $our_xrd' EXIT INT
+        while [ ! -S "$XDG_RUNTIME_DIR/$socket" ]; do
+            echo "Waiting for socket..."
+            sleep 1
+        done
+        env -u DISPLAY WAYLAND_DISPLAY="$XDG_RUNTIME_DIR/$socket" "$@"
+        exit $?
+    ;;
+    x11)
+        shift
+        if ! command -v xvfb-run > /dev/null; then
+            echo "No xvfb-run available"
+            exit 1
+        fi
+        exec env -u WAYLAND_DISPLAY xvfb-run -a -s "-screen 0 1024x768x24 -noreset" "$@"
+    ;;
+    -h|--help|help)
+        usage 0
+        ;;
+    *)
+        usage 2
+        ;;
+esac
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..1518358
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,5 @@
+---
+Bug-Database: https://gitlab.freedesktop.org/libdecor/libdecor/-/issues
+Bug-Submit: https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/new
+Repository: https://gitlab.freedesktop.org/libdecor/libdecor.git
+Repository-Browse: https://gitlab.freedesktop.org/libdecor/libdecor
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..7842415
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+opts="filenamemangle=s%(?:.*?)?(\d[\d.]*)\.tar\.gz%@PACKAGE at -$1.tar.gz%" \
+https://gitlab.freedesktop.org/libdecor/libdecor/-/tags \
+archive/[0-9.]+/libdecor- at ANY_VERSION@\.tar\.gz


More information about the Neon-commits mailing list