From 7585105fdd8275af241676597cbe9fe4a1e39974 Mon Sep 17 00:00:00 2001 From: "bart@bartbes.ath.cx" Date: Tue, 29 Dec 2009 16:38:20 +0100 Subject: [PATCH] Fixed the build system and debs now provide icons and file associations --- configure.in | 2 +- platform/unix/love.desktop | 9 +++++++++ platform/unix/make-package | 12 +++++++----- platform/unix/postinst | 5 +++++ platform/unix/{mimescript => postrm} | 0 5 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 platform/unix/love.desktop create mode 100755 platform/unix/postinst rename platform/unix/{mimescript => postrm} (100%) diff --git a/configure.in b/configure.in index a339cdac7..3212256fe 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -AC_INIT([love], [20091130-aab90c59bf10]) +AC_INIT([love], [20091206-d0384a4c71f6]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([platform/unix]) AC_CONFIG_MACRO_DIR([platform/unix/m4]) diff --git a/platform/unix/love.desktop b/platform/unix/love.desktop new file mode 100644 index 000000000..797aecf42 --- /dev/null +++ b/platform/unix/love.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=LÖVE +Comment=The unquestionably awesome 2D game engine +MimeType=application/love-game; +Exec=/usr/bin/love +Type=Application +Categories=Development;Game; +Terminal=false +Icon=love.svg diff --git a/platform/unix/make-package b/platform/unix/make-package index 072211d0e..d31bf34d8 100755 --- a/platform/unix/make-package +++ b/platform/unix/make-package @@ -23,10 +23,10 @@ case "$1" in mkdir deb/DEBIAN cat debian | sed "s/%VERSION%/$2/" | sed "s/%ARCHITECTURE%/$arch/g" > deb/DEBIAN/tmp cat deb/DEBIAN/tmp - sed "s/%INSTALLSIZE%/`ls -l ../../src/love | awk '{ sum += $5 } END { printf "%.2f", sum / 1000 }'`/" < deb/DEBIAN/tmp > deb/DEBIAN/control + sed "s/%INSTALLSIZE%/`ls -l ../../src/love | awk '{ sum += $5 } END { printf "%.2f", sum / 1000 }'`/" < deb/DEBIAN/tmp > deb/DEBIAN/control rm deb/DEBIAN/tmp - cp mimescript deb/DEBIAN/postinst - cp mimescript deb/DEBIAN/postrm + cp postinst deb/DEBIAN/postinst + cp postrm deb/DEBIAN/postrm mkdir deb/usr mkdir deb/usr/bin cp ../../src/love deb/usr/bin/love @@ -39,8 +39,10 @@ case "$1" in mkdir deb/usr/share/icons/gnome/scalable mkdir deb/usr/share/icons/gnome/scalable/apps cp app.svg deb/usr/share/icons/gnome/scalable/apps/love.svg - mkdir deb/usr/share/icons/gnome/mimetypes - cp game.svg deb/usr/share/icons/gnome/mimetypes/gnome-mime-application-love-game.svg + mkdir deb/usr/share/icons/gnome/scalable/mimetypes + cp game.svg deb/usr/share/icons/gnome/scalable/mimetypes/gnome-mime-application-love-game.svg + mkdir deb/usr/share/applications + cp love.desktop deb/usr/share/applications dpkg -b deb love-$2.deb && \ echo " * love-$2.deb created" rm -rf deb diff --git a/platform/unix/postinst b/platform/unix/postinst new file mode 100755 index 000000000..c257caf78 --- /dev/null +++ b/platform/unix/postinst @@ -0,0 +1,5 @@ +#!/bin/sh + +update-mime-database /usr/share/mime +gtk-update-icon-cache --force /usr/share/icons/gnome +xdg-mime default love.desktop application/love-game diff --git a/platform/unix/mimescript b/platform/unix/postrm similarity index 100% rename from platform/unix/mimescript rename to platform/unix/postrm