[arch-commits] Commit in glhack/repos (8 files)

2013-04-27 Thread Eric Bélanger
Date: Sunday, April 28, 2013 @ 01:16:07
  Author: eric
Revision: 183779

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  glhack/repos/staging-i686/
  glhack/repos/staging-i686/PKGBUILD
(from rev 183778, glhack/trunk/PKGBUILD)
  glhack/repos/staging-i686/glhack-libpng15.patch
(from rev 183778, glhack/trunk/glhack-libpng15.patch)
  glhack/repos/staging-i686/glhack.install
(from rev 183778, glhack/trunk/glhack.install)
  glhack/repos/staging-x86_64/
  glhack/repos/staging-x86_64/PKGBUILD
(from rev 183778, glhack/trunk/PKGBUILD)
  glhack/repos/staging-x86_64/glhack-libpng15.patch
(from rev 183778, glhack/trunk/glhack-libpng15.patch)
  glhack/repos/staging-x86_64/glhack.install
(from rev 183778, glhack/trunk/glhack.install)

--+
 staging-i686/PKGBUILD|   57 +
 staging-i686/glhack-libpng15.patch   |   11 ++
 staging-i686/glhack.install  |   24 +
 staging-x86_64/PKGBUILD  |   57 +
 staging-x86_64/glhack-libpng15.patch |   11 ++
 staging-x86_64/glhack.install|   24 +
 6 files changed, 184 insertions(+)

Copied: glhack/repos/staging-i686/PKGBUILD (from rev 183778, 
glhack/trunk/PKGBUILD)
===
--- staging-i686/PKGBUILD   (rev 0)
+++ staging-i686/PKGBUILD   2013-04-27 23:16:07 UTC (rev 183779)
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Eric Bélanger e...@archlinux.org
+
+pkgname=glhack
+pkgver=1.2
+pkgrel=7
+pkgdesc=A port of Nethack, a single player dungeon exploration game in 2D
+arch=('i686' 'x86_64')
+url=http://glhack.sourceforge.net/;
+license=('custom')
+depends=('sdl' 'libpng' 'libgl')
+makedepends=('mesa')
+options=('!makeflags')
+install=glhack.install
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
 glhack-libpng15.patch)
+sha1sums=('7dc46e6bd4a3c2ec10ab4d314acfbb30cefc6eae'
+  '4cf1a13e76cc1f1eb3708d42c74b85b7f321092d')
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  patch -p0 -i ../glhack-libpng15.patch
+  sed -i 's|/usr/lib/games|/usr/share|' include/config.h
+  sed -i 's|/var/lib/games/glhack|/var/games/glhack|' include/unixconf.h
+  sed -i -e 's|PREFIX   = /usr|PREFIX   = $(DESTDIR)/usr|' Makefile
+  sed -i -e 's|VARDIR   = /var/lib/games/glhack|VARDIR   = 
$(DESTDIR)/var/games/glhack|' Makefile
+  sed -i -e 's|/usr/man/man6|$(DESTDIR)/usr/share/man/man6|' doc/Makefile
+  sed -i -e 's|GAMEDIR  = $(PREFIX)/lib/games/$(GAME)|GAMEDIR  = 
$(PREFIX)/share/$(GAME)|' Makefile
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  install -d ${pkgdir}/usr/share/man/man{5,6}
+  make DESTDIR=$pkgdir install
+  install -D -m644 dat/license 
${pkgdir}/usr/share/licenses/${pkgname}/license
+
+# Renaming man pages which conflicts with nethack
+  pushd ${pkgdir}/usr/share/man/man6
+  for manpage in dgn_comp dlb lev_comp nethack recover; do
+mv $manpage.6 $manpage-glhack.6
+  done
+  popd
+
+  mv ${pkgdir}/usr/share/glhack/glhack ${pkgdir}/usr/bin/glhack
+  mv ${pkgdir}/usr/share/glhack/recover_glhack 
${pkgdir}/usr/bin/recover_glhack
+
+  chown -R root:root ${pkgdir}/usr/share/glhack
+
+  rm -r ${pkgdir}/var/games/glhack
+  install -d ${pkgdir}/var/games/glhack/save
+  chmod -R 775 ${pkgdir}/var/games
+  chown -R root:games ${pkgdir}/var/games
+}

Copied: glhack/repos/staging-i686/glhack-libpng15.patch (from rev 183778, 
glhack/trunk/glhack-libpng15.patch)
===
--- staging-i686/glhack-libpng15.patch  (rev 0)
+++ staging-i686/glhack-libpng15.patch  2013-04-27 23:16:07 UTC (rev 183779)
@@ -0,0 +1,11 @@
+--- win/gl/gl_image.c.old  2012-01-19 04:01:26.0 -0500
 win/gl/gl_image.c  2012-01-19 04:03:04.0 -0500
+@@ -486,7 +486,7 @@
+   /* set error handling since we are using the setjmp/longjmp method
+* (this is the normal method of doing things with libpng).
+*/
+-  if (setjmp(png_ptr-jmpbuf))
++  if (setjmp(png_jmpbuf(png_ptr)))
+   {
+ sdlgl_warning(Problem within LibPNG (unknown)\n);
+ goto failed;

Copied: glhack/repos/staging-i686/glhack.install (from rev 183778, 
glhack/trunk/glhack.install)
===
--- staging-i686/glhack.install (rev 0)
+++ staging-i686/glhack.install 2013-04-27 23:16:07 UTC (rev 183779)
@@ -0,0 +1,24 @@
+post_install() {
+  touch var/games/glhack/{record,perm,logfile}
+  chown root:games var/games/glhack/{record,perm,logfile}
+  chmod 664 var/games/glhack/{record,perm,logfile}
+}
+
+pre_upgrade() {
+  install -d -m775 var/games/glhack
+  chown root:games var/games/glhack
+  [ -e usr/share/glhack/record ]  cp usr/share/glhack/record var/games/glhack
+  [ -e usr/share/glhack/perm ]  cp 

[arch-commits] Commit in glhack/repos (8 files)

2012-01-19 Thread Eric Bélanger
Date: Thursday, January 19, 2012 @ 05:08:04
  Author: eric
Revision: 146929

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  glhack/repos/staging-i686/
  glhack/repos/staging-i686/PKGBUILD
(from rev 146928, glhack/trunk/PKGBUILD)
  glhack/repos/staging-i686/glhack-libpng15.patch
(from rev 146928, glhack/trunk/glhack-libpng15.patch)
  glhack/repos/staging-i686/glhack.install
(from rev 146928, glhack/trunk/glhack.install)
  glhack/repos/staging-x86_64/
  glhack/repos/staging-x86_64/PKGBUILD
(from rev 146928, glhack/trunk/PKGBUILD)
  glhack/repos/staging-x86_64/glhack-libpng15.patch
(from rev 146928, glhack/trunk/glhack-libpng15.patch)
  glhack/repos/staging-x86_64/glhack.install
(from rev 146928, glhack/trunk/glhack.install)

--+
 staging-i686/PKGBUILD|   54 +
 staging-i686/glhack-libpng15.patch   |   11 ++
 staging-i686/glhack.install  |   24 ++
 staging-x86_64/PKGBUILD  |   54 +
 staging-x86_64/glhack-libpng15.patch |   11 ++
 staging-x86_64/glhack.install|   24 ++
 6 files changed, 178 insertions(+)

Copied: glhack/repos/staging-i686/PKGBUILD (from rev 146928, 
glhack/trunk/PKGBUILD)
===
--- staging-i686/PKGBUILD   (rev 0)
+++ staging-i686/PKGBUILD   2012-01-19 10:08:04 UTC (rev 146929)
@@ -0,0 +1,54 @@
+# $Id$
+# Maintainer: Eric Bélanger e...@archlinux.org
+
+pkgname=glhack
+pkgver=1.2
+pkgrel=6
+pkgdesc=A port of Nethack, a single player dungeon exploration game in 2D
+arch=('i686' 'x86_64')
+url=http://glhack.sourceforge.net/;
+license=('custom')
+depends=('sdl' 'libpng' 'libgl')
+makedepends=('mesa')
+options=('!makeflags')
+install=glhack.install
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
 glhack-libpng15.patch)
+sha1sums=('7dc46e6bd4a3c2ec10ab4d314acfbb30cefc6eae'
+  '4cf1a13e76cc1f1eb3708d42c74b85b7f321092d')
+
+build(){
+  cd ${srcdir}/${pkgname}-${pkgver}
+  patch -p0 -i ../glhack-libpng15.patch
+  sed -i 's|/usr/lib/games|/usr/share|' include/config.h
+  sed -i 's|/var/lib/games/glhack|/var/games/glhack|' include/unixconf.h
+  sed -i -e 's|PREFIX   = /usr|PREFIX   = $(DESTDIR)/usr|' Makefile
+  sed -i -e 's|VARDIR   = /var/lib/games/glhack|VARDIR   = 
$(DESTDIR)/var/games/glhack|' Makefile
+  sed -i -e 's|/usr/man/man6|$(DESTDIR)/usr/share/man/man6|' doc/Makefile
+  sed -i -e 's|GAMEDIR  = $(PREFIX)/lib/games/$(GAME)|GAMEDIR  = 
$(PREFIX)/share/$(GAME)|' Makefile
+
+  make
+}
+
+package() {
+  cd ${srcdir}/${pkgname}-${pkgver}
+  install -d ${pkgdir}/usr/share/man/man{5,6}
+  make DESTDIR=$pkgdir install
+  install -D -m644 dat/license 
${pkgdir}/usr/share/licenses/${pkgname}/license
+
+# Renaming man pages which conflicts with nethack
+  cd ${pkgdir}/usr/share/man/man6
+  for manpage in dgn_comp dlb lev_comp nethack recover; do
+mv $manpage.6 $manpage-glhack.6
+  done
+  cd ${srcdir}/${pkgname}-${pkgver}
+
+  mv ${pkgdir}/usr/share/glhack/glhack ${pkgdir}/usr/bin/glhack
+  mv ${pkgdir}/usr/share/glhack/recover_glhack 
${pkgdir}/usr/bin/recover_glhack
+
+  chown -R root:root ${pkgdir}/usr/share/glhack
+
+  rm -r ${pkgdir}/var/games/glhack
+  install -d ${pkgdir}/var/games/glhack/save
+  chmod -R 775 ${pkgdir}/var/games
+  chown -R root:games ${pkgdir}/var/games
+}

Copied: glhack/repos/staging-i686/glhack-libpng15.patch (from rev 146928, 
glhack/trunk/glhack-libpng15.patch)
===
--- staging-i686/glhack-libpng15.patch  (rev 0)
+++ staging-i686/glhack-libpng15.patch  2012-01-19 10:08:04 UTC (rev 146929)
@@ -0,0 +1,11 @@
+--- win/gl/gl_image.c.old  2012-01-19 04:01:26.0 -0500
 win/gl/gl_image.c  2012-01-19 04:03:04.0 -0500
+@@ -486,7 +486,7 @@
+   /* set error handling since we are using the setjmp/longjmp method
+* (this is the normal method of doing things with libpng).
+*/
+-  if (setjmp(png_ptr-jmpbuf))
++  if (setjmp(png_jmpbuf(png_ptr)))
+   {
+ sdlgl_warning(Problem within LibPNG (unknown)\n);
+ goto failed;

Copied: glhack/repos/staging-i686/glhack.install (from rev 146928, 
glhack/trunk/glhack.install)
===
--- staging-i686/glhack.install (rev 0)
+++ staging-i686/glhack.install 2012-01-19 10:08:04 UTC (rev 146929)
@@ -0,0 +1,24 @@
+post_install() {
+  touch var/games/glhack/{record,perm,logfile}
+  chown root:games var/games/glhack/{record,perm,logfile}
+  chmod 664 var/games/glhack/{record,perm,logfile}
+}
+
+pre_upgrade() {
+  install -d -m775 var/games/glhack
+  chown root:games var/games/glhack
+  [ -e usr/share/glhack/record ]  cp usr/share/glhack/record var/games/glhack
+  [ -e usr/share/glhack/perm ]  cp