mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-27 16:02:55 +02:00
dwarffortress: update to 51.11, adopt.
This commit is contained in:
parent
2bf48fb1a6
commit
7aa3de73a5
2 changed files with 48 additions and 29 deletions
|
@ -1,26 +1,29 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
## dwarf fortress wrapper written and maintained by
|
## dwarf fortress wrapper written and maintained by
|
||||||
# Robert Stancil <robert.stancil@mavs.uta.edu>
|
# Robert Stancil <robert.stancil@mavs.uta.edu>
|
||||||
#
|
#
|
||||||
# MIT License
|
# MIT License
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 Robert Stancil <robert.stancil@mavs.uta.edu>
|
# Copyright (c) 2019 Robert Stancil <robert.stancil@mavs.uta.edu>
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Modified by: Rutpiv <roger_freitas@live.com> in 2024 to adjust symlink
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# creation and preserve existing save data by backing up old directories.
|
||||||
# in the Software without restriction, including without limitation the rights
|
#
|
||||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# copies of the Software, and to permit persons to whom the Software is
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
# furnished to do so, subject to the following conditions:
|
# furnished to do so, subject to the following conditions:
|
||||||
#
|
#
|
||||||
# The above copyright notice and this permission notice (including the next
|
# The above copyright notice and this permission notice (including the next
|
||||||
# paragraph) shall be included in all copies or substantial portions of the Software.
|
# paragraph) shall be included in all copies or substantial portions of the Software.
|
||||||
#
|
#
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
##
|
##
|
||||||
|
|
||||||
|
@ -48,6 +51,22 @@ if [ -z ${XDG_DATA_HOME:-$HOME/.local/share} ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if an existing 'dwarffortress' directory with the old structure is found.
|
||||||
|
# If found, create a backup of the directory before removing it.
|
||||||
|
# The backup is stored as a tar.gz archive with a timestamp to prevent overwriting.
|
||||||
|
if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress" ] &&
|
||||||
|
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress/df" ]; then
|
||||||
|
echo "Existing old 'dwarffortress' directory found. Creating a backup..."
|
||||||
|
|
||||||
|
timestamp=$(date +%Y%m%d%H%M%S)
|
||||||
|
backup_file="${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress_backup_${timestamp}.tar.gz"
|
||||||
|
tar -czf "$backup_file" -C "${XDG_DATA_HOME:-$HOME/.local/share}" dwarffortress
|
||||||
|
echo "Backup created at $backup_file"
|
||||||
|
|
||||||
|
rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress"
|
||||||
|
echo "Old 'dwarffortress' directory removed."
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d ${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress ]; then
|
if [ ! -d ${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress ]; then
|
||||||
_FORCE=yes
|
_FORCE=yes
|
||||||
fi
|
fi
|
||||||
|
@ -55,7 +74,10 @@ if [ $_FORCE ]
|
||||||
then
|
then
|
||||||
rm -rf ${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress
|
rm -rf ${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress
|
||||||
cp /usr/share/dwarffortress ${XDG_DATA_HOME:-$HOME/.local/share} -r
|
cp /usr/share/dwarffortress ${XDG_DATA_HOME:-$HOME/.local/share} -r
|
||||||
ln -s /usr/lib/dwarffortress/libs ${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress/
|
for lib in /usr/lib/dwarffortress/libs/*; do
|
||||||
|
ln -s "$lib" "${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress/"
|
||||||
|
done
|
||||||
|
ln -s /usr/bin/dwarfort ${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress/df
|
${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress/run_df
|
||||||
|
|
|
@ -1,33 +1,30 @@
|
||||||
# Template file for 'dwarffortress'
|
# Template file for 'dwarffortress'
|
||||||
pkgname=dwarffortress
|
pkgname=dwarffortress
|
||||||
version=0.47.05
|
version=51.11
|
||||||
revision=2
|
revision=1
|
||||||
_urlver=${version#*.}
|
_urlver=${version//./_}
|
||||||
archs="x86_64"
|
archs="x86_64"
|
||||||
depends="gtk+ SDL SDL_ttf SDL_image virtual?libGL glu"
|
depends="gtk+ SDL SDL_ttf SDL_image virtual?libGL glu"
|
||||||
short_desc="Control a dwarven outpost in a randomly generated world"
|
short_desc="Control a dwarven outpost in a randomly generated world"
|
||||||
maintainer="Robert Stancil <robert.stancil@mavs.uta.edu>"
|
maintainer="Rutpiv <roger_freitas@live.com>"
|
||||||
license="custom: Proprietary"
|
license="custom: Proprietary"
|
||||||
homepage="http://www.bay12games.com/dwarves/"
|
homepage="https://www.bay12games.com/dwarves/"
|
||||||
distfiles="http://www.bay12games.com/dwarves/df_${_urlver//./_}_linux.tar.bz2"
|
distfiles="https://www.bay12games.com/dwarves/df_${_urlver}_linux.tar.bz2"
|
||||||
checksum=ac74a6dbb7d7d9621f430405080322ab50c35f6632352ff2ea923f6dc5affca3
|
checksum=e75730205326e5cc126978e3869cf8a52dc3f01e7f32de7e93500bbb517e2567
|
||||||
|
|
||||||
nostrip_files="Dwarf_Fortress"
|
nostrip_files="Dwarf_Fortress"
|
||||||
nopie="distfiles are precompiled as PIE"
|
nopie="distfiles are precompiled as PIE"
|
||||||
repository=nonfree
|
repository=nonfree
|
||||||
noshlibprovides=yes
|
noshlibprovides=yes
|
||||||
|
|
||||||
post_extract() {
|
|
||||||
rm libs/libstdc++.so.6
|
|
||||||
rm libs/libgcc_s.so.1
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
vbin ${FILESDIR}/dwarffortress
|
vbin ${FILESDIR}/dwarffortress
|
||||||
|
vbin dwarfort
|
||||||
|
rm dwarfort
|
||||||
vmkdir /usr/share/dwarffortress
|
vmkdir /usr/share/dwarffortress
|
||||||
vmkdir /usr/lib/dwarffortress/libs
|
vmkdir /usr/lib/dwarffortress/libs
|
||||||
vcopy "libs/*" /usr/lib/dwarffortress/libs
|
vcopy lib* /usr/lib/dwarffortress/libs
|
||||||
rm -r libs
|
rm lib*
|
||||||
vcopy "*" /usr/share/dwarffortress/
|
vcopy * /usr/share/dwarffortress/
|
||||||
vlicense "readme.txt" dwarffortress.txt
|
vlicense "readme.txt" dwarffortress.txt
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue