summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-hooks/59-libdvd-pkg
blob: 3c1d835b153d63020dd9fd1afbe1e8e145da4457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
set -e
set -u

echo "Installing libdvd-pkg"

# Import install_fake_package
. /usr/local/lib/tails-shell-library/build.sh

apt-get --yes install libdvd-pkg
dpkg-reconfigure libdvd-pkg

# Create and install a fake libdvd-pkg package. This is necessary for
# libdvdcss2 (the actual dvd decoding package) which depends on
# libdvd-pkg. libdvd-pkg however depends on build-essential, which is
# explicitly removed. So instead we build/install a fake libdvd-pkg
# without the build-essential dependency to satisfy libdvdcss2.
LIBDVD_PKG_VERSION="$(dpkg-query -s libdvd-pkg | grep Version | cut -d ' ' -f2)+fake1"
install_fake_package libdvd-pkg "${LIBDVD_PKG_VERSION}" multimedia
rm -r /usr/src/libdvd-pkg

# Verify installed packages:
for x in libdvd-pkg
do
    dpkg -s $x
    dpkg-query -W -f='${Version}\n' $x
done

# Remove dangling symlink -- note that we absolutely do not want the
# functionality (automatic checks and upgrades for new css sources)
# that the removed script provides.
rm -f /etc/apt/apt.conf.d/88libdvdcss-pkg