diff options
author | thierry <thierry@FreeBSD.org> | 2014-04-12 04:11:13 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2014-04-12 04:11:13 +0800 |
commit | d2176caa3796579c76a51f972639de441d8a86f3 (patch) | |
tree | c06bd63f423d17141f7323e10d571254c169a33f /games | |
parent | 7a7395a3af1ffba6f073c5add08252b4a71e6197 (diff) | |
download | freebsd-ports-gnome-d2176caa3796579c76a51f972639de441d8a86f3.tar.gz freebsd-ports-gnome-d2176caa3796579c76a51f972639de441d8a86f3.tar.zst freebsd-ports-gnome-d2176caa3796579c76a51f972639de441d8a86f3.zip |
Support staging.
Diffstat (limited to 'games')
-rw-r--r-- | games/monsterz/Makefile | 21 | ||||
-rw-r--r-- | games/monsterz/files/patch-Makefile | 22 | ||||
-rw-r--r-- | games/monsterz/pkg-plist | 6 |
3 files changed, 34 insertions, 15 deletions
diff --git a/games/monsterz/Makefile b/games/monsterz/Makefile index f607dcafdf7d..5b3484b705f6 100644 --- a/games/monsterz/Makefile +++ b/games/monsterz/Makefile @@ -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> diff --git a/games/monsterz/files/patch-Makefile b/games/monsterz/files/patch-Makefile index d85652c63fcf..3029d5963803 100644 --- a/games/monsterz/files/patch-Makefile +++ b/games/monsterz/files/patch-Makefile @@ -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 diff --git a/games/monsterz/pkg-plist b/games/monsterz/pkg-plist index 9d2e7f26b36a..68cb2f9a6168 100644 --- a/games/monsterz/pkg-plist +++ b/games/monsterz/pkg-plist @@ -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 |