#! /bin/sh -e
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p1 ${patch_opts} < $0;;
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@
--- vlc.orig/share/osdmenu/default.cfg
+++ vlc/share/osdmenu/default.cfg
@@ -1,4 +1,4 @@
-dir share/osdmenu/default
+dir /usr/share/vlc/osdmenu/default
 action	key-play-pause (0,0)
 	unselect unselected.png
 	select   selection/play_pause.png
--- vlc.orig/share/osdmenu/dvd.cfg
+++ vlc/share/osdmenu/dvd.cfg
@@ -1,4 +1,4 @@
-dir share/osdmenu/dvd
+dir /usr/share/vlc/osdmenu/dvd
 action	key-play (0,0)
 	unselect unselect/barroff.png
 	select   selection/play.png
--- vlc.orig/modules/video_filter/osdmenu.c
+++ vlc/modules/video_filter/osdmenu.c
@@ -90,7 +90,7 @@
 #if defined( WIN32 ) || defined( UNDER_CE )
 #define OSD_DEFAULT_CFG "osdmenu/default.cfg"
 #else
-#define OSD_DEFAULT_CFG "share/osdmenu/default.cfg"
+#define OSD_DEFAULT_CFG "/usr/share/vlc/osdmenu/default.cfg"
 #endif
 
 #define OSD_UPDATE_MIN     0
