[arch-commits] Commit in dwarffortress/trunk (3 files)
Sven-Hendrik Haase
svenstaro at nymeria.archlinux.org
Wed Jul 9 03:43:02 UTC 2014
Date: Wednesday, July 9, 2014 @ 05:43:02
Author: svenstaro
Revision: 115336
upgpkg: dwarffortress 0.40.01-1
upstream release 0.40.01 and changes so that now it uses the HOME dir
Modified:
dwarffortress/trunk/PKGBUILD
dwarffortress/trunk/dwarffortress
Deleted:
dwarffortress/trunk/dwarffortress.install
-----------------------+
PKGBUILD | 57 +++++++++++++++++++-----------------------------
dwarffortress | 12 ++++++++--
dwarffortress.install | 16 -------------
3 files changed, 33 insertions(+), 52 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-07-09 01:49:38 UTC (rev 115335)
+++ PKGBUILD 2014-07-09 03:43:02 UTC (rev 115336)
@@ -3,13 +3,12 @@
# Contributor: Daenyth <Daenyth+Arch [AT] gmail [DOT] com>
# Contributor: djnm <nmihalich [at} gmail dott com>
pkgname=dwarffortress
-pkgver=0.34.11
-_pkgver=34_11
-pkgrel=6
+pkgver=0.40.01
+_pkgver=40_01
+pkgrel=1
pkgdesc="A single-player fantasy game. You control a dwarven outpost or an adventurer in a randomly generated persistent world."
arch=(i686 x86_64)
url="http://www.bay12games.com/dwarves/"
-install="$pkgname.install"
license=('custom:dwarffortress')
depends=(gtk2 glu sdl_image libsndfile openal sdl_ttf glew gcc-libs)
makedepends=(git cmake)
@@ -23,10 +22,6 @@
'lib32-alsa-lib: for alsa sound'
'lib32-libpulse: for pulse sound')
fi
-backup=('opt/df_linux/data/init/colors.txt'
- 'opt/df_linux/data/init/init.txt'
- 'opt/df_linux/data/init/d_init.txt'
- 'opt/df_linux/data/init/interface.txt')
# I made a fucking github repo with the sole purpose of unfucking df a bit
# We try to compile whatever little bit of df is open source
source=(http://www.bay12games.com/dwarves/df_${_pkgver}_linux.tar.bz2
@@ -34,11 +29,11 @@
dwarffortress
dwarffortress.desktop
dwarffortress.png)
-md5sums=('33e26a93e5914f7545fa1aaa53706eeb'
- 'SKIP'
- 'c19aacc31e8df354827db352fecfd200'
- 'c8984d1eea6e409ecf339d6ee9e91e42'
- 'b1d51f82400073af9bb179e34a9209d0')
+sha256sums=('fbb7cdd09e785fbe9f884868a0817279ef4ce45423ca9503d5f0731a8abfd7b4'
+ 'SKIP'
+ '4a7cc39dabe4fa3c28fdb9bdff83f7cdf55de0beff700fd6ebe605dda2f81688'
+ 'e79e3d945c6cc0da58f4ca30a210c7bf1bc3149fd10406d1262a6214eb40445a'
+ '83183abc70b11944720b0d86f4efd07468f786b03fa52fe429ca8e371f708e0f')
build() {
cd $srcdir/dwarf_fortress_unfuck
@@ -48,35 +43,29 @@
}
package() {
- cd $srcdir/df_linux
install -dm755 $pkgdir/opt/
- cp -r $srcdir/df_linux/ $pkgdir/opt/
+ cp -r $srcdir/df_linux $pkgdir/opt/$pkgname
+ rm -r $pkgdir/opt/$pkgname/df $pkgdir/opt/$pkgname/libs/* $pkgdir/opt/$pkgname/g_src
- # Yay for precompiled stuff with junk permissions! :D
- find $pkgdir/opt/df_linux -type d -exec chmod 755 {} +
- find $pkgdir/opt/df_linux -type f -exec chmod 644 {} +
+ find $pkgdir/opt/$pkgname -type d -exec chmod 755 {} +
+ find $pkgdir/opt/$pkgname -type f -exec chmod 644 {} +
- install -Dm755 $srcdir/dwarffortress $pkgdir/usr/bin/dwarffortress
+ install -Dm755 $srcdir/df_linux/libs/Dwarf_Fortress $pkgdir/opt/$pkgname/libs/Dwarf_Fortress
+ install -Dm755 $srcdir/dwarf_fortress_unfuck/libgraphics.so $pkgdir/opt/$pkgname/libs/libgraphics.so
+ install -Dm755 $srcdir/dwarffortress $pkgdir/usr/bin/$pkgname
- chmod 755 $pkgdir/opt/df_linux/libs/Dwarf_Fortress
- install -Dm755 $srcdir/dwarf_fortress_unfuck/libgraphics.so $pkgdir/opt/df_linux/libs/libgraphics.so
- ln -s /usr/lib32/libpng.so $pkgdir/opt/df_linux/libs/libpng.so.3
- rm $pkgdir/opt/df_linux/libs/{libgcc_s.so.1,libstdc++.so.6}
+ # No idea why we need this. Really. This isn't being loaded dynamically, it's not linked and
+ # in general there is no indication this is being used. However, it doesn't work without this symlink.
+ ln -s /usr/lib32/libpng.so $pkgdir/opt/$pkgname/libs/libpng.so.3
- install -d -m775 -o root -g games $pkgdir/opt/df_linux/data/save
+ # Set pkgname in runscript
+ sed -i "s/^pkgname=.*/pkgname=$pkgname/" $pkgdir/usr/bin/$pkgname
- # This probably is overkill, but I don't know what specific files df needs permission for in here.
- chmod 775 $pkgdir/opt/df_linux
- chown root:games $pkgdir/opt/df_linux
- chown -R root:games $pkgdir/opt/df_linux/data
- find $pkgdir/opt/df_linux/data -type d -exec chmod 775 {} +
- find $pkgdir/opt/df_linux/data -type f -exec chmod 664 {} +
-
# Desktop launcher with icon
- install -Dm644 $srcdir/dwarffortress.desktop $pkgdir/usr/share/applications/dwarffortress.desktop
- install -Dm644 $srcdir/dwarffortress.png $pkgdir/usr/share/pixmaps/dwarffortress.png
+ install -Dm644 $srcdir/dwarffortress.desktop $pkgdir/usr/share/applications/"$pkgname".desktop
+ install -Dm644 $srcdir/dwarffortress.png $pkgdir/usr/share/pixmaps/"$pkgname".png
- install -Dm644 $srcdir/df_linux/readme.txt $pkgdir/usr/share/licenses/dwarffortress/readme.txt
+ install -Dm644 $srcdir/df_linux/readme.txt $pkgdir/usr/share/licenses/$pkgname/readme.txt
}
# vim:set ts=2 sw=2 et:
Modified: dwarffortress
===================================================================
--- dwarffortress 2014-07-09 01:49:38 UTC (rev 115335)
+++ dwarffortress 2014-07-09 03:43:02 UTC (rev 115336)
@@ -1,7 +1,15 @@
#!/bin/sh
-cd /opt/df_linux
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.
-umask 0002 # Make sure that any saves created get 775/664
+pkgname=dwarffortress #To be set by PKGBUILD
+
+if [[ ! -d "$HOME/.$pkgname" ]]; then
+ mkdir "$HOME/.$pkgname"
+ cp -rn /opt/"$pkgname"/data "$HOME/.$pkgname/"
+ cp -rsn /opt/"$pkgname"/* "$HOME/.$pkgname/"
+fi
+
+cd "$HOME/.$pkgname"
exec ./libs/Dwarf_Fortress "$@"
+
Deleted: dwarffortress.install
===================================================================
--- dwarffortress.install 2014-07-09 01:49:38 UTC (rev 115335)
+++ dwarffortress.install 2014-07-09 03:43:02 UTC (rev 115336)
@@ -1,16 +0,0 @@
-## arg 1: the new package version
-post_install() {
- echo "Make sure to add your user to the games group to play dwarffortress"
- post_upgrade $1 0
-}
-
-## arg 1: the new package version
-## arg 2: the old package version
-post_upgrade() {
- # Make sure that permissions are correct
- chown -R root:games /opt/df_linux/data
- find /opt/df_linux/data/save -type d -exec chmod 775 {} + &
- find /opt/df_linux/data/save -type f -exec chmod 664 {} + &
-}
-
-# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list