mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-03 11:22:56 +02:00
New Package: dwarffortress-0.4.12
closes #10798 Co-authored-by: maxice8 <thinkabit.ukim@gmail.com>
This commit is contained in:
parent
2cd8e066e8
commit
0466546809
2 changed files with 92 additions and 0 deletions
61
srcpkgs/dwarffortress/files/dwarffortress
Normal file
61
srcpkgs/dwarffortress/files/dwarffortress
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
#!/bin/sh
|
||||||
|
## dwarf fortress wrapper written and maintained by
|
||||||
|
# Robert Stancil <robert.stancil@mavs.uta.edu>
|
||||||
|
#
|
||||||
|
# MIT License
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 Robert Stancil <robert.stancil@mavs.uta.edu>
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# 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:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice (including the next
|
||||||
|
# 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
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# 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.
|
||||||
|
##
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
printf "Usage:\n %s [-f]\noptions:\n -f\tforce/recreate user's game data directory. <Warning: this will erase all save data>" "${0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
while getopts 'f' c
|
||||||
|
do
|
||||||
|
case $c in
|
||||||
|
f) _FORCE=yes ;;
|
||||||
|
*) usage ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $(id -u) -eq 0 ]; then
|
||||||
|
echo "Error, can't be run as root" >&2
|
||||||
|
usage
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z ${XDG_DATA_HOME:-$HOME/.local/share} ]; then
|
||||||
|
echo "homedir unset"
|
||||||
|
usage
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d ${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress ]; then
|
||||||
|
_FORCE=yes
|
||||||
|
fi
|
||||||
|
if [ $_FORCE ]
|
||||||
|
then
|
||||||
|
rm -rf ${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress
|
||||||
|
cp /usr/share/dwarffortress ${XDG_DATA_HOME:-$HOME/.local/share} -r
|
||||||
|
ln -s /usr/lib/dwarffortress/libs ${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress/
|
||||||
|
fi
|
||||||
|
|
||||||
|
${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress/df
|
31
srcpkgs/dwarffortress/template
Normal file
31
srcpkgs/dwarffortress/template
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# Template file for 'dwarffortress'
|
||||||
|
pkgname=dwarffortress
|
||||||
|
version=0.44.12
|
||||||
|
revision=1
|
||||||
|
_urlver=${version#*.}
|
||||||
|
archs="x86_64"
|
||||||
|
create_wrksrc=yes
|
||||||
|
depends="gtk+ SDL SDL_ttf SDL_image libGL glu"
|
||||||
|
short_desc="Control a dwarven outpost in a randomly generated world"
|
||||||
|
maintainer="Robert Stancil <robert.stancil@mavs.uta.edu>"
|
||||||
|
license="custom: Proprietary"
|
||||||
|
homepage="http://www.bay12games.com/dwarves/"
|
||||||
|
distfiles="http://www.bay12games.com/dwarves/df_${_urlver//./_}_linux.tar.bz2"
|
||||||
|
checksum=5a2d15730d21b41a68da09ce3c3b70c3e2a6fd15b95c6cbfb68578ed2d2db979
|
||||||
|
|
||||||
|
nopie="distfiles are precompiled as PIE"
|
||||||
|
repository=nonfree
|
||||||
|
restricted=yes
|
||||||
|
|
||||||
|
do_patch() {
|
||||||
|
vsed -i df_linux/df -e "s;./libs/Dwarf_Fortress;LD_PRELOAD=/usr/lib/libstdc++.so.6 ./libs/Dwarf_Fortress;"
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
vbin ${FILESDIR}/dwarffortress
|
||||||
|
vmkdir /usr/share/dwarffortress
|
||||||
|
vmkdir /usr/lib/dwarffortress/libs
|
||||||
|
vcopy "df_linux/libs/*" /usr/lib/dwarffortress/libs
|
||||||
|
rm -r df_linux/libs
|
||||||
|
vcopy "df_linux/*" /usr/share/dwarffortress/
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue