From a3aa187d11e1cd6952954026b754848f1e860ebc Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Thu, 2 Dec 2010 20:50:02 +0000 Subject: Desktop menu plus icons added, fixed lib64, install --- dolphin-emu/build/dolphin-emu.SlackBuild | 50 +++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 14 deletions(-) (limited to 'dolphin-emu') diff --git a/dolphin-emu/build/dolphin-emu.SlackBuild b/dolphin-emu/build/dolphin-emu.SlackBuild index 73933998..2952a193 100755 --- a/dolphin-emu/build/dolphin-emu.SlackBuild +++ b/dolphin-emu/build/dolphin-emu.SlackBuild @@ -28,7 +28,7 @@ # For: dolphin-emu # Descr: Gamecube and Wii emulator # URL: http://www.dolphin-emulator.com/ -# Needs: nvidia-cg-toolkit, wxGTK +# Needs: scons (build-time only); ffmpeg,nvidia-cg-toolkit,wxGTK # Changelog: # r6496-1: 30/Nov/2010 by Eric Hameleers # * Initial build. @@ -182,23 +182,38 @@ cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." tar -xvf ${SOURCE} cd ${PRGNAM}-${VERSION} + +# Use standard ibrary path: +sed -i -e "s#lib/dolphin#lib${LIBDIRSUFFIX}/dolphin#g" SConstruct + chown -R root:root . chmod -R u+w,go+r-w,a+X-s . echo Building ... -mkdir -p build -cd build - cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DMAN_INSTALL_DIR=/usr/man \ - -DSYSCONF_INSTALL_DIR=/etc \ - -DLIB_SUFFIX=${LIBDIRSUFFIX} \ - .. - make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log - make DESTDIR=$PKG install 2>&1 | tee $OUTPUT/install-${PRGNAM}.log -cd - +scons prefix=/usr 2>&1 | tee $OUTPUT/make-${PRGNAM}.log +scons prefix=/usr install=global destdir=$PKG install 2>&1 | tee $OUTPUT/install-${PRGNAM}.log + +# Add a desktop menu plus icons: +mkdir -p $PKG/usr/share/pixmaps +convert $SRCDIR/${PRGNAM}.png -resize 64x64 $PKG/usr/share/pixmaps/${PRGNAM}.png +for res in 16 32 48 64 128 256; do + mkdir -p $PKG/usr/share/icons/hicolor/${res}x${res}/apps + convert $SRCDIR/${PRGNAM}.png -resize ${res}x${res} \ + $PKG/usr/share/icons/hicolor/${res}x${res}/apps/${PRGNAM}.png +done +cat < $PKG/usr/share/applications/${PRGNAM}.desktop +[Desktop Entry] +Version=1.0 +Type=Application +Name=Dolphin Exmulator +Categories=Game;Emulator;GTK; +GenericName=GameCube and Wii Emulator +Comment=An emulator for the GameCube and Wii consoles +Exec=dolphin-emu +Icon=${PRGNAM} +StartupNotify=false +Name[en_US]=Dolphin Emulator +EOT # Add this to the doinst.sh: ! [ -d $PKG/install ] && mkdir -p $PKG/install @@ -227,6 +242,13 @@ if [ -x usr/bin/update-desktop-database ]; then chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1 fi +# Update the icon cache if needed: +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x usr/bin/gtk-update-icon-cache ]; then + chroot . /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi + # Update the mime database: if [ -x usr/bin/update-mime-database ]; then chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 -- cgit v1.2.3-79-gdb01