commit e1407d76f5138d642002833720020a1fadd1248f
Author: Ben Rosser <rosser.bjr(a)gmail.com>
Date: Thu May 24 14:32:39 2018 -0400
Update to latest upstream release.
dwarffortress | 23 +++++++++++++++++++++++
dwarffortress.desktop | 10 ++++++++++
dwarffortress.png | Bin 0 -> 4647 bytes
dwarffortress.spec | 30 +++++++++++++++++++++++-------
sources | 1 -
5 files changed, 56 insertions(+), 8 deletions(-)
---
diff --git a/dwarffortress b/dwarffortress
new file mode 100755
index 0000000..6945757
--- /dev/null
+++ b/dwarffortress
@@ -0,0 +1,23 @@
+#!/bin/sh
+export SDL_DISABLE_LOCK_KEYS=1 # Work around for bug in Debian/Ubuntu SDL patch.
+#export SDL_VIDEO_CENTERED=1 # Centre the screen. Messes up resizing.
+
+pkgname=dwarffortress
+prefix=/usr
+
+if [[ ! -d "$HOME/.$pkgname" ]]; then
+ mkdir -p "$HOME/.$pkgname/data"
+ ln -s ${prefix}/share/"$pkgname"/raw "$HOME/.$pkgname/raw"
+ ln -s ${prefix}/libexec/"$pkgname" "$HOME/.$pkgname/libs"
+ cp -rn ${prefix}/share/"$pkgname"/data/init
"$HOME/.$pkgname/data/init"
+fi
+
+if [[ ! -f "$HOME/.dwarffortress/.stockpile" ]]; then
+ for link in announcement art dipscript help index initial_movies movies shader.fs
shader.vs sound speech; do
+ cp -r ${prefix}/share/"$pkgname"/data/$link
"$HOME/.$pkgname/data/$link"
+ done
+fi
+
+cd "$HOME/.$pkgname"
+exec ./libs/Dwarf_Fortress "$@"
+
diff --git a/dwarffortress.desktop b/dwarffortress.desktop
new file mode 100644
index 0000000..573baf9
--- /dev/null
+++ b/dwarffortress.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Dwarf Fortress
+GenericName=Dwarf Fortress
+Comment=A single-player fantasy game.
+Exec=dwarffortress
+Icon=/usr/share/pixmaps/dwarffortress.png
+Terminal=false
+Type=Application
+Categories=Game;
+StartupWMClass=Dwarf_Fortress
diff --git a/dwarffortress.png b/dwarffortress.png
new file mode 100644
index 0000000..97c864f
Binary files /dev/null and b/dwarffortress.png differ
diff --git a/dwarffortress.spec b/dwarffortress.spec
index f5dd85b..58aa43a 100644
--- a/dwarffortress.spec
+++ b/dwarffortress.spec
@@ -11,13 +11,25 @@ Summary: A single-player procedurally generated fantasy game
License: Dwarf Fortress
URL:
http://www.bay12games.com/dwarves/
+
+# Due to pre-compiled stuff, there is a separate 32 and 64 bit architecture.
Source0:
http://www.bay12games.com/dwarves/df_44_09_linux.tar.bz2
Source1:
http://www.bay12games.com/dwarves/df_44_09_linux32.tar.bz2
+
+# The libgraphics sources, as maintained by the Arch Linux packager.
Source2:
https://github.com/svenstaro/dwarf_fortress_unfuck/archive/%{version}.zip
-Source3:
https://mars.arosser.com/fedora/dwarffortress/rpmfusion/dwarffortress-lau...
+
+# Desktop file.
+Source3: dwarffortress.desktop
# Appstream file.
-Source4:
https://www.acm.jhu.edu/~bjr/fedora/dwarffortress/rpmfusion/dwarffortress...
+Source4: dwarffortress.appdata.xml
+
+# Launcher script.
+Source5: dwarffortress
+
+# Icon.
+Source6: dwarffortress.png
# Only build for 32 and 64 bit x86 systems.
# (According to kwizart, just use i686 here).
@@ -79,7 +91,6 @@ tar xfj %SOURCE1
# Extract other sources.
cd df_linux/
unzip -qo %SOURCE2
-tar xfJ %SOURCE3
# Fix some permissions.
find -type d -exec chmod 755 {} +
@@ -108,10 +119,10 @@ strip %{buildroot}%{_libexecdir}/dwarffortress/libgraphics.so
# Install .desktop file and launcher script from Arch Linux package.
# Or, rather, the modified versions.
-sed 's|prefix=/usr|prefix=%{_prefix}|' -i dwarffortress-launcher/dwarffortress
-install -p -Dm755 dwarffortress-launcher/dwarffortress
%{buildroot}%{_bindir}/dwarffortress
-install -p -Dm644 dwarffortress-launcher/dwarffortress.desktop
%{buildroot}%{_datadir}/applications/dwarffortress.desktop
-install -p -Dm644 dwarffortress-launcher/dwarffortress.png
%{buildroot}%{_datadir}/pixmaps/dwarffortress.png
+install -p -Dm755 %SOURCE5 %{buildroot}%{_bindir}/dwarffortress
+sed 's|prefix=/usr|prefix=%{_prefix}|' -i %{buildroot}%{_bindir}/dwarffortress
+install -p -Dm644 %SOURCE3 %{buildroot}%{_datadir}/applications/dwarffortress.desktop
+install -p -Dm644 %SOURCE6 %{buildroot}%{_datadir}/pixmaps/dwarffortress.png
desktop-file-validate %{buildroot}%{_datadir}/applications/dwarffortress.desktop
# Install appdata file and validate it.
@@ -129,6 +140,11 @@ appstream-util validate-relax --nonet
%{buildroot}/%{_datadir}/appdata/*.appdata
%{_datadir}/appdata/dwarffortress.appdata.xml
%changelog
+* Thu May 24 2018 Ben Rosser <rosser.bjr(a)gmail.com> - 0.44.09-1
+- Updated to latest upstream version, 0.44.10.
+- Add the launcher files separately as individual sources, not a tarball.
+- Fix a bug in the desktop file.
+
* Mon Apr 09 2018 Ben Rosser <rosser.bjr(a)gmail.com> - 0.44.09-1
- Update to latest upstream release.
diff --git a/sources b/sources
index 72124e7..6ab7947 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,3 @@
-df7f7f5f00c918504c3fa2147566154f dwarffortress-launcher.tar.xz
08529be5c2d98ec493899f854efb5b9f 0.44.09.zip
82d22c02ddb02bcd2554210220d0761f df_44_09_linux32.tar.bz2
9acaa317dd936e809d880aea9682fabe df_44_09_linux.tar.bz2