diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | How to add files and paksets.md | 20 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | path-for-game-data.patch | 28 | ||||
-rw-r--r-- | settings-folder.patch | 11 | ||||
-rw-r--r-- | simutrans.desktop | 9 |
7 files changed, 12 insertions, 118 deletions
@@ -1,6 +1,6 @@ pkgbase = simutrans-svn pkgdesc = Transportation simulation game - Nightly build from SVN - pkgver = r10119 + pkgver = r11169 pkgrel = 1 url = https://www.simutrans.com/ arch = any @@ -8,7 +8,6 @@ pkgbase = simutrans-svn makedepends = subversion makedepends = pkgconf makedepends = cmake - makedepends = make depends = gcc-libs depends = zstd depends = zlib @@ -17,6 +16,7 @@ pkgbase = simutrans-svn depends = freetype2 depends = miniupnpc depends = fluidsynth + depends = fontconfig optdepends = soundfont-fluid: Default MIDI soundfont for music optdepends = soundfont-realfont: Alternative higher quality MIDI soundfont optdepends = simutrans-pak32.comic: Lowest resolution graphics set for Simutrans @@ -39,14 +39,6 @@ pkgbase = simutrans-svn optdepends = simutrans-pak192.comic: Highest resolution graphics set for Simutrans conflicts = simutrans source = simutrans-svn::svn+svn://servers.simutrans.org/simutrans/trunk - source = settings-folder.patch - source = path-for-game-data.patch - source = simutrans.desktop - source = How to add files and paksets.md sha256sums = SKIP - sha256sums = 671398550f46525ef0dae338d9e1984bfc0e1ec36153e1c4163c8c35de240c7e - sha256sums = cb9fda1a99d0b54f316ba5ea5b90ec658641f9a9d3b77faf981525e12ff99188 - sha256sums = 99545152f5e739b7eb028152383fa10d3e3d303c99167e1c6e5a6bd7dcd00fa3 - sha256sums = 52a00091a71e250205adcb3ef8b86b560a5c27429ec700c5e5242f58184d90ab pkgname = simutrans-svn diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..a767cafbbd86 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +* diff --git a/How to add files and paksets.md b/How to add files and paksets.md deleted file mode 100644 index 15f10f3a0385..000000000000 --- a/How to add files and paksets.md +++ /dev/null @@ -1,20 +0,0 @@ -# Preserving your game configuration - -To preserve your game config you need to copy `/usr/share/games/simutrans/config/simuconf.tab` to `~/.config/simutrans/simuconf.tab`. Otherwise, the original simuconf.tab file will be **overwrited** with every update. - -Additionally, you can also add non-pakset files (fonts, music, etc) in `~/.config/simutrans` - -# Adding files in the user data directory (~/.local/share/simutrans) - -Files in this directory are symlinked from `/usr/share/games/simutrans` (shared Simutrans Standard installation) - -This means that paksets installed system-wide for Simutrans Standard are available here. - -Adding paksets to this directory is the only way for non-root users to add paksets. You can also add non-pakset files (fonts, music, etc). - -Symlinked files are updated everytime you open the game, so: - -1. Don't worry about deleting symlinks by accident. -2. New paksets installed will be picked up automatically. - -But please **don't replace symlinked files in this directory**. You will lose your replaced files when you open Simutrans! Instead, if you want, for example, to install another version of "pak64" rename it to "pak64-myversion". @@ -1,14 +1,14 @@ # Maintainer: Roboron <robertoms258 at gmail dot com> pkgname=simutrans-svn -pkgver=r10119 +pkgver=r11169 pkgrel=1 pkgdesc="Transportation simulation game - Nightly build from SVN" arch=('any') url="https://www.simutrans.com/" license=('custom:Artistic') -depends=('gcc-libs' 'zstd' 'zlib' 'sdl2' 'hicolor-icon-theme' 'freetype2' 'miniupnpc' 'fluidsynth') -makedepends=('subversion' 'pkgconf' 'cmake' 'make') +depends=('gcc-libs' 'zstd' 'zlib' 'sdl2' 'hicolor-icon-theme' 'freetype2' 'miniupnpc' 'fluidsynth' 'fontconfig') +makedepends=('subversion' 'pkgconf' 'cmake') optdepends=('soundfont-fluid: Default MIDI soundfont for music' 'soundfont-realfont: Alternative higher quality MIDI soundfont' 'simutrans-pak32.comic: Lowest resolution graphics set for Simutrans' @@ -31,49 +31,18 @@ optdepends=('soundfont-fluid: Default MIDI soundfont for music' 'simutrans-pak192.comic: Highest resolution graphics set for Simutrans') conflicts=('simutrans') -source=($pkgname::svn+svn://servers.simutrans.org/simutrans/trunk - settings-folder.patch - path-for-game-data.patch - simutrans.desktop - "How to add files and paksets.md") -sha256sums=('SKIP' - '671398550f46525ef0dae338d9e1984bfc0e1ec36153e1c4163c8c35de240c7e' - 'cb9fda1a99d0b54f316ba5ea5b90ec658641f9a9d3b77faf981525e12ff99188' - '99545152f5e739b7eb028152383fa10d3e3d303c99167e1c6e5a6bd7dcd00fa3' - '52a00091a71e250205adcb3ef8b86b560a5c27429ec700c5e5242f58184d90ab') - -prepare() { - cd $pkgname - - # Adjust paths - patch -Np0 -i ../settings-folder.patch - patch -Np0 -i ../path-for-game-data.patch -} +source=($pkgname::svn+svn://servers.simutrans.org/simutrans/trunk) +sha256sums=('SKIP') build() { - cd $pkgname - sh ./get_lang_files.sh - mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=Release .. - cmake --build . + cmake -S $pkgname -B build + cmake build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr" -DUSE_GAMES_DATADIR=1 + cmake --build build -j$(nproc) } package() { - #binary - install -Dm755 $pkgname/build/simutrans/simutrans "$pkgdir/usr/bin/simutrans" - - #data - mkdir -p "$pkgdir/usr/share/games/simutrans" - cp -r $pkgname/simutrans/* "$pkgdir/usr/share/games/simutrans" - cp -r "How to add files and paksets.md" "$pkgdir/usr/share/games/simutrans" - - #desktop file and icon - install -Dm644 $pkgname/simutrans.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/simutrans.svg" - install -Dm644 simutrans.desktop "$pkgdir/usr/share/applications/simutrans.desktop" - - #license + DESTDIR="$pkgdir" cmake --install build install -Dm644 $pkgname/simutrans/license.txt "$pkgdir/usr/share/licenses/simutrans/license.txt" - } pkgver() { diff --git a/path-for-game-data.patch b/path-for-game-data.patch deleted file mode 100644 index 2c2ecdc236f2..000000000000 --- a/path-for-game-data.patch +++ /dev/null @@ -1,28 +0,0 @@ -Index: simmain.cc -=================================================================== ---- simmain.cc (revisiĆ³n: 9320) -+++ simmain.cc (copia de trabajo) -@@ -428,6 +428,11 @@ - - env_t::init(); - -+ // Make simutrans re-symlinks the files when opened -+#ifdef __linux__ -+ system("\cp -rs --remove-destination /usr/share/games/simutrans/ ~/.local/share/"); -+#endif -+ - // you really want help with this? - if (gimme_arg(argc, argv, "-h", 0) || - gimme_arg(argc, argv, "-?", 0) || -@@ -515,8 +520,9 @@ - strcat( env_t::data_dir, PATH_SEPARATOR ); - } - else { -- strcpy( env_t::data_dir, argv[0] ); -- *(strrchr( env_t::data_dir, PATH_SEPARATOR[0] )+1) = 0; -+ static char buffer[100]; -+ sprintf(buffer, "%s/.local/share/simutrans/", getenv("HOME")); -+ strcpy(env_t::data_dir, buffer); - - #ifdef __APPLE__ - // change working directory from binary dir to bundle dir diff --git a/settings-folder.patch b/settings-folder.patch deleted file mode 100644 index 7bb1dfdd9ab3..000000000000 --- a/settings-folder.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- sys/simsys.cc.orig 2020-05-03 15:03:19.524104943 +0200 -+++ sys/simsys.cc 2020-05-03 15:07:19.544913395 +0200 -@@ -362,7 +362,7 @@ - find_directory(B_USER_DIRECTORY, &userDir); - sprintf(buffer, "%s/simutrans", userDir.Path()); - #else -- sprintf(buffer, "%s/simutrans", getenv("HOME")); -+ sprintf(buffer, "%s/.config/simutrans", getenv("HOME")); - #endif - - // create directory and subdirectories diff --git a/simutrans.desktop b/simutrans.desktop deleted file mode 100644 index e8d8660c87f0..000000000000 --- a/simutrans.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=Simutrans -Comment=Transportation simulator -Exec=simutrans -Icon=simutrans -Terminal=false -Type=Application -Categories=Game;Simulation; - |