Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2014 12:58:55 +0000 (UTC)
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r350940 - in head/games/conquest: . files
Message-ID:  <201404111258.s3BCwtR5036999@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pawel
Date: Fri Apr 11 12:58:55 2014
New Revision: 350940
URL: http://svnweb.freebsd.org/changeset/ports/350940
QAT: https://qat.redports.org/buildarchive/r350940/

Log:
  - Add staging support
  - Move ownership setting, /var dir creation to pkg-plist
  - Automatically install/remove sample files
  - Update pkg-message info, use SUB_FILES for DOCSDIR sub

Added:
  head/games/conquest/files/pkg-message.in
     - copied, changed from r350904, head/games/conquest/pkg-message
Deleted:
  head/games/conquest/pkg-install
  head/games/conquest/pkg-message
Modified:
  head/games/conquest/Makefile
  head/games/conquest/pkg-plist

Modified: head/games/conquest/Makefile
==============================================================================
--- head/games/conquest/Makefile	Fri Apr 11 12:55:47 2014	(r350939)
+++ head/games/conquest/Makefile	Fri Apr 11 12:58:55 2014	(r350940)
@@ -18,41 +18,32 @@ CONFIGURE_ARGS=	--sysconfdir=${LOCALBASE
 		--localstatedir=/var/games
 CFLAGS+=	-Wno-return-type
 GROUPS=		${PORTNAME}
-BINGRP=		conquest
-SHAREGRP=	conquest
 MAKE_JOBS_UNSAFE=	yes
 PORTDOCS=	README
 
+SUB_FILES=	pkg-message
+
 OPTIONS_DEFINE=	DOCS
 
-NO_STAGE=	yes
 post-patch:
 	${REINPLACE_CMD} "s|^.*@chgrp .(CONQGROUP) conq.*||g; \
 		s|^.*@chmod 2771 conq.*||g;" ${WRKSRC}/Makefile.in
 	${REINPLACE_CMD} "s/# include <termio.h>//g" ${WRKSRC}/c_defs.h
 	${REINPLACE_CMD} "s/-O2 -fPIC//g" ${WRKSRC}/configure
 
-.include <bsd.port.options.mk>
-
 do-install:
-	${INSTALL_PROGRAM} -m 2550 ${WRKSRC}/conqai ${PREFIX}/sbin
-	${INSTALL_PROGRAM} -m 2551 ${WRKSRC}/conqdriv ${PREFIX}/libexec
-	${INSTALL_PROGRAM} -m 2551 ${WRKSRC}/conqoper ${PREFIX}/sbin
-	${INSTALL_PROGRAM} ${WRKSRC}/conqstrat ${PREFIX}/sbin
-	${INSTALL_PROGRAM} -m 2551 ${WRKSRC}/conquest ${PREFIX}/bin
-	@${MKDIR} ${PREFIX}/etc/conquest
-	${INSTALL_DATA} ${WRKSRC}/conqrule \
-		${PREFIX}/etc/conquest/conqrule.sample
-	@${MKDIR} ${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/conqnews.doc ${DATADIR}/conqnews.doc.sample
-	${INSTALL_DATA} ${WRKSRC}/conquest.doc ${DATADIR}
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
-.endif
-	@${SH} pkg-install ${PORTNAME} POST-INSTALL
-
-post-install:
-	@${CAT} ${PKGMESSAGE}
+	${INSTALL_PROGRAM} -m 2550 ${WRKSRC}/conqai ${STAGEDIR}${PREFIX}/sbin
+	${INSTALL_PROGRAM} -m 2551 ${WRKSRC}/conqdriv ${STAGEDIR}${PREFIX}/libexec
+	${INSTALL_PROGRAM} -m 2551 ${WRKSRC}/conqoper ${STAGEDIR}${PREFIX}/sbin
+	${INSTALL_PROGRAM} ${WRKSRC}/conqstrat ${STAGEDIR}${PREFIX}/sbin
+	${INSTALL_PROGRAM} -m 2551 ${WRKSRC}/conquest ${STAGEDIR}${PREFIX}/bin
+	@${MKDIR} ${STAGEDIR}${ETCDIR}
+	${INSTALL_DATA} ${WRKSRC}/conqrule ${STAGEDIR}${ETCDIR}/conqrule.sample
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/conqnews.doc \
+		${STAGEDIR}${DATADIR}/conqnews.doc.sample
+	${INSTALL_DATA} ${WRKSRC}/conquest.doc ${STAGEDIR}${DATADIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>

Copied and modified: head/games/conquest/files/pkg-message.in (from r350904, head/games/conquest/pkg-message)
==============================================================================
--- head/games/conquest/pkg-message	Fri Apr 11 08:25:47 2014	(r350904, copy source)
+++ head/games/conquest/files/pkg-message.in	Fri Apr 11 12:58:55 2014	(r350940)
@@ -1,16 +1,7 @@
-Before Conquest can be run it must be configured. First copy the sample
-configuration into place:
-
-# cp etc/conquest/conqrule.sample etc/conquest/conqrule
-
-Then you can initialise and enable the game:
+Before Conquest can be run it must be configured, you need to
+initialise and enable the game:
 
 # sbin/conqoper -C
 # sbin/conqoper -Ie -E
 
-Conqoper is documented in share/doc/conquest/README.
-
-Also a file for the in-game news must be created. This package includes a
-sample news file you can copy into place:
-
-# cp share/conquest/conqnews.doc.sample share/conquest/conqnews.doc
+Conqoper is documented in %%DOCSDIR%%/README.

Modified: head/games/conquest/pkg-plist
==============================================================================
--- head/games/conquest/pkg-plist	Fri Apr 11 12:55:47 2014	(r350939)
+++ head/games/conquest/pkg-plist	Fri Apr 11 12:58:55 2014	(r350940)
@@ -1,10 +1,16 @@
+@group conquest
 bin/conquest
+@unexec if cmp -s %D/etc/conquest/conqrule.sample %D/etc/conquest/conqrule ; then rm -f %D/etc/conquest/conqrule; fi
 etc/conquest/conqrule.sample
+@exec if [ ! -f %D/etc/conquest/conqrule ] ; then cp -p %D/%F %B/conqrule; fi
 libexec/conqdriv
 sbin/conqai
 sbin/conqoper
 sbin/conqstrat
+@unexec if cmp -s %D/%%DATADIR%%/conqnews.doc.sample %D/%%DATADIR%%/conqnews.doc ; then rm -f %D/%%DATADIR%%/conqnews.doc; fi
 %%DATADIR%%/conqnews.doc.sample
+@exec if [ ! -f %D/%%DATADIR%%/conqnews.doc ] ; then cp -p %D/%F %B/conqnews.doc; fi
 %%DATADIR%%/conquest.doc
-@dirrm etc/conquest
-@dirrm %%DATADIR%%
+@dirrmtry etc/conquest
+@dirrmtry %%DATADIR%%
+@exec install -d -o root -g conquest -m 770 /var/games/conquest || true



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