diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2014-05-27 04:23:16 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2014-05-27 04:23:16 +0800 |
commit | b148c97f2b6bd44016518d521cdf2f593fa921a3 (patch) | |
tree | 6f4d0bbc0e88ad5b3cb3c8c288d672a6e14e718b /games | |
parent | db02468dc0ba8782ec0f2714a7db0a4fb1213285 (diff) | |
download | freebsd-ports-gnome-b148c97f2b6bd44016518d521cdf2f593fa921a3.tar.gz freebsd-ports-gnome-b148c97f2b6bd44016518d521cdf2f593fa921a3.tar.zst freebsd-ports-gnome-b148c97f2b6bd44016518d521cdf2f593fa921a3.zip |
- Stagify
- Improve highscore file handling
- Pass maintainership to games@
- Fix insallation from user
- Strip binary
Diffstat (limited to 'games')
-rw-r--r-- | games/golddig/Makefile | 12 | ||||
-rw-r--r-- | games/golddig/files/patch-Makefile | 50 | ||||
-rw-r--r-- | games/golddig/files/pkg-deinstall.in | 16 | ||||
-rw-r--r-- | games/golddig/files/pkg-install.in | 10 | ||||
-rw-r--r-- | games/golddig/pkg-install | 11 | ||||
-rw-r--r-- | games/golddig/pkg-plist | 7 |
6 files changed, 90 insertions, 16 deletions
diff --git a/games/golddig/Makefile b/games/golddig/Makefile index b116b15440cd..8ea5126c583d 100644 --- a/games/golddig/Makefile +++ b/games/golddig/Makefile @@ -3,23 +3,27 @@ PORTNAME= golddig PORTVERSION= 3.1 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= http://www.NetBSD.org/~chuck/gz/ DISTNAME= ${PORTNAME}C${PORTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= games@FreeBSD.org COMMENT= Getting the Gold and Avoiding Death USE_XORG= x11 -MAKE_ENV= X11BASE="${LOCALBASE}" +MAKE_ENV= X11BASE="${LOCALBASE}" \ + _STRIPFLAG_INSTALL="${STRIP}" LDFLAGS+= -L${LOCALBASE}/lib -MAN6= gdedit.6 golddig.6 +SCOREFILE= /var/games/golddig.scores + +SUB_FILES= pkg-deinstall pkg-install +SUB_LIST= SCOREFILE="${SCOREFILE}" DESKTOP_ENTRIES="Gold Digger" "" "" "${PORTNAME}" "" "" -NO_STAGE= yes post-patch: @${GREP} -lR "@PREFIX@" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \ 's|@PREFIX@|${PREFIX}|' diff --git a/games/golddig/files/patch-Makefile b/games/golddig/files/patch-Makefile new file mode 100644 index 000000000000..33656264b813 --- /dev/null +++ b/games/golddig/files/patch-Makefile @@ -0,0 +1,50 @@ +--- Makefile.orig 2008-11-25 00:26:32.000000000 +0300 ++++ Makefile 2014-05-26 13:44:10.000000000 +0400 +@@ -49,36 +49,29 @@ + # + # + BSD_INSTALL_GAME_DIR?= \ +- ${INSTALL} -d -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEDIRMODE} ++ ${INSTALL} -d + # + BSD_INSTALL_GAME?= \ +- ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${GAMEOWN} \ +- -g ${GAMEGRP} -m ${GAMEMODE} ++ ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} \ ++ -m ${GAMEMODE} + # + BSD_INSTALL_GAME_DATA?= \ +- ${INSTALL} ${COPY} -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEDATAMODE} ++ ${INSTALL} ${COPY} -m ${GAMEDATAMODE} + # + BSD_INSTALL_MAN?= \ +- ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} ++ ${INSTALL} ${COPY} -m ${MANMODE} + # + + + all: ${GAME} ${EDITOR} + + install: ${GAME} ${EDITOR} +- ${BSD_INSTALL_GAME_DIR} ${LIB} +- ${BSD_INSTALL_GAME} ${GAME} ${BIN} +- ${BSD_INSTALL_GAME} ${EDITOR} ${BIN} +- ${BSD_INSTALL_GAME_DIR} /var/games +- touch golddig.scores +- ${BSD_INSTALL_GAME_DATA} golddig.scores /var/games/golddig.scores +- ${BSD_INSTALL_GAME_DATA} levs/goldlev* levs/default ${LIB} +- ${BSD_INSTALL_MAN} golddig.6 ${MAN}/golddig.${MANEXT} +- ${BSD_INSTALL_MAN} gdedit.6 ${MAN}/gdedit.${MANEXT} +- chgrp ${SCORE_GROUP} ${BIN}/${GAME} +- chmod g+s ${BIN}/${GAME} +- chgrp ${SCORE_GROUP} /var/games/golddig.scores +- chmod 0664 /var/games/golddig.scores ++ ${BSD_INSTALL_GAME_DIR} ${DESTDIR}${LIB} ++ ${BSD_INSTALL_GAME} ${GAME} ${DESTDIR}${BIN} ++ ${BSD_INSTALL_GAME} ${EDITOR} ${DESTDIR}${BIN} ++ ${BSD_INSTALL_GAME_DATA} levs/goldlev* levs/default ${DESTDIR}${LIB} ++ ${BSD_INSTALL_MAN} golddig.6 ${DESTDIR}${MAN}/golddig.${MANEXT} ++ ${BSD_INSTALL_MAN} gdedit.6 ${DESTDIR}${MAN}/gdedit.${MANEXT} + + update: ${GAME} ${EDITOR} + cp ${GAME} ${EDITOR} ${BIN} diff --git a/games/golddig/files/pkg-deinstall.in b/games/golddig/files/pkg-deinstall.in new file mode 100644 index 000000000000..acf057d07892 --- /dev/null +++ b/games/golddig/files/pkg-deinstall.in @@ -0,0 +1,16 @@ +#!/bin/sh +# +# $FreeBSD$ + +[ "$2" != "POST-DEINSTALL" ] && exit 0 + +if [ -s "%%SCOREFILE%%" ]; then + echo + echo "To completely remove the port, please remove the following" + echo "file manually, if it's no longer needed:" + echo + echo " %%SCOREFILE%%" + echo +else + rm -f "%%SCOREFILE%%" +fi diff --git a/games/golddig/files/pkg-install.in b/games/golddig/files/pkg-install.in new file mode 100644 index 000000000000..ca48274b2c5f --- /dev/null +++ b/games/golddig/files/pkg-install.in @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $FreeBSD$ + +[ "$2" != "POST-INSTALL" ] && exit 0 +[ -e "%%SCOREFILE%%" ] && exit 0 + +touch "%%SCOREFILE%%" +chgrp games "%%SCOREFILE%%" +chmod g+w "%%SCOREFILE%%" diff --git a/games/golddig/pkg-install b/games/golddig/pkg-install deleted file mode 100644 index a26303a0056a..000000000000 --- a/games/golddig/pkg-install +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -SCOREDIR="/var/games" -SCOREFILE="/var/games/golddig.scores" - -[ "$2" != "POST-INSTALL" -o -f "$SCOREFILE" ] && exit 0 - -mkdir -p $SCOREDIR -touch $SCOREFILE -chown root:games $SCOREFILE -chmod 664 $SCOREFILE diff --git a/games/golddig/pkg-plist b/games/golddig/pkg-plist index 2b4e25db71c7..f966815e44fa 100644 --- a/games/golddig/pkg-plist +++ b/games/golddig/pkg-plist @@ -1,5 +1,11 @@ bin/gdedit +@group games +@mode 2555 bin/golddig +@mode +@group +man/man6/gdedit.6.gz +man/man6/golddig.6.gz %%DATADIR%%/default %%DATADIR%%/goldlev001 %%DATADIR%%/goldlev002 @@ -28,4 +34,3 @@ bin/golddig %%DATADIR%%/goldlev025 %%DATADIR%%/goldlev026 @dirrm %%DATADIR%% -@unexec [ -s /var/games/golddig.scores ] || rm -f /var/games/golddig.scores |