diff options
author | Kyle Keen | 2016-10-14 12:52:37 -0400 |
---|---|---|
committer | Kyle Keen | 2016-10-14 12:52:37 -0400 |
commit | 03423dcc3da79200419a371ba7f9a12adb1be194 (patch) | |
tree | 5a9173bda1351656dc7ffb11bf64b976c937fae0 | |
parent | b23bef24bc965763b4e4956ae90222d31c7c46a7 (diff) | |
download | aur-03423dcc3da79200419a371ba7f9a12adb1be194.tar.gz |
fix more paths
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 41 |
2 files changed, 36 insertions, 9 deletions
@@ -1,7 +1,9 @@ +# Generated by mksrcinfo v8 +# Fri Oct 14 16:52:36 UTC 2016 pkgbase = nethack4 pkgdesc = A modern fork of Nethack pkgver = 4.3.0.beta2 - pkgrel = 1 + pkgrel = 2 url = http://nethack4.org/ arch = i686 arch = x86_64 @@ -3,7 +3,7 @@ pkgname=nethack4 pkgver=4.3.0.beta2 _pkgver=4.3-beta2 -pkgrel=1 +pkgrel=2 pkgdesc="A modern fork of Nethack" arch=('i686' 'x86_64') url="http://nethack4.org/" @@ -27,13 +27,35 @@ build() { sed -i "s/\$objtype eq 'path'/0/" aimake mkdir -p build - mkdir -p opt + _target=opt00000000000000000000 # pad this out for later binary hacking + mkdir -p $_target cd build msg "Building console version" - ../aimake --without=jansson --without=gui --without=server -i ../opt/ - mv ../opt/nethack4 ../opt/nethack4-con + ../aimake --without=jansson --without=gui --without=server -i ../$_target/ + mv ../$_target/nethack4 ../$_target/nethack4-con msg "Building SDL version" - ../aimake --without=jansson --with=gui --without=server -i ../opt/ + ../aimake --without=jansson --with=gui --without=server -i ../$_target/ + + # there does not seem to be a way to have different build and install locations + # official instructions say to be root! + # so let's edit binary files, yay! + + msg "Fixing srcdir references" + cd ../$_target + chrpath -r "/usr/lib" nethack4-{con,sdl} + chrpath -r "/usr/lib" lib/lib{nethack_client,uncursed_sdl}.so + # (it would be nice if chrpath could handle all these cases...) + _data_path1="$PWD/data" + _data_path2="/usr/share/nethack4" + while (( ${#_data_path1} > ${#_data_path2} )); do + _data_path2="${_data_path2}?" + done + _data_path2="${_data_path2//\?/\\x00}" + echo "$_data_path2" + sed -i "s|$_data_path1\x00|$_data_path2\x00|g" nethack4-{con,sdl} + # skipping a bunch of other references that seem pointless-ish + # skipping libnethack.so because it is only debugging references + sed -i "s|$PWD|/usr/bin|g" applications/*.desktop } package() { @@ -41,13 +63,11 @@ package() { install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE" # manually install - cd opt + cd opt00000000000000000000 - chrpath -r "/usr/lib" nethack4-con nethack4-sdl install -Dm755 nethack4-con "$pkgdir/usr/bin/nethack4" install -Dm755 nethack4-sdl "$pkgdir/usr/bin/nethack4-sdl" - #chrpath -r "/usr/lib" lib/libnethack.so lib/libnethack_client.so install -Dm755 lib/libnethack.so "$pkgdir/usr/lib/libnethack.so" install -Dm755 lib/libnethack_client.so "$pkgdir/usr/lib/libnethack_client.so" install -Dm755 lib/libuncursed_sdl.so "$pkgdir/usr/lib/libuncursed_sdl.so" @@ -64,6 +84,11 @@ package() { install -d "$pkgdir/usr/share/nethack4/" install -m644 data/* "$pkgdir/usr/share/nethack4/" + + install -d "$pkgdir/usr/share/icons/" + cp -R icons/* "$pkgdir/usr/share/icons/" + install -d "$pkgdir/usr/share/applications/" + install -m644 applications/* "$pkgdir/usr/share/applications/" } |