From d7a7f2d5a2cd32527249dbeaf4f8bb0b9833fc8b Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Mon, 9 Jan 2023 23:32:15 +0100 Subject: Improve simutrans packaging approach - package simutrans itself without paksets - define union packages for simutrans + paksets - use new-style gexps for builders - extract auxiliary simutrans files (e.g. .desktop file) into separate files in the repo --- tw/packages/files/simutrans-paths.patch | 18 ++++++++++++++++++ tw/packages/files/simutrans.appdata.xml | 20 ++++++++++++++++++++ tw/packages/files/simutrans.desktop | 8 ++++++++ 3 files changed, 46 insertions(+) create mode 100644 tw/packages/files/simutrans-paths.patch create mode 100644 tw/packages/files/simutrans.appdata.xml create mode 100644 tw/packages/files/simutrans.desktop (limited to 'tw/packages/files') diff --git a/tw/packages/files/simutrans-paths.patch b/tw/packages/files/simutrans-paths.patch new file mode 100644 index 00000000..bfc0db4a --- /dev/null +++ b/tw/packages/files/simutrans-paths.patch @@ -0,0 +1,18 @@ +This patch stores user-specific config in $XDG_CONFIG_HOME/simutrans +rather than ~/simutrans. + +--- a/sys/simsys.cc 2022-09-25 01:36:18.951636483 +0200 ++++ b/sys/simsys.cc 2022-09-25 01:36:44.615457050 +0200 +@@ -395,7 +395,11 @@ + #elif defined __ANDROID__ + tstrncpy(buffer,SDL_GetPrefPath("Simutrans Team","simutrans"),lengthof(buffer)); + #else +- sprintf(buffer, "%s/simutrans", getenv("HOME")); ++ if (getenv("XDG_CONFIG_HOME") == NULL) { ++ sprintf(buffer, "%s/.config/simutrans", getenv("HOME")); ++ } else { ++ sprintf(buffer, "%s/simutrans", getenv("XDG_CONFIG_HOME")); ++ } + #endif + + // create directory and subdirectories diff --git a/tw/packages/files/simutrans.appdata.xml b/tw/packages/files/simutrans.appdata.xml new file mode 100644 index 00000000..a286817b --- /dev/null +++ b/tw/packages/files/simutrans.appdata.xml @@ -0,0 +1,20 @@ + + + com.simutrans.simutrans + simutrans.desktop + Simutrans + Transportation simulator + CC0-1.0 + Artistic-1.0 + +

Simutrans is a free transportation simulator: the player operates a transportation company and has to transport goods and passengers between factories and different cities.

+
+ + + + https://www.simutrans.com/images/smsc/2016-05.png + + + https://forum.simutrans.com/index.php?board=8.0 + https://www.simutrans.com/ +
diff --git a/tw/packages/files/simutrans.desktop b/tw/packages/files/simutrans.desktop new file mode 100644 index 00000000..ed9c200f --- /dev/null +++ b/tw/packages/files/simutrans.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Simutrans +Comment=Transportation simulator +Exec=simutrans +Icon=simutrans +Terminal=false +Type=Application +Categories=Game;Simulation; -- cgit v1.2.3