generated from general-packages/pika-pkg-template
231992b00a
Some checks failed
PikaOS Package Build Only (Canary) (i386) / build (push) Failing after 16s
38 lines
1.2 KiB
Bash
38 lines
1.2 KiB
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# Alternatively this check can be disabled by preseeding:
|
|
# echo "wine/setcaps boolean false" | debconf-set-selections
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
case "$1" in
|
|
configure)
|
|
if command -v setcap > /dev/null; then
|
|
db_get wine/setcaps
|
|
|
|
# Allow dpkg-reconfigure to remove caps
|
|
if test "$RET" = "true"; then
|
|
if ! setcap "cap_net_raw=epi" /opt/wine-staging/bin/wine-preloader; then
|
|
echo "Setcap failed on /opt/wine-staging/bin/wine-preloader, applications that need to send/receive raw IP packets will not work" >&2
|
|
fi
|
|
else
|
|
# setcap -r fails if the xattr is not present
|
|
if getcap /opt/wine-staging/bin/wine-preloader | grep -qs "/opt/wine-staging/bin/wine-preloader"; then
|
|
if ! setcap "-r" /opt/wine-staging/bin/wine-preloader; then
|
|
echo "Setcap -r failed on /opt/wine-staging/bin/wine-preloader, could not remove capabilities" >&2
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
# generated by other debhelper scripts.
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|