diff options
author | B. Watson <yalhcru@gmail.com> | 2014-08-26 12:19:19 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-08-30 14:22:21 +0700 |
commit | 3114a6842f0ec052e496a4843853cfd31f8e9408 (patch) | |
tree | a40872bb13155c8e37246457f0c95f8d57794183 /games/hatari | |
parent | 4ee8ba718a99985e27acfe8bc3610058af3fb3b8 (diff) |
games/hatari: Updated for version 1.8.0.
Better desktop integration, script cleanups
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'games/hatari')
-rw-r--r-- | games/hatari/README | 22 | ||||
-rw-r--r-- | games/hatari/doinst.sh | 9 | ||||
-rw-r--r-- | games/hatari/hatari.SlackBuild | 55 | ||||
-rw-r--r-- | games/hatari/hatari.info | 6 | ||||
-rw-r--r-- | games/hatari/hatari.xml | 17 | ||||
-rw-r--r-- | games/hatari/hatariui.desktop | 13 |
6 files changed, 78 insertions, 44 deletions
diff --git a/games/hatari/README b/games/hatari/README index f221a6c6daaa..d6f981f135f1 100644 --- a/games/hatari/README +++ b/games/hatari/README @@ -9,21 +9,9 @@ environment for running GEM applications, Hatari tries to emulate the hardware of a ST as close as possible so that it is able to run most of the old ST games and demos. -Optional dependency: if portaudio is installed, hatari will be built -with it, which enables emulated Falcon microphone support. +Recommended dependency: hatari_tos_roms. hatari includes a free +replacement called EmuTOS, but most users will want to install the real +ROM images. Most ST software won't work without hatari_tos_roms. -Before you can actually run the emulator, you also need a TOS image -file. TOS is the built-in operating system of the Atari 16/32 bit -computers. Since it is not possible to ship one of these image files -with Hatari, you either have to create your own image from your Atari -or you have to use EmuTOS, a free TOS replacement. - -It's also possible to download the ROM images from the net. See -the package hatari_tos_roms. If you're going to install the ROMs, -it's easiest to install hatari first, then hatari_tos_roms (otherwise, -you'll have to manually symlink /usr/share/hatari/tos.img to whichever -ROM you want to use). - -EmuTOS is included in this package, so you can run at least some ST -applications without installing the real ROMs, but not many programs -work with EmuTOS (especially not games). +Optional dependency: portaudio. Only used for emulated Falcon microphone +support. Autotetected by the SlackBuild. diff --git a/games/hatari/doinst.sh b/games/hatari/doinst.sh index 3e5691a052b5..ae52932a11ad 100644 --- a/games/hatari/doinst.sh +++ b/games/hatari/doinst.sh @@ -1,3 +1,7 @@ +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi @@ -7,3 +11,8 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 fi fi + +# if there's no tos.img symlink, take over with emutos.img +if [ ! -r usr/share/hatari/tos.img ]; then + ( cd usr/share/hatari ; ln -sf emutos.img tos.img ) +fi diff --git a/games/hatari/hatari.SlackBuild b/games/hatari/hatari.SlackBuild index 4493887f1bb5..2b073f6fe5bb 100644 --- a/games/hatari/hatari.SlackBuild +++ b/games/hatari/hatari.SlackBuild @@ -6,8 +6,16 @@ # Licensed under the WTFPL. See http://sam.zoy.org/wtfpl/ for details. +# 20140825 bkw: +# - updated for v1.8.0 +# - install docs/manpages to right places, instead of moving after the fact +# - get rid of the need for a symlink /usr/doc/hatari +# - only symlink emutos.img -> tos.img if no link already exists, so +# reinstalling the package won't reset the default ROM. +# - add mime type and auto-associate ST disk images and executables. + PRGNAM=hatari -VERSION=${VERSION-1.7.0} +VERSION=${VERSION-1.8.0} BUILD=${BUILD-1} TAG=${TAG-_SBo} @@ -37,45 +45,44 @@ fi set -e rm -rf $PKG $TMP/$PRGNAM-$VERSION -mkdir -p $PKG $PKG/install $PKG/etc/$PRGNAM - -# configure script is really a wrapper for cmake, doesn't support -# --libdir, --mandir, --docdir. We'll just move everything where it -# goes after the 'make install'. (If there were shared libs to deal -# with, this likely wouldn't be good enough) +mkdir -p $PKG $PKG/etc/$PRGNAM cd $TMP tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION + +# configure script is really a wrapper for cmake, doesn't support +# --libdir, --mandir, --docdir. cheat a little. +sed -i \ + -e 's,share/man/man1,man/man1,' \ + -e "s,share/doc/$PRGNAM,doc/$PRGNAM-$VERSION," \ + CMakeLists.txt + +# hard-code the doc path in the UI (we don't use /usr/share/doc/hatari) +sed -i \ + -e "/path *= *path *+/s,=.*,= \"/usr/doc/$PRGNAM-$VERSION/\"," \ + python-ui/uihelpers.py + ./configure --prefix=/usr make make install/strip DESTDIR=$PKG -# amazingly, the man pages are already gzipped (but in the wrong place) -mv $PKG/usr/share/man $PKG/usr/man - -# Also, the docs are in the wrong place: -WRONGDOCDIR=$PKG/usr/share/doc/$PRGNAM DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION - -mkdir -p $DOCDIR -mv $WRONGDOCDIR/* $DOCDIR -rmdir $WRONGDOCDIR - -# However, the doc location is hardcoded in the UI. This works -# because /usr/share/doc is really a symlink to /usr/doc on Slackware. -ln -s $PRGNAM-$VERSION $PKG/usr/doc/$PRGNAM - cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$PRGNAM.SlackBuild # these docs don't get installed for some reason: cp tools/hmsa/readme-hmsa.txt readme.txt gpl.txt $DOCDIR -# Make sure hatariui shows up in desktop menu: -echo 'Categories=Game;Emulator;' >> $PKG/usr/share/applications/${PRGNAM}ui.desktop +# Replace .desktop with modified one, auto-associates ST disks/executables. +cat $CWD/${PRGNAM}ui.desktop > $PKG/usr/share/applications/${PRGNAM}ui.desktop + +# Custom MIME types for ST disk images and executables, by script author. +mkdir -p $PKG/usr/share/mime/packages +cat $CWD/$PRGNAM.xml > $PKG/usr/share/mime/packages/$PRGNAM.xml -( cd $PKG/usr/share/$PRGNAM && mv tos.img emutos.img && ln -s emutos.img tos.img ) +# Don't symlink emutos to tos here, do it conditionally in doinst.sh. +( cd $PKG/usr/share/$PRGNAM && mv tos.img emutos.img ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/games/hatari/hatari.info b/games/hatari/hatari.info index 3053e4c62534..c3708e1e317f 100644 --- a/games/hatari/hatari.info +++ b/games/hatari/hatari.info @@ -1,8 +1,8 @@ PRGNAM="hatari" -VERSION="1.7.0" +VERSION="1.8.0" HOMEPAGE="http://hatari.tuxfamily.org/" -DOWNLOAD="http://download.tuxfamily.org/hatari/1.7.0/hatari-1.7.0.tar.bz2" -MD5SUM="67b16ec0a0994aa6a935b193254118e0" +DOWNLOAD="http://download.tuxfamily.org/hatari/1.8.0/hatari-1.8.0.tar.bz2" +MD5SUM="f78cf673debbbe2d523415ab605550e1" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/games/hatari/hatari.xml b/games/hatari/hatari.xml new file mode 100644 index 000000000000..15660d0d7337 --- /dev/null +++ b/games/hatari/hatari.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="application/x-atari-st-disk-image"> + <comment>Atari ST Disk Image</comment> + <glob pattern="*.st.gz"/> + <glob pattern="*.st"/> + <glob pattern="*.msa.gz"/> + <glob pattern="*.msa"/> + <generic-icon name="hatari-icon" /> + </mime-type> + <mime-type type="application/x-atari-st-executable"> + <comment>Atari ST Executable</comment> + <glob pattern="*.prg"/> + <glob pattern="*.ttp"/> + <generic-icon name="hatari-icon" /> + </mime-type> +</mime-info> diff --git a/games/hatari/hatariui.desktop b/games/hatari/hatariui.desktop new file mode 100644 index 000000000000..d7003de04ffb --- /dev/null +++ b/games/hatari/hatariui.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Hatari UI +Exec=hatariui %f +Icon=hatari-icon +Categories=Game;Emulator; +Actions=Boot; +MimeType=application/x-atari-st-disk-image;application/x-atari-st-executable; + +[Desktop Action Boot] +Name=Boot +Exec=hatariui %f |