From 4aa1eb7b279c1fe607c09575b12e3a0dece6012d Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 30 May 2009 20:11:29 +0000 Subject: Add a menu entry --- testdisk/build/testdisk.SlackBuild | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/testdisk/build/testdisk.SlackBuild b/testdisk/build/testdisk.SlackBuild index f5575690..8aca0874 100755 --- a/testdisk/build/testdisk.SlackBuild +++ b/testdisk/build/testdisk.SlackBuild @@ -193,6 +193,34 @@ if [ -d $PKG/usr/info ]; then gzip -9f $PKG/usr/info/*.info* fi +if [ "${USEQT}" = "--enable-qt" ]; then + # Add an icon plus desktop entry: + mkdir -p $PKG/usr/share/{applications,pixmaps} + cp -a $SRCDIR/testdisk.png + cat < $PKG/usr/share/applications/testdisk.desktop +[Desktop Entry] +Name=Testdisk +Comment=Data recovery +Exec=testdisk +Icon=/usr/share/pixmaps/testdisk.png +Terminal=false +Type=Application +Categories=Application;Utility; +Encoding=UTF-8 +EOT + + # Add this to the doinst.sh: + mkdir -p $PKG/install + cat <> $PKG/install/doinst.sh + +# Update the desktop database: +if [ -x usr/bin/update-desktop-database ]; then + chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1 +fi +EOT + +fi + # Strip binaries: find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -- cgit v1.2.3-65-gdbad