diff options
author | Alexander F Rødseth | 2015-06-10 14:29:44 +0200 |
---|---|---|
committer | Alexander F Rødseth | 2015-06-10 14:29:44 +0200 |
commit | ecfd34511a1637cf8110e6d24b9d9be67483b8bb (patch) | |
tree | 050e1a6b07a4a51aa67b86a12938f56487b34aae | |
download | aur-ecfd34511a1637cf8110e6d24b9d9be67483b8bb.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 69 | ||||
-rw-r--r-- | nethack-x11.patch | 161 |
3 files changed, 252 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..64429a2cefd0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = nethack-x11 + pkgdesc = Single-player roguelike dungeon exploration game + pkgver = 3.4.3 + pkgrel = 8 + url = http://www.nethack.org/ + arch = x86_64 + arch = i686 + license = custom + makedepends = gendesk + makedepends = setconf + depends = libxaw + conflicts = nethack + backup = etc/nethackrc + source = http://downloads.sourceforge.net/nethack/nethack-343-src.tgz + source = nethack-x11.patch + source = nethack-x11.png::http://bugs.gentoo.org/attachment.cgi?id=86458 + sha256sums = bb39c3d2a9ee2df4a0c8fdde708fbc63740853a7608d2f4c560b488124866fe4 + sha256sums = 1b3857f2c1ae5e418ab26ab2ed5dbb9eb61c506f262b07e15e9464c3c6734452 + sha256sums = e1e0b059c617af04ee88bed4b03b73c02f022663e001c5485fe9900ca2d76295 + +pkgname = nethack-x11 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0c119db4eb62 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Alexander Rødseth <rodseth@gmail.com> +# Contributor: Jamie <dyscoria@googlemail.com> + +pkgname=nethack-x11 +pkgver=3.4.3 +pkgrel=8 +pkgdesc='Single-player roguelike dungeon exploration game' +arch=('x86_64' 'i686') +url='http://www.nethack.org/' +license=('custom') +depends=('libxaw') +makedepends=('gendesk' 'setconf') +conflicts=('nethack') +backup=('etc/nethackrc') +source=("http://downloads.sourceforge.net/nethack/nethack-343-src.tgz" + 'nethack-x11.patch' + 'nethack-x11.png::http://bugs.gentoo.org/attachment.cgi?id=86458') +sha256sums=('bb39c3d2a9ee2df4a0c8fdde708fbc63740853a7608d2f4c560b488124866fe4' + '1b3857f2c1ae5e418ab26ab2ed5dbb9eb61c506f262b07e15e9464c3c6734452' + 'e1e0b059c617af04ee88bed4b03b73c02f022663e001c5485fe9900ca2d76295') + +prepare() { + cd "$srcdir/nethack-$pkgver" + + gendesk -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" --exec nethack \ + --name 'Nethack (X11)' --genericname Nethack + + sh sys/unix/setup.sh + patch -Np1 -i ../nethack-x11.patch + + # Create /etc/nethackrc with OPTIONS=windowtype:X11 + touch nethackrc + setconf -a nethackrc OPTIONS 'windowtype:X11' + + # Add two new lines to nethack.sh + sed -i \ + 's|export HACKDIR|NETHACKOPTIONS=\nexport NETHACKOPTIONS\nexport HACKDIR|' \ + sys/unix/nethack.sh + + # Set HACKDIR + setconf sys/unix/nethack.sh HACKDIR '/usr/share/nethack' + + # Set NETHACKOPTIONS + setconf sys/unix/nethack.sh NETHACKOPTIONS '@/etc/nethackrc' +} + +build() { + cd "$srcdir/nethack-$pkgver" + + make +} + +package() { + cd "$srcdir/nethack-$pkgver" + + make PREFIX="${pkgdir}/usr" install + + install -Dm644 nethackrc "$pkgdir/etc/nethackrc" + install -Dm644 dat/license \ + "$pkgdir/usr/share/licenses/$pkgname/license" + install -Dm644 win/X11/nethack.rc \ + "$pkgdir/usr/share/doc/$pkgname/nethackrc" + install -Dm644 "$pkgname.desktop" \ + "$pkgdir/usr/share/applications/$pkgname.desktop" + install -Dm644 "../$pkgname.png" \ + "$pkgdir/usr/share/pixmaps/$pkgname.png" +} + +# vim:set ts=2 sw=2 et: diff --git a/nethack-x11.patch b/nethack-x11.patch new file mode 100644 index 000000000000..74ad2e48c402 --- /dev/null +++ b/nethack-x11.patch @@ -0,0 +1,161 @@ +diff --git a/Makefile b/Makefile +index 2f11c35..2233f03 100644 +--- a/Makefile ++++ b/Makefile +@@ -17,8 +17,8 @@ + PREFIX = /usr + GAME = nethack + # GAME = nethack.prg +-GAMEUID = games +-GAMEGRP = bin ++GAMEUID = root ++GAMEGRP = root + + # Permissions - some places use setgid instead of setuid, for instance + # See also the option "SECURE" in include/config.h +@@ -35,13 +35,13 @@ DIRPERM = 0755 + # therefore there should not be anything in GAMEDIR that you want to keep + # (if there is, you'll have to do the installation by hand or modify the + # instructions) +-GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir ++GAMEDIR = $(PREFIX)/share/$(GAME) + VARDIR = $(GAMEDIR) +-SHELLDIR = $(PREFIX)/games ++SHELLDIR = $(PREFIX)/bin + + # per discussion in Install.X11 and Install.Qt +-VARDATND = +-# VARDATND = x11tiles NetHack.ad pet_mark.xbm ++# VARDATND = ++VARDATND = x11tiles NetHack.ad pet_mark.xbm + # VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm + # for Atari/Gem + # VARDATND = nh16.img title.img GEM_RSC.RSC rip.img +diff --git a/include/config.h b/include/config.h +index 3efbfa2..db98440 100644 +--- a/include/config.h ++++ b/include/config.h +@@ -43,7 +43,7 @@ + * Some combinations make no sense. See the installation document. + */ + #define TTY_GRAPHICS /* good old tty based graphics */ +-/* #define X11_GRAPHICS */ /* X11 interface */ ++#define X11_GRAPHICS /* X11 interface */ + /* #define QT_GRAPHICS */ /* Qt interface */ + /* #define GNOME_GRAPHICS */ /* Gnome interface */ + /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ +@@ -169,8 +169,8 @@ + + #ifdef UNIX + /* path and file name extension for compression program */ +-#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ +-#define COMPRESS_EXTENSION ".Z" /* compress's extension */ ++#define COMPRESS "/bin/gzip" /* Lempel-Ziv compression */ ++#define COMPRESS_EXTENSION ".gz" /* compress's extension */ + /* An example of one alternative you might want to use: */ + /* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ + /* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ +@@ -185,7 +185,7 @@ + * a tar-like file, thus making a neater installation. See *conf.h + * for detailed configuration. + */ +-/* #define DLB */ /* not supported on all platforms */ ++#define DLB /* not supported on all platforms */ + + /* + * Defining INSURANCE slows down level changes, but allows games that +@@ -204,7 +204,7 @@ + * otherwise it will be the current directory. + */ + # ifndef HACKDIR +-# define HACKDIR "/usr/games/lib/nethackdir" ++# define HACKDIR "/usr/share/nethack" + # endif + + /* +diff --git a/include/unixconf.h b/include/unixconf.h +index fe1b006..4d0cf48 100644 +--- a/include/unixconf.h ++++ b/include/unixconf.h +@@ -37,7 +37,7 @@ + #define NETWORK /* if running on a networked system */ + /* e.g. Suns sharing a playground through NFS */ + /* #define SUNOS4 */ /* SunOS 4.x */ +-/* #define LINUX */ /* Another Unix clone */ ++#define LINUX /* Another Unix clone */ + /* #define CYGWIN32 */ /* Unix on Win32 -- use with case sensitive defines */ + /* #define GENIX */ /* Yet Another Unix Clone */ + /* #define HISX */ /* Bull Unix for XPS Machines */ +@@ -132,7 +132,7 @@ + * "extra output" method is used, but not all systems provide access to + * a fine-grained timer. + */ +-/* #define TIMED_DELAY */ /* usleep() */ ++#define TIMED_DELAY /* usleep() */ + #endif + + /* +diff --git a/src/Makefile b/src/Makefile +index 29ad99a..0be4a96 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -214,8 +214,8 @@ WINBEOBJ = + + # + # +-WINSRC = $(WINTTYSRC) +-WINOBJ = $(WINTTYOBJ) ++WINSRC = $(WINTTYSRC) $(WINX11SRC) ++WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) + + # on some systems the termcap library is in -ltermcap or -lcurses + # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead +@@ -230,8 +230,8 @@ WINOBJ = $(WINTTYOBJ) + # WINTTYLIB = -ltermcap + # WINTTYLIB = -lcurses + # WINTTYLIB = -lcurses16 +-# WINTTYLIB = -lncurses +-WINTTYLIB = -ltermlib ++WINTTYLIB = -lncurses ++# WINTTYLIB = -ltermlib + # + # libraries for X11 + # If USE_XPM is defined in config.h, you will also need -lXpm here. +@@ -255,7 +255,7 @@ WINGEMLIB = -le_gem -lgem + # libraries for BeOS + WINBELIB = -lbe + +-WINLIB = $(WINTTYLIB) ++WINLIB = $(WINTTYLIB) $(WINX11LIB) + + # any other strange libraries your system needs (for Sysunix only -- the more + # specialized targets should already be right) +diff --git a/win/X11/NetHack.ad b/win/X11/NetHack.ad +index d7e9ed3..3682ed5 100644 +--- a/win/X11/NetHack.ad ++++ b/win/X11/NetHack.ad +@@ -3,13 +3,13 @@ + ! The rip window applies if the GRAPHIC_TOMBSTONE option is turned on, and + ! requires a 12 pixel font for correct appearance. + ! +-NetHack*font: variable ++NetHack*font: fixed + NetHack*display_file*font: fixed + NetHack*tombstone*font: fixed + NetHack*text*rip*font: -*-times-medium-r-*-*-12-*-*-*-*-*-*-* + NetHack*menu*font: fixed + NetHack*text*font: fixed +-NetHack*map*font: nh10 ++NetHack*map*font: fixed + + ! To use full-color tiles for the map, uncomment the tile file name. + ! If you use a 100dpi (or greater) monitor you may wish to double the +@@ -19,7 +19,7 @@ NetHack*map*font: nh10 + ! the custom format - to enlarge an XPM file, use processing tools + ! such as XV or preferably PBMplus. + ! +-!NetHack.tile_file: x11tiles ++NetHack.tile_file: x11tiles + !NetHack.double_tile_size: True + ! + ! The annotation of pets. |