Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jul 2014 15:49:33 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r362809 - head/games/greed
Message-ID:  <201407241549.s6OFnXed007646@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Thu Jul 24 15:49:33 2014
New Revision: 362809
URL: http://svnweb.freebsd.org/changeset/ports/362809
QAT: https://qat.redports.org/buildarchive/r362809/

Log:
  This port was not stage-safe as it was making direct writes to /var. Fix that,
  along with making do-install substantially easier to read. While here, stop
  muting the build command.

Modified:
  head/games/greed/Makefile
  head/games/greed/pkg-plist

Modified: head/games/greed/Makefile
==============================================================================
--- head/games/greed/Makefile	Thu Jul 24 15:47:04 2014	(r362808)
+++ head/games/greed/Makefile	Thu Jul 24 15:49:33 2014	(r362809)
@@ -15,16 +15,15 @@ LICENSE=	BSD3CLAUSE
 SCOREFILE?=	/var/games/greed.hs
 CFLAGS+=	-DSCOREFILE=\"${SCOREFILE}\" -DNOTBSD -DRELEASE=\"${PORTVERSION}\"
 LDFLAGS+=	-lcurses
+PLIST_SUB+=	SCOREFILE=${SCOREFILE:S|^/||}
 
 do-build:
-	@cd ${WRKSRC}&&${CC} ${CFLAGS} -o greed greed.c ${LDFLAGS}
+	(cd ${WRKSRC} && ${CC} ${CFLAGS} -o greed greed.c ${LDFLAGS})
 
 do-install:
 	${INSTALL_PROGRAM} -m 2555 -o root -g games ${WRKSRC}/greed ${STAGEDIR}${PREFIX}/bin/
 	${INSTALL_MAN} ${WRKSRC}/greed.6 ${STAGEDIR}${MAN6PREFIX}/man/man6/
-	@a=${SCOREFILE};[ -f $$a ]||:>$$a&&${CHOWN} root:games $$a&&${CHMOD} 664 $$a
-	@${ECHO_CMD} '@exec a=${SCOREFILE};[ -f $$a ]||:>$$a&&\
-		${CHOWN} root:games $$a&&${CHMOD} 664 $$a' >> ${TMPPLIST}
-	@${ECHO_CMD} '@unexec a=${SCOREFILE};[ -s $$a ]||${RM} -f $$a' >> ${TMPPLIST}
+	@${MKDIR} ${STAGEDIR}${SCOREFILE:H}
+	${TOUCH} ${STAGEDIR}${SCOREFILE}.sample
 
 .include <bsd.port.mk>

Modified: head/games/greed/pkg-plist
==============================================================================
--- head/games/greed/pkg-plist	Thu Jul 24 15:47:04 2014	(r362808)
+++ head/games/greed/pkg-plist	Thu Jul 24 15:49:33 2014	(r362809)
@@ -1,2 +1,6 @@
 bin/greed
 man/man6/greed.6.gz
+@cwd /
+@group games
+@mode 664
+@sample %%SCOREFILE%%.sample



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