Merge branch 'debian-unstable' of git.debian.org:/git/pkg-xorg/xsfbs into debian-unstable
This commit is contained in:
commit
93b7223f95
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if ! [ -d debian/prune ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "x$1" != x--upstream-version ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version="$2"
|
||||
filename="$3"
|
||||
|
||||
if [ -z "$version" ] || ! [ -f "$filename" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dir="$(pwd)"
|
||||
tempdir="$(mktemp -d)"
|
||||
|
||||
cd "$tempdir"
|
||||
tar xf "$dir/$filename"
|
||||
cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done
|
||||
|
||||
tar czf "$dir/$filename" *
|
||||
cd "$dir"
|
||||
rm -rf "$tempdir"
|
||||
echo "Done pruning upstream tarball"
|
||||
|
||||
exit 0
|
|
@ -719,72 +719,6 @@ run () {
|
|||
fi
|
||||
}
|
||||
|
||||
register_x_lib_dir_with_ld_so () {
|
||||
# syntax: register_x_lib_dir_with_ld_so
|
||||
#
|
||||
# Configure the dynamic loader ld.so to search /usr/X11R6/lib for shared
|
||||
# libraries.
|
||||
#
|
||||
# Call this function from the postinst script of a package that places a
|
||||
# shared library in /usr/X11R6/lib, before invoking ldconfig.
|
||||
|
||||
local dir ldsoconf
|
||||
|
||||
dir="/usr/X11R6/lib"
|
||||
ldsoconf="/etc/ld.so.conf"
|
||||
|
||||
# is the line not already present?
|
||||
if ! fgrep -qsx "$dir" "$ldsoconf"; then
|
||||
observe "adding $dir directory to $ldsoconf"
|
||||
echo "$dir" >> "$ldsoconf"
|
||||
fi
|
||||
}
|
||||
|
||||
deregister_x_lib_dir_with_ld_so () {
|
||||
# syntax: deregister_x_lib_dir_with_ld_so
|
||||
#
|
||||
# Configure dynamic loader ld.so to not search /usr/X11R6/lib for shared
|
||||
# libraries, if and only if no shared libaries remain there.
|
||||
#
|
||||
# Call this function from the postrm script of a package that places a shared
|
||||
# library in /usr/X11R6/lib, in the event "$1" is "remove", and before
|
||||
# invoking ldconfig.
|
||||
|
||||
local dir ldsoconf fgrep_status cmp_status
|
||||
|
||||
dir="/usr/X11R6/lib"
|
||||
ldsoconf="/etc/ld.so.conf"
|
||||
|
||||
# is the line present?
|
||||
if fgrep -qsx "$dir" "$ldsoconf"; then
|
||||
# are there any shared objects in the directory?
|
||||
if [ "$(echo "$dir"/lib*.so.*.*)" = "$dir/lib*.so.*.*" ]; then
|
||||
# glob expansion produced nothing, so no shared libraries are present
|
||||
observe "removing $dir directory from $ldsoconf"
|
||||
# rewrite the file (very carefully)
|
||||
set +e
|
||||
fgrep -svx "$dir" "$ldsoconf" > "$ldsoconf.dpkg-tmp"
|
||||
fgrep_status=$?
|
||||
set -e
|
||||
case $fgrep_status in
|
||||
0|1) ;; # we don't actually care if any lines matched or not
|
||||
*) die "error reading \"$ldsoconf\"; fgrep exited with status" \
|
||||
"$fgrep_status" ;;
|
||||
esac
|
||||
set +e
|
||||
cmp -s "$ldsoconf.dpkg-tmp" "$ldsoconf"
|
||||
cmp_status=$?
|
||||
set -e
|
||||
case $cmp_status in
|
||||
0) rm "$ldsoconf.dpkg-tmp" ;; # files are identical
|
||||
1) mv "$ldsoconf.dpkg-tmp" "$ldsoconf" ;; # files differ
|
||||
*) die "error comparing \"$ldsoconf.dpkg-tmp\" to \"$ldsoconf\";" \
|
||||
"cmp exited with status $cmp_status" ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
make_symlink_sane () {
|
||||
# syntax: make_symlink_sane symlink target
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue