Skip to content
Snippets Groups Projects
Commit 9e9c20de authored by Simon McVittie's avatar Simon McVittie
Browse files

Put symbolic links to dependencies in their own package


This avoids the need to Build-Conflict with the -helpers package,
which we want to install in the SDK image.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 67492336
No related branches found
No related tags found
1 merge request!88Fix CI failure in dpkg-shlibdeps
Pipeline #2089 passed
......@@ -23,7 +23,8 @@ Build-Depends:
Build-Depends-Indep:
libglib2.0-dev,
Build-Conflicts:
libsteam-runtime-tools-0-helpers,
libsteam-runtime-tools-0-helpers (<< 0.20191204.0~),
libsteam-runtime-tools-0-relocatable-libs,
Vcs-Git: https://gitlab.steamos.cloud/steam/steam-runtime-tools.git
Vcs-Browser: https://gitlab.steamos.cloud/steam/steam-runtime-tools
......@@ -89,6 +90,23 @@ Description:
This package contains helper tools used to examine the library stack
available for each architecture.
Package: libsteam-runtime-tools-0-relocatable-libs
Architecture: amd64 i386
Multi-Arch: same
Section: misc
Depends:
${misc:Depends},
${relocatable:Depends},
Description:
The Steam Runtime is the library stack used to run the Steam client
on Linux. The Steam Runtime Tools utility library contains open-source
supporting code used by the Steam client to discover system information.
.
This package contains symbolic links to libraries depended on by the
steam-runtime-system-info and libsteam-runtime-tools-0-helpers packages,
which make it possible to run those tools from an LD_LIBRARY_PATH-style
Steam Runtime even if the LD_LIBRARY_PATH is not correctly set.
Package: libsteam-runtime-tools-0-tests
Architecture: any
Section: misc
......
usr/lib/*/steam-runtime-tools-0/*
usr/libexec/steam-runtime-tools-0/*
......@@ -45,6 +45,7 @@ pkglibexecdir := $(libexecdir)/steam-runtime-tools-0
libdir := lib/$(DEB_HOST_MULTIARCH)
pkglibdir := $(libdir)/steam-runtime-tools-0
DESTDIR := $(CURDIR)/debian/tmp
relocatable_pkglibdir := $(CURDIR)/debian/libsteam-runtime-tools-0-relocatable-libs/usr/$(pkglibdir)
override_dh_auto_configure:
meson builddir \
......@@ -81,25 +82,37 @@ override_dh_auto_install:
ln -fnsv ../../steam-runtime-tools-0/$(DEB_HOST_MULTIARCH)-true "$$x"; \
fi; \
done
install -d $(DESTDIR)/usr/$(pkglibdir)
ln -fnsv ../libsteam-runtime-tools-0.so.0 $(DESTDIR)/usr/$(pkglibdir)/
override_dh_shlibdeps:
dh_shlibdeps \
-plibsteam-runtime-tools-0-relocatable-libs \
-- \
-prelocatable \
-e$(DESTDIR)/usr/bin/steam-runtime-system-info \
-e$(DESTDIR)/usr/$(pkglibexecdir)/$(DEB_HOST_MULTIARCH)-check-locale \
$(NULL)
dh_shlibdeps
override_dh_link:
dh_link
:
install -d $(relocatable_pkglibdir)
ln -fnsv ../libsteam-runtime-tools-0.so.0 $(relocatable_pkglibdir)
LD_LIBRARY_PATH='$(DESTDIR)/usr/$(libdir)' \
$(DEB_HOST_MULTIARCH)-capsule-capture-libs \
--container / \
--dest $(DESTDIR)/usr/$(pkglibdir) \
--dest $(relocatable_pkglibdir) \
--link-target / \
--no-glibc \
--provider / \
only-dependencies:path:$(DESTDIR)/usr/bin/steam-runtime-system-info \
only-dependencies:path:$(DESTDIR)/usr/$(pkglibexecdir)/$(DEB_HOST_MULTIARCH)-check-locale \
$(NULL)
override_dh_link:
dh_link
:
# Make the links in $(pkglibdir) relative. This is contrary
# to Debian policy, but is what we need for the LD_LIBRARY_PATH
# Steam Runtime, where GLib is in /lib.
set -e; for link in debian/libsteam-runtime-tools-0-helpers/usr/$(pkglibdir)/lib*; do \
set -e; for link in $(relocatable_pkglibdir)/lib*; do \
target="$$(readlink -v "$$link")"; \
echo "before: $$link -> $$target"; \
case "$$target" in \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment