diff -u kaffeine-0.8.6/debian/kaffeine_xine-install-ffmpeg.desktop kaffeine-0.8.6/debian/kaffeine_xine-install-ffmpeg.desktop --- kaffeine-0.8.6/debian/kaffeine_xine-install-ffmpeg.desktop +++ kaffeine-0.8.6/debian/kaffeine_xine-install-ffmpeg.desktop @@ -6,3 +6,3 @@ X-KDE-Kaffeine-engine=xine-engine -Exec=/usr/lib/kaffeine/install-codecs +Exec=/usr/lib/kaffeine/install-codecs ffmpeg reverted: --- kaffeine-0.8.6/debian/install-css.sh +++ kaffeine-0.8.6.orig/debian/install-css.sh @@ -1,46 +0,0 @@ -#!/bin/sh - -set -e - -site=http://www.dtek.chalmers.se/groups/dvd/deb/ -arch=`dpkg --print-installation-architecture` - -soname=2 -uversion=1.2.5 -available="alpha amd64 hppa i386 ia64 powerpc s390 sparc" -version=${uversion}-1 - -if [ ! -e /usr/bin/wget ] -then - echo "Install wget and run this script again" - exit 1 -fi - -for a in $available; do - if [ "$a" = "$arch" ]; then - wget ${site}libdvdcss${soname}_${version}_${arch}.deb -O /tmp/libdvdcss.deb - dpkg -i /tmp/libdvdcss.deb - exit $? - fi -done - -echo "No binary deb available. Will try to build and install it." -echo "You need to have debhelper, dpkg-dev and fakeroot installed." -echo "If not, interrupt now, install them and rerun this script." -echo "" -echo "This is higly experimental, look out for what happens below." -echo "If you want to stop, interrupt now (control-c), else press" -echo "return to proceed" -read dum - -mkdir -p /tmp/dvd -cd /tmp/dvd -wget ${site}libdvdcss_${uversion}.orig.tar.gz -wget ${site}libdvdcss_${version}.diff.gz -wget ${site}libdvdcss_${version}.dsc -dpkg-source -x libdvdcss_${version}.dsc -cd libdvdcss-${uversion} -fakeroot ./debian/rules binary -echo "Any problems? Interrupt now (control-c) and try to fix" -echo "manually, else go on and install (return)." -dpkg -i ../libdvdcss${soname}_${version}_${arch}.deb diff -u kaffeine-0.8.6/debian/rules kaffeine-0.8.6/debian/rules --- kaffeine-0.8.6/debian/rules +++ kaffeine-0.8.6/debian/rules @@ -13,7 +13,6 @@ install/kaffeine:: install -D -p -m0644 debian/kaffeine.xpm debian/kaffeine/usr/share/pixmaps/kaffeine.xpm install -D -p -m0644 debian/kaffeine.lintian-overrides debian/kaffeine/usr/share/lintian/overrides/kaffeine - install -D -p -m0755 debian/install-css.sh debian/kaffeine/usr/share/doc/kaffeine/install-css.sh install -D -p -m0644 debian/kaffeine-iso.desktop debian/kaffeine/usr/share/applications/kde/kaffeine-iso.desktop #Kubuntu additions diff -u kaffeine-0.8.6/debian/kaffeine_xine-install-dvdcss.desktop kaffeine-0.8.6/debian/kaffeine_xine-install-dvdcss.desktop --- kaffeine-0.8.6/debian/kaffeine_xine-install-dvdcss.desktop +++ kaffeine-0.8.6/debian/kaffeine_xine-install-dvdcss.desktop @@ -6,3 +6,3 @@ X-KDE-Kaffeine-engine=xine-engine -Exec=/usr/lib/kaffeine/install-codecs +Exec=/usr/lib/kaffeine/install-codecs dvdcss diff -u kaffeine-0.8.6/debian/changelog kaffeine-0.8.6/debian/changelog --- kaffeine-0.8.6/debian/changelog +++ kaffeine-0.8.6/debian/changelog @@ -1,3 +1,10 @@ +kaffeine (0.8.6-0ubuntu5) hardy; urgency=low + + * Refactor install-codecs script + * Implement libdvdcss installing + + -- Sergey Rudchenko Tue, 26 Feb 2008 19:03:36 +0200 + kaffeine (0.8.6-0ubuntu4) hardy; urgency=low * Adapt install-codecs script to dash shell syntax diff -u kaffeine-0.8.6/debian/control kaffeine-0.8.6/debian/control --- kaffeine-0.8.6/debian/control +++ kaffeine-0.8.6/debian/control @@ -15,6 +15,7 @@ Depends: ${shlibs:Depends}, hdparm Conflicts: kaffeine-xine Replaces: kaffeine-xine +Recommends: kdesudo gdebi-kde Description: versatile media player for KDE Kaffeine is a media player for KDE. While it supports multiple player engines, its default engine is Xine, giving Kaffeine a wide variety of @@ -31,6 +32,7 @@ Architecture: any Priority: extra Depends: kaffeine (= ${binary:Version}), kdelibs-dbg +Recommends: kdesudo gdebi-kde Description: debugging symbols for kaffeine This package contains the debugging symbols associated with kaffeine. They will automatically be used by gdb for debugging kaffeine-related diff -u kaffeine-0.8.6/debian/install-codecs kaffeine-0.8.6/debian/install-codecs --- kaffeine-0.8.6/debian/install-codecs +++ kaffeine-0.8.6/debian/install-codecs @@ -1,45 +1,48 @@ -CODECS_INSTALL_FAILURE="There was an error installing codecs. You need to install the package \"libxine1-ffmpeg\" manually." +#!/bin/sh -check_codecs() { - if [ $? -eq 0 ]; then - dcop kaffeine KaffeineIface reloadEngine - dcop kaffeine KaffeineIface play - exit 0 - - else - if [ -x /usr/bin/kdialog ]; then - kdialog --msgbox "$CODECS_INSTALL_FAILURE" - elif [ -x /usr/bin/zenity ]; then - zenity --info --text "$CODECS_INSTALL_FAILURE" - else - Xdialog --msgbox "$CODECS_INSTALL_FAILURE" 10 60 - fi - exit 1 - fi +pkg_installed() { + PKG_SELECTION=`dpkg --get-selections $1 | cut -f6` + if [ "$PKG_SELECTION" = install ]; then + return 1 + fi + return 0 } -INSTALLED=`dpkg --get-selections libxine1-ffmpeg | grep install` -RELEASE=`lsb_release -sc` +# Main -#dcop kaffeine kaffeine-mainwindow#1 setEnabled false -kdialog --title "Codec not found" --caption "Kaffeine" --yesno "Kaffeine does not have a codec installed to play this file. Do you want to install the codecs?" +if [ "$1" = ffmpeg ]; then + LIBXINE_FFMPEG="libxine1-ffmpeg" - -if [ $? -eq 1 ]; then - exit 1 -fi - -#is available, not installed -if [ -z "$INSTALLED" ]; then - if [ -x /usr/bin/kdesu ] && [ -x /usr/bin/adept_batch ]; then - kdesu -d bash -c "adept_batch update; adept_batch install libxine1-ffmpeg" - elif [ -x /usr/bin/gksudo ] && [ -x /usr/sbin/synaptic ]; then - gksudo bash -c 'apt-get update && echo libxine1-ffmpeg i | synaptic --set-selections --non-interactive' - else - xterm -e 'sudo apt-get update && sudo apt-get install libxine1-ffmpeg' + pkg_installed $LIBXINE_FFMPEG + if [ $? -ne 0 ]; then + # if libxine-ffmpeg is already installed, but we can't play ffmpeg + # something wrong is going on. + exit 1 + fi + + kdialog --title "Codec not found" --caption "Kaffeine" --yesno "Kaffeine does not have a codec installed to play this file. Do you want to install the codecs?" + if [ $? -ne 0 ]; then + exit 1 + fi + + kdesu -d "bash -c \"adept_batch install $LIBXINE_FFMPEG\"" + if [ $? -ne 0 ]; then + kdialog --msgbox "Failed to install ffmpeg codecs. Try to install package $LIBXINE_FFMPEG manually." + exit 1 + fi + + dcop kaffeine KaffeineIface reloadEngine + dcop kaffeine KaffeineIface play + exit 0 + +elif [ "$1" = dvdcss ]; then + kdialog --warningyesno "LEGAL TEXT" + if [ $? -ne 0 ]; then + exit 1 fi - check_codecs -fi -exit 0 + DISTRO_ARCH=`dpkg --print-installation-architecture` + LIBDVDCSS_URL="http://kubuntu.org/~jriddell/tmp/packages/libdvdcss-$DISTRO_ARCH.deb" + kdesu -d "kioexec \"gdebi-kde -n\" $LIBDVDCSS_URL" +fi