59-libdvd-pkg 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. set -e
  3. set -u
  4. echo "Installing libdvd-pkg"
  5. apt-get --yes install libdvd-pkg
  6. dpkg-reconfigure libdvd-pkg
  7. # Create and install a fake libdvd-pkg package. This is necessary for
  8. # libdvdcss2 (the actual dvd decoding package) which depends on
  9. # libdvd-pkg. libdvd-pkg however depends on build-essential, which is
  10. # explicitly removed. So instead we build/install a fake libdvd-pkg
  11. # without the build-essential dependency to satisfy libdvdcss2.
  12. tmp="$(mktemp -d)"
  13. apt-get install --yes equivs
  14. LIBDVD_PKG_VERSION="$(dpkg-query -s libdvd-pkg | grep Version | cut -d ' ' -f2)+fake1"
  15. cat > "${tmp}/libdvd-pkg-${LIBDVD_PKG_VERSION}.control" << EOF
  16. Section: multimedia
  17. Priority: optional
  18. Homepage: https://tails.boum.org/
  19. Standards-Version: 3.6.2
  20. Package: libdvd-pkg
  21. Version: ${LIBDVD_PKG_VERSION}
  22. Maintainer: Tails developers <amnesia@boum.org>
  23. Architecture: all
  24. Description: (Fake) libdvd-pkg package
  25. Provide placeholder to keep libdvdcss2 happy.
  26. EOF
  27. (
  28. cd "${tmp}"
  29. equivs-build "libdvd-pkg-${LIBDVD_PKG_VERSION}.control"
  30. dpkg -i "libdvd-pkg_${LIBDVD_PKG_VERSION}_all.deb"
  31. )
  32. rm -r "${tmp}" /usr/src/libdvd-pkg
  33. # Verify installed packages:
  34. for x in libdvd-pkg
  35. do
  36. dpkg -s $x
  37. dpkg-query -W -f='${Version}\n' $x
  38. done
  39. # Remove dangling symlink -- note that we absolutely do not want the
  40. # functionality (automatic checks and upgrades for new css sources)
  41. # that the removed script provides.
  42. rm -f /etc/apt/apt.conf.d/88libdvdcss-pkg