Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2014 20:11:13 +0000 (UTC)
From:      Thierry Thomas <thierry@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r351037 - in head/games/monsterz: . files
Message-ID:  <201404112011.s3BKBDnl025303@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thierry
Date: Fri Apr 11 20:11:13 2014
New Revision: 351037
URL: http://svnweb.freebsd.org/changeset/ports/351037
QAT: https://qat.redports.org/buildarchive/r351037/

Log:
  Support staging.

Modified:
  head/games/monsterz/Makefile
  head/games/monsterz/files/patch-Makefile
  head/games/monsterz/pkg-plist

Modified: head/games/monsterz/Makefile
==============================================================================
--- head/games/monsterz/Makefile	Fri Apr 11 19:58:23 2014	(r351036)
+++ head/games/monsterz/Makefile	Fri Apr 11 20:11:13 2014	(r351037)
@@ -32,24 +32,25 @@ PLIST_SUB=	SCOREDIR=${SCOREDIR}
 DESKTOP_ENTRIES="Monsterz" "${COMMENT}" "${PORTNAME}" \
 		"${PORTNAME}" "Game;ArcadeGame;" false
 
-NO_STAGE=	yes
-
 OPTIONS_DEFINE=	DOCS
 
 .include <bsd.port.options.mk>
 
 post-install:
 .for d in graphics sound
-	@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${DATADIR})
+	(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR})
 .endfor
-	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.py ${DATADIR}
-	@${PYTHON_CMD} -m compileall ${DATADIR}
-	@${PYTHON_CMD} -O -m compileall ${DATADIR}
-	${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png ${PREFIX}/share/pixmaps/
-
+	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.py ${STAGEDIR}${DATADIR}
+	(cd ${STAGEDIR}${PREFIX}	\
+	&& ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -d ${DATADIR}	\
+		-f ${DATADIR:S;${PREFIX}/;;}	\
+	&& ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py -d ${DATADIR}\
+		-f ${DATADIR:S;${PREFIX}/;;})
+	${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png ${STAGEDIR}${PREFIX}/share/pixmaps/
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/monsterz
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
 .endif
 
 .include <bsd.port.mk>

Modified: head/games/monsterz/files/patch-Makefile
==============================================================================
--- head/games/monsterz/files/patch-Makefile	Fri Apr 11 19:58:23 2014	(r351036)
+++ head/games/monsterz/files/patch-Makefile	Fri Apr 11 20:11:13 2014	(r351037)
@@ -1,5 +1,5 @@
 --- Makefile.orig	2007-12-17 23:05:00.000000000 +0100
-+++ Makefile	2013-08-19 08:57:30.000000000 +0200
++++ Makefile	2014-04-11 21:13:39.000000000 +0200
 @@ -1,8 +1,8 @@
  
 -prefix = /usr/local
@@ -22,12 +22,26 @@
  
  bitmap: $(BITMAP)
  
-@@ -50,7 +50,7 @@
+@@ -42,17 +42,17 @@
+ install: all
+ 	mkdir -p $(DESTDIR)$(gamesdir)
+ 	cp monsterz $(DESTDIR)$(gamesdir)/
+-	chown root:games $(DESTDIR)$(gamesdir)/monsterz
+-	chmod g+s $(DESTDIR)$(gamesdir)/monsterz
++	#chown root:games $(DESTDIR)$(gamesdir)/monsterz
++	#chmod g+s $(DESTDIR)$(gamesdir)/monsterz
+ 	mkdir -p $(DESTDIR)$(pkgdatadir)/graphics
+ 	mkdir -p $(DESTDIR)$(pkgdatadir)/sound
+ 	cp monsterz.py $(DESTDIR)$(pkgdatadir)/
  	cp $(BITMAP) $(DESTDIR)$(pkgdatadir)/graphics/
  	cp $(SOUND) $(MUSIC) $(DESTDIR)$(pkgdatadir)/sound/
  	mkdir -p $(DESTDIR)$(scoredir)
 -	test -f $(DESTDIR)$(scorefile) || echo "" > $(DESTDIR)$(scorefile)
+-	chown root:games $(DESTDIR)$(scorefile)
+-	chmod g+w $(DESTDIR)$(scorefile)
 +	test -f $(DESTDIR)$(scorefile) || /usr/bin/touch $(DESTDIR)$(scorefile)
- 	chown root:games $(DESTDIR)$(scorefile)
- 	chmod g+w $(DESTDIR)$(scorefile)
++	#chown root:games $(DESTDIR)$(scorefile)
++	#chmod g+w $(DESTDIR)$(scorefile)
  
+ uninstall:
+ 	rm -f $(DESTDIR)$(gamesdir)/monsterz

Modified: head/games/monsterz/pkg-plist
==============================================================================
--- head/games/monsterz/pkg-plist	Fri Apr 11 19:58:23 2014	(r351036)
+++ head/games/monsterz/pkg-plist	Fri Apr 11 20:11:13 2014	(r351037)
@@ -1,4 +1,8 @@
+@group games
+@mode 2555
 bin/monsterz
+@mode
+@group
 %%DATADIR%%/graphics/background.png
 %%DATADIR%%/graphics/bigtiles.png
 %%DATADIR%%/graphics/board.png
@@ -26,5 +30,5 @@ share/pixmaps/monsterz.png
 @dirrm %%DATADIR%%/graphics
 @dirrm %%DATADIR%%
 @exec if [ ! -e %%SCOREDIR%% ] ; then mkdir -p -m 775 %%SCOREDIR%% ; fi
-@exec [ -e %%SCOREDIR%%/monsterz ] || touch %%SCOREDIR%%/monsterz && chmod 664 %%SCOREDIR%%/monsterz && chgrp games %%SCOREDIR%%/monsterz
 @unexec if [ ! -s %%SCOREDIR%%/monsterz ] ; then rm -f %%SCOREDIR%%/monsterz && rm -r %%SCOREDIR%% || true ; fi
+@exec [ -e %%SCOREDIR%%/monsterz ] || touch %%SCOREDIR%%/monsterz && chmod 664 %%SCOREDIR%%/monsterz && chgrp games %%SCOREDIR%%/monsterz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404112011.s3BKBDnl025303>