1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- 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
This commit is contained in:
Pawel Pekala 2014-04-11 12:58:55 +00:00
parent f16149caf2
commit 295fd58b92
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=350940
5 changed files with 30 additions and 49 deletions

View File

@ -18,41 +18,32 @@ CONFIGURE_ARGS= --sysconfdir=${LOCALBASE}/etc/conquest \
--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>

View File

@ -0,0 +1,7 @@
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 %%DOCSDIR%%/README.

View File

@ -1,7 +0,0 @@
#!/bin/sh
case "$2" in
POST-INSTALL)
install -d -o root -g conquest -m 770 /var/games/conquest
;;
esac

View File

@ -1,16 +0,0 @@
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:
# 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

View File

@ -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