pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/xblockout Add user-destdir installation support.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ae55b9c2f646
branches:  trunk
changeset: 590031:ae55b9c2f646
user:      obache <obache%pkgsrc.org@localhost>
date:      Sat Jun 25 11:32:09 2011 +0000

description:
Add user-destdir installation support.

diffstat:

 games/xblockout/Makefile         |  16 +++++++++++++-
 games/xblockout/distinfo         |   4 +-
 games/xblockout/patches/patch-aa |  46 ++++++++++++++++++++++++++++++++++-----
 3 files changed, 57 insertions(+), 9 deletions(-)

diffs (116 lines):

diff -r 34ed44cb8b7d -r ae55b9c2f646 games/xblockout/Makefile
--- a/games/xblockout/Makefile  Sat Jun 25 09:04:26 2011 +0000
+++ b/games/xblockout/Makefile  Sat Jun 25 11:32:09 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2011/05/25 05:54:38 obache Exp $
+# $NetBSD: Makefile,v 1.6 2011/06/25 11:32:09 obache Exp $
 #
 
 DISTNAME=      xbl-1.1.6
@@ -10,11 +10,25 @@
 COMMENT=       3D-tetris-like game
 LICENSE=       gnu-gpl-v1
 
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 USE_TOOLS+=    imake
 GNU_CONFIGURE= yes
+USE_GAMESGROUP=        yes
+
 # libXext is not needed
 BUILDLINK_TRANSFORM+=  rm:-lXext
 INSTALLATION_DIRS=     bin lib/X11/app-defaults
 
+USERGROUP_PHASE=       configure
+
+SUBST_CLASSES+=                gamegid
+SUBST_STAGE.gamegid=   pre-configure
+SUBST_FILES.gamegid=   Makefile.in
+SUBST_SED.gamegid=     -e 's/@GROUP_GID@/GROUP_GID=${PKG_GID.${GAMES_GROUP}}/g'
+
+SPECIAL_PERMS+=                bin/xbl ${SETGID_GAMES_PERMS}
+OWN_DIRS_PERMS+=       ${PREFIX}/lib/X11/xbl ${GAMEDIR_PERMS}
+
 .include "../../x11/libX11/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 34ed44cb8b7d -r ae55b9c2f646 games/xblockout/distinfo
--- a/games/xblockout/distinfo  Sat Jun 25 09:04:26 2011 +0000
+++ b/games/xblockout/distinfo  Sat Jun 25 11:32:09 2011 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.3 2009/02/19 12:36:15 drochner Exp $
+$NetBSD: distinfo,v 1.4 2011/06/25 11:32:10 obache Exp $
 
 SHA1 (xbl-1.1.6.tar.gz) = 05b368c20fd16a99346540a5352a011b56926ef3
 RMD160 (xbl-1.1.6.tar.gz) = 4e726544b0e9f2b9481e1e216658fc4412dfbd1c
 Size (xbl-1.1.6.tar.gz) = 136504 bytes
-SHA1 (patch-aa) = f53468bfbc23a7c0085bc2b15cce044cddf2338a
+SHA1 (patch-aa) = cc0984980d8a5a5baeac7442e8f9a54f6909b4d8
 SHA1 (patch-ab) = c006a72d511f01011666e1caf5173ba1f03b3494
 SHA1 (patch-ac) = 5ff43d789bec5d98dc88352c57ae0f40378b0427
diff -r 34ed44cb8b7d -r ae55b9c2f646 games/xblockout/patches/patch-aa
--- a/games/xblockout/patches/patch-aa  Sat Jun 25 09:04:26 2011 +0000
+++ b/games/xblockout/patches/patch-aa  Sat Jun 25 11:32:09 2011 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.2 2007/02/06 17:08:19 joerg Exp $
+$NetBSD: patch-aa,v 1.3 2011/06/25 11:32:10 obache Exp $
 
---- Makefile.in.orig   2007-01-28 18:22:32.000000000 +0000
+--- Makefile.in.orig   2009-02-14 14:23:05.000000000 +0000
 +++ Makefile.in
 @@ -128,9 +128,6 @@ install:bl
        @-if [ "" != "$(USE_SETGID)" ] ; then \
@@ -12,7 +12,39 @@
        #
        # Remove old score file
        #
-@@ -173,14 +170,8 @@ install:bl
+@@ -146,42 +143,20 @@ install:bl
+       #
+       # Install executable
+       #
+-      $(CP) bl $(BINDIR)/xbl  
+-      -if [ "" = "$(USE_SETGID)" ] ; then \
+-           chmod 755  $(BINDIR)/xbl ;\
+-         else \
+-           chmod 2755  $(BINDIR)/xbl ;\
+-           chown root $(BINDIR)/xbl ;\
+-           chgrp $(GROUP_GID) $(BINDIR)/xbl ;\
+-         fi
++      $(BSD_INSTALL_PROGRAM) bl $(DESTDIR)$(BINDIR)/xbl       
+       #
+       # Install executable
+       #
+-      -mkdir $(SCOREDIR) 2>/dev/null
+-      $(CP) Xbl.ad  $(RESOURCEDIR)/Xbl ;      chmod 644 $(RESOURCEDIR)/Xbl
+-      $(CP) Xbl.ad  $(SCOREDIR)/Xbl ;         chmod 644 $(SCOREDIR)/Xbl
+-      $(CP) COPYING  $(SCOREDIR) ;            chmod 444 $(SCOREDIR)/COPYING
+-      -if [ "" = "$(USE_SETGID)" ] ; then \
+-           chmod 777 $(SCOREDIR) ;\
+-           chmod 666 $(SCOREDIR)/[1-9]* ;\
+-         else \
+-           chmod 775 $(SCOREDIR) ;\
+-           chmod 664 $(SCOREDIR)/[1-9]* ;\
+-           chown root $(SCOREDIR) $(SCOREDIR)/[1-9]* ;\
+-           chgrp $(GROUP_GID) $(SCOREDIR) $(SCOREDIR)/[1-9]* ;\
+-      fi
++      -mkdir $(DESTDIR)$(SCOREDIR) 2>/dev/null
++      $(BSD_INSTALL_DATA) Xbl.ad  $(DESTDIR)$(RESOURCEDIR)/Xbl ;
++      $(BSD_INSTALL_DATA) Xbl.ad  $(DESTDIR)$(SCOREDIR)/Xbl ; 
++      $(BSD_INSTALL_DATA) COPYING  $(DESTDIR)$(SCOREDIR) ;
        #
        # Install manual pages
        #
@@ -24,8 +56,10 @@
 -              $(CP) xbl.man $(MANPATH)/man1/xbl.1 ;\
 -              chmod 444 $(MANPATH)/man1/xbl.1 ; \
 -              fi
-+      ${BSD_INSTALL_MAN_DIR} ${MANPATH}/man1
-+      ${BSD_INSTALL_MAN} xbl.man $(MANPATH)/man1/xbl.1
-       cp *.gif *.html $(SCOREDIR)
+-      cp *.gif *.html $(SCOREDIR)
++      ${BSD_INSTALL_MAN_DIR} $(DESTDIR)${MANPATH}/man1
++      ${BSD_INSTALL_MAN} xbl.man $(DESTDIR)$(MANPATH)/man1/xbl.1
++      ${BSD_INSTALL_DATA} *.gif *.html $(DESTDIR)$(SCOREDIR)
        #
        -ls -lsa $(SCOREDIR) $(BINDIR)/xbl $(MANPATH)/man[1n]/xbl.[1n]
+       @echo "Type xbl to play"



Home | Main Index | Thread Index | Old Index