Move glshim to private directory

This commit is contained in:
zador-blood-stained 2016-10-06 20:29:29 +03:00
parent 500d03eda1
commit 1cb27b034c
5 changed files with 1 additions and 83 deletions

View File

@ -1,14 +0,0 @@
#!/bin/sh
DISTRIBUTION="${distribution}"
case "$1" in
configure)
[ "Ubuntu" = "$DISTRIBUTION" ] && update-alternatives --force --install /etc/ld.so.conf.d/${DEB_HOST_MULTIARCH}_GL.conf \
${DEB_HOST_MULTIARCH}_gl_conf /usr/lib/${DEB_HOST_MULTIARCH}/${private_dir}/ld.so.conf 600
LDCONFIG_NOTRIGGER=y ldconfig
esac
#DEBHELPER#
exit 0

View File

@ -1,18 +0,0 @@
#!/bin/sh
DISTRIBUTION="${distribution}"
DIVERT_TARGETS="libGL.so libGL.so.1 libGL.so.1.2.0"
if [ remove = "$1" -o abort-install = "$1" ] && [ "Debian" = "$DISTRIBUTION" ]; then
for f in $DIVERT_TARGETS; do
dpkg-divert --package libglshim1 --remove --rename \
--divert /usr/lib/${DEB_HOST_MULTIARCH}/libglshim-divert/${f} /usr/lib/${DEB_HOST_MULTIARCH}/${f}
done
rm -rf /usr/lib/${DEB_HOST_MULTIARCH}/libglshim-divert
LDCONFIG_NOTRIGGER=y ldconfig
fi
#DEBHELPER#
exit 0

View File

@ -1,18 +0,0 @@
#!/bin/sh
DISTRIBUTION="${distribution}"
DIVERT_TARGETS="libGL.so libGL.so.1 libGL.so.1.2.0"
if [ "Debian" = "$DISTRIBUTION" ]; then
mkdir -p /usr/lib/${DEB_HOST_MULTIARCH}/libglshim-divert
for f in $DIVERT_TARGETS; do
dpkg-divert --package libglshim1 --add --rename \
--divert /usr/lib/${DEB_HOST_MULTIARCH}/libglshim-divert/${f} /usr/lib/${DEB_HOST_MULTIARCH}/${f}
done
LDCONFIG_NOTRIGGER=y ldconfig
fi
#DEBHELPER#
exit 0

View File

@ -1,13 +0,0 @@
#!/bin/sh
DISTRIBUTION="${distribution}"
case "$1" in
remove)
[ "Ubuntu" = "$DISTRIBUTION" ] && update-alternatives --remove ${DEB_HOST_MULTIARCH}_gl_conf /usr/lib/${DEB_HOST_MULTIARCH}/${private_dir}/ld.so.conf
LDCONFIG_NOTRIGGER=y ldconfig
esac
#DEBHELPER#
exit 0

View File

@ -7,26 +7,10 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS=hardening=-all,+format,+stackprotector,+pie
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
DEB_HOST_DISTRIBUTION = Ubuntu
else
DEB_HOST_DISTRIBUTION = Debian
endif
ifeq ($(DEB_HOST_DISTRIBUTION), Ubuntu)
private_dir = glshim
else
private_dir =
endif
private_dir = glshim
override_dh_auto_configure:
for file in debian/*.in; \
do \
sed -e"s,\$${DEB_HOST_MULTIARCH},$(DEB_HOST_MULTIARCH),g" \
-e"s,\$${private_dir},${private_dir},g" \
-e"s,\$${distribution},${DEB_HOST_DISTRIBUTION},g" \
$${file} > $${file%%.in}; \
done
dh_auto_configure -- -DCMAKE_VERBOSE_MAKEFILE=OFF -DPRIVATEDIR=$(private_dir)
override_dh_auto_build:
@ -34,9 +18,6 @@ override_dh_auto_build:
override_dh_install:
dh_install
ifeq ($(DEB_HOST_DISTRIBUTION), Ubuntu)
echo "/usr/lib/$(DEB_HOST_MULTIARCH)/$(private_dir)" > $(CURDIR)/debian/libglshim1/usr/lib/$(DEB_HOST_MULTIARCH)/$(private_dir)/ld.so.conf
endif
override_dh_strip: