Support STAGE

I don't use this software but I'm sure someone out there does.
This commit is contained in:
Mark Felder 2014-07-29 14:12:47 +00:00
parent 9fb3cddb69
commit d527d832e4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=363324
2 changed files with 29 additions and 19 deletions

View File

@ -16,14 +16,14 @@ LIB_DEPENDS= libtai.so:${PORTSDIR}/devel/libtai
ALL_TARGET= it
INSTALL_TARGET= setup check
MAN1= clockadd.1 clockspeed.1 clockview.1 sntpclock.1 \
MAN_FILES= clockadd.1 clockspeed.1 clockview.1 sntpclock.1 \
taiclock.1 taiclockd.1
BIN_FILES= clockadd clockspeed clockview sntpclock taiclock taiclockd
PREFIX_FIX_FILES= leapsecs_read.c INSTALL
CLOCKSPEED_RC_SCRIPT_SAMPLE= ${FILESDIR}/clockspeed.sh.sample
RC_SCRIPT_STARTUP_DIR= ${PREFIX}/etc/rc.d
NO_STAGE= yes
.include <bsd.port.pre.mk>
post-extract:
@ -47,21 +47,29 @@ do-configure:
@${ECHO_CMD} ${PREFIX} > ${WRKSRC}/conf-home
post-build:
@${CP} ${FILESDIR}/leapsecs.dat ${WRKSRC}/leapsecs.dat
${CP} ${FILESDIR}/leapsecs.dat ${WRKSRC}/leapsecs.dat
do-install:
.for i in ${BIN_FILES}
${INSTALL} ${WRKSRC}/${i} ${STAGEDIR}/${PREFIX}/bin/
.endfor
.for i in ${MAN_FILES}
${INSTALL} ${WRKSRC}/${i} ${STAGEDIR}/${PREFIX}/man/man1/
.endfor
${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 755 \
${STAGEDIR}/${PREFIX}/etc/clockspeed
${INSTALL_DATA} ${WRKSRC}/leapsecs.dat ${STAGEDIR}/${ETCDIR}
${INSTALL_SCRIPT} ${WRKDIR}/${CLOCKSPEED_RC_SCRIPT_SAMPLE:T} \
${STAGEDIR}/${RC_SCRIPT_STARTUP_DIR}/${CLOCKSPEED_RC_SCRIPT_SAMPLE:T}
post-install:
.if !defined(NOPORTDOCS)
.if ${PORT_OPTIONS:MDOCS}
@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 755 \
${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}
${STAGEDIR}/${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/INSTALL ${STAGEDIR}/${DOCSDIR}
@${INSTALL_DATA} ${PKGMESSAGE} \
${DOCSDIR}/INSTALL-FreeBSD
${STAGEDIR}/${DOCSDIR}/INSTALL-FreeBSD
.endif
@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 755 \
${PREFIX}/etc/clockspeed
@${INSTALL_DATA} ${WRKSRC}/leapsecs.dat ${PREFIX}/etc/clockspeed
@${INSTALL_SCRIPT} ${WRKDIR}/${CLOCKSPEED_RC_SCRIPT_SAMPLE:T} \
${RC_SCRIPT_STARTUP_DIR}/${CLOCKSPEED_RC_SCRIPT_SAMPLE:T}
@${SED} s!/usr/local/!${PREFIX}/! ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -8,11 +8,13 @@ bin/taiclockd
%%PORTDOCS%%%%DOCSDIR%%/INSTALL-FreeBSD
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@mode 0755
@exec mkdir %D/etc/clockspeed
etc/clockspeed/leapsecs.dat
@unexec if [ -f %D/etc/rc.d/clockspeed.sh ]; then cmp -s %D/etc/rc.d/clockspeed.sh.sample %D/etc/rc.d/clockspeed.sh && rm -f %D/etc/rc.d/clockspeed.sh || echo "If you are permanently removing this port, you should do a ``rm -f ${PKG_PREFIX}/etc/rc.d/clockspeed.sh`` to remove startup files left." | fmt ; fi
etc/rc.d/clockspeed.sh.sample
@unexec rm %D/etc/clockspeed/atto.tmp 2>/dev/null || true
@unexec rm %D/etc/clockspeed/atto 2>/dev/null || true
@unexec rm %D/etc/clockspeed/adjust 2>/dev/null || true
@unexec rmdir %D/etc/clockspeed 2>/dev/null || echo "If you are permanently removing this port, you should do a ``rm -Rf ${PKG_PREFIX}/etc/clockspeed`` to remove any configuration files left." | fmt
@sample etc/rc.d/clockspeed.sh.sample
man/man1/clockadd.1.gz
man/man1/clockspeed.1.gz
man/man1/clockview.1.gz
man/man1/sntpclock.1.gz
man/man1/taiclock.1.gz
man/man1/taiclockd.1.gz
@dirrmtry %%ETCDIR%%
@unexec echo "If you are permanently removing this port, you should do a ``rm -Rf ${PKG_PREFIX}/etc/clockspeed`` to remove any configuration files left." | fmt