[SCM] packaging for the mame arcade game emulator branch, master, updated. 16ce619f80cc067d0536c49823766eb5ec4e1ea2
Jordi Mallach
jordi at debian.org
Fri Apr 22 14:26:40 UTC 2011
The following commit has been merged in the master branch:
commit 16ce619f80cc067d0536c49823766eb5ec4e1ea2
Author: Jordi Mallach <jordi at debian.org>
Date: Fri Apr 22 16:25:25 2011 +0200
Revamp mame.ini handling, making it a proper conffile, and other small changes.
* Add a minimal mame.ini, only showing the default paths options and
other important options like "video" or "multithreading", and install
it as a proper conffile.
* Remove mame.postinst and mame.prerm, to stop generating a mame.ini
file on postinst, which was never being updated on upgrades.
* If the generated mame.ini in 0.141-1 or 0.141-2 is not modified,
remove mame.ini to avoid a dpkg conffile prompt.
* Autogenerate a mame.ini using mame -createconfig after the build is
done, and install it as an example.
* Change all uses of Conflicts to Breaks.
* Bump debhelper compat version to 8.
* Bump Standards-Version to 3.9.2 (no changes needed).
diff --git a/debian/changelog b/debian/changelog
index 31c4696..1dc5f63 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,18 @@ mame (0.141-3) UNRELEASED; urgency=low
* Set NOASM=1 globally, and unset for the targets that are known to have
a native ASM implementation (x86 and ppc). Builds for most other
Debian architectures will fail due to memory alignment issues, though.
+ * Add a minimal mame.ini, only showing the default paths options and
+ other important options like "video" or "multithreading", and install
+ it as a proper conffile.
+ * Remove mame.postinst and mame.prerm, to stop generating a mame.ini
+ file on postinst, which was never being updated on upgrades.
+ * If the generated mame.ini in 0.141-1 or 0.141-2 is not modified,
+ remove mame.ini to avoid a dpkg conffile prompt.
+ * Autogenerate a mame.ini using mame -createconfig after the build is
+ done, and install it as an example.
+ * Change all uses of Conflicts to Breaks.
+ * Bump debhelper compat version to 8.
+ * Bump Standards-Version to 3.9.2 (no changes needed).
-- Jordi Mallach <jordi at debian.org> Fri, 22 Apr 2011 13:32:48 +0200
diff --git a/debian/compat b/debian/compat
index 7f8f011..45a4fb7 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+8
diff --git a/debian/control b/debian/control
index c20c8a2..56a9fdc 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,8 @@ Section: non-free/games
Priority: optional
Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
Uploaders: Ludovic Lechapt <ludomatic at gmail.com>, Félix Arreola Rodríguez <fgatuno.123 at gmail.com>, Emmanuel Kasper <emmanuel at libera.cc>, Jordi Mallach <jordi at debian.org>
-Build-Depends: debhelper (>= 7.0.50~), libexpat1-dev, libsdl1.2-dev, zlib1g-dev, libxinerama-dev, libgconf2-dev, libgtk2.0-dev, libsdl-ttf2.0-dev
-Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 8), libexpat1-dev, libsdl1.2-dev, zlib1g-dev, libxinerama-dev, libgconf2-dev, libgtk2.0-dev, libsdl-ttf2.0-dev
+Standards-Version: 3.9.2
Vcs-Git: git://git.debian.org/pkg-games/mame.git
Vcs-Browser: http://git.debian.org/?p=pkg-games/mame.git
Homepage: http://mamedev.org/
@@ -16,7 +16,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}
Suggests: mame-tools
Provides: xmame-common, xmame-sdl, xmame-svga, xmame-x
Replaces: xmame-common (<< 0.140-1), xmame-sdl (<< 0.140-1), xmame-svga (<< 0.140-1), xmame-x (<< 0.140-1)
-Conflicts: xmame-common (<< 0.140-1), xmame-sdl (<< 0.140-1), xmame-svga (<< 0.140-1), xmame-x (<< 0.140-1)
+Breaks: xmame-common (<< 0.140-1), xmame-sdl (<< 0.140-1), xmame-svga (<< 0.140-1), xmame-x (<< 0.140-1)
Description: Multiple Arcade Machine Emulator (MAME)
MAME is a hardware emulator: it faithfully reproduces the behavior of many
arcade machines (it is not a simulation). This program is not a game but can
@@ -32,7 +32,7 @@ Section: non-free/utils
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: mame (= ${source:Version})
-Conflicts: xmame-tools (<< 0.140-1)
+Breaks: xmame-tools (<< 0.140-1)
Description: Tools for Multiple Arcade Machine Emulator (MAME)
MAME is a hardware emulator: it faithfully reproduces the behavior of many
arcade machines (it is not a simulation). This program is not a game but can
@@ -76,5 +76,3 @@ Architecture: all
Description: Transitional package for mame-tools
This is a transitional package for mame-tools, and can be safely removed
after the installation is complete.
-
-
diff --git a/debian/mame.examples b/debian/mame.examples
new file mode 100644
index 0000000..c80c000
--- /dev/null
+++ b/debian/mame.examples
@@ -0,0 +1 @@
+default.mame.ini
diff --git a/debian/mame.ini b/debian/mame.ini
new file mode 100644
index 0000000..b82aeaf
--- /dev/null
+++ b/debian/mame.ini
@@ -0,0 +1,34 @@
+# Default MAME configuration file for Debian
+# See /usr/share/doc/mame/examples/default.mame.ini
+# for an example file with all possible options.
+
+# Allow per-user mame.ini configuration files
+inipath $HOME/.mame;/etc/mame
+
+# Default data search paths
+rompath $HOME/mame/roms;/usr/share/games/mame/roms
+hashpath $HOME/mame/hash;/usr/share/games/mame/hash
+samplepath $HOME/mame/samples;/usr/share/games/mame/samples
+artpath $HOME/mame/artwork;/usr/share/games/mame/artwork
+ctrlrpath $HOME/mame/ctrlr;/usr/share/games/mame/ctrlr
+fontpath $HOME/mame/fonts;/usr/share/games/mame/fonts
+cheatpath $HOME/mame/cheat;/usr/share/games/mame/cheat
+crosshairpath $HOME/mame/crosshair;/usr/share/games/mame/crosshair
+
+# Default data output paths
+cfg_directory $HOME/.mame/cfg
+nvram_directory $HOME/.mame/nvram
+memcard_directory $HOME/.mame/memcard
+input_directory $HOME/.mame/inp
+state_directory $HOME/.mame/sta
+snapshot_directory $HOME/.mame/snap
+diff_directory $HOME/.mame/diff
+comment_directory $HOME/.mame/comments
+
+# Debian feature defaults
+# Set video to 'opengl' if DRI is enabled and reliable on your hardware
+video soft
+# Set multithreading to '1' if you have more than one core
+multithreading 0
+# Set joystick to 1 if you have a joystick available
+joystick 0
diff --git a/debian/mame.install b/debian/mame.install
index 3c1e1d3..cccbc80 100644
--- a/debian/mame.install
+++ b/debian/mame.install
@@ -1,6 +1,8 @@
-mame usr/games/
+mame usr/games
-src/osd/sdl/keymaps/* usr/share/games/mame/keymaps/
+src/osd/sdl/keymaps usr/share/games/mame/keymaps
-debian/install/mame.xpm usr/share/pixmaps/
-debian/install/mame.desktop usr/share/applications/
+debian/install/mame.xpm usr/share/pixmaps
+debian/install/mame.desktop usr/share/applications
+
+debian/mame.ini etc/mame/mame.ini
diff --git a/debian/mame.postinst b/debian/mame.postinst
deleted file mode 100644
index d0265ff..0000000
--- a/debian/mame.postinst
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-# postinst script for mame
-
-set -e
-
-# Load default debconf
-. /usr/share/debconf/confmodule
-
-INIPATH="/etc/mame"
-INIFILE="$INIPATH/mame.ini"
-
-if [ ! -e $INIFILE ]; then
- # creating a default mame.ini
- [ -w $INIPATH ] || mkdir $INIPATH
- cd $INIPATH
- /usr/games/mame -createconfig
- if [ ! -e "$INIFILE" ]; then
- echo "Error while creating default configuration file. Please create/edit file '$INIFILE' manually." >&2
- else
-
- # Explanation header for our generated mame.ini
- sed -i "1a \
-# This config file was generated at the first installation of the\
- mame package\n\
-# You can change settings in a personal \$HOME/.mame/mame.ini\n\
-# or here for all users" $INIFILE
-
- # Allow user defined profile in $HOME/.mame/mame.ini
- sed -i 's,/etc/mame$,$HOME/.mame;&,' $INIFILE
-
- # edit core search path options
- SYSTEM_PATH=/usr/share/games/mame
- for DIR in roms hash samples artwork ctrlr cheat crosshair ; do
- sed -i s," $DIR$",'$HOME'/mame/$DIR\;$SYSTEM_PATH/$DIR, $INIFILE
- done
-
- # edit core output directory options
- for DIR in cfg nvram memcard inp sta snap diff comments; do
- sed -i s," $DIR$",'$HOME/.mame/'$DIR, $INIFILE
- done
- fi
-else
- echo "An existing $INIFILE has been found, not re-creating"
-fi
-
-
-case "$1" in
- preconfigure|configure)
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/mame.postrm b/debian/mame.postrm
deleted file mode 100644
index e3c6604..0000000
--- a/debian/mame.postrm
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-# postrm script for mame
-
-set -e
-
-# List of dirs to delete on package purge
-CLEAN_REP=" \
-/usr/share/games/mame/artwork \
-/usr/share/games/mame/cheat \
-/usr/share/games/mame/crosshair \
-/usr/share/games/mame/ctrlr \
-/usr/share/games/mame/hash \
-/usr/share/games/mame/roms \
-/usr/share/games/mame/samples \
-/usr/share/games/mame \
-/etc/mame \
-"
-
-case "$1" in
- remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- # Passive removal, leave behind no empty directories
- for REP in $CLEAN_REP; do
- if [ -d "$REP" ]; then
- if [ -L "$REP" ]; then
- # It is a symlink! Symbolic link specific commands go here
- rm "$REP"
- else
- # It's a directory! Directory command goes here
- rmdir --ignore-fail-on-non-empty "$REP"
- fi
- fi
- done
- ;;
-
- purge)
- # Total removal, delete ALL created directories!
- for REP in $CLEAN_REP; do
- if [ -d $REP ] ; then
- rm -rf $REP
- fi
- done
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/mame.preinst b/debian/mame.preinst
new file mode 100644
index 0000000..5b522a0
--- /dev/null
+++ b/debian/mame.preinst
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+INI="/etc/mame/mame.ini"
+OLDMD5="7af600a8acb389a87ecff54b5bf53771 faf5639e834d50ef8067bf014aa43d96"
+
+# Avoid a dpkg prompt if mame.ini is what 0.141-2 generated in postinst
+if [ "$1" = "upgrade" -a -f "$INI" ]; then
+ if dpkg --compare-versions "$2" le "0.141-2"; then
+ curmd5="$(md5sum $INI | cut -d' ' -f 1)"
+ for md5sum in $OLDMD5; do
+ if [ "$curmd5" = "$md5sum" ]; then
+ echo rm -f $INI
+ break
+ fi
+ done
+ fi
+fi
+
+#DEBHELPER#
diff --git a/debian/rules b/debian/rules
index 5b400ba..cc00b92 100755
--- a/debian/rules
+++ b/debian/rules
@@ -93,6 +93,8 @@ endif
override_dh_auto_build:
$(MAKE) -j3 $(DEB_MAME_OPTS) all
+ $(CURDIR)/mame -createconfig
+ mv mame.ini default.mame.ini
# dh_installchangelogs doesn't know about whatsnew.txt,
# so we need to make an explicit call
--
packaging for the mame arcade game emulator
More information about the Pkg-games-commits
mailing list