# New ports collection makefile for: bctc_rcs_mm # Date created: 6 December 2006 # Whom: bnelson # # $FreeBSD$ # PORTNAME= bctc_rcs_mm PORTVERSION= 2 CATEGORIES= local VALID_CATEGORIES+= ${CATEGORIES} # for local category MAINTAINER= bnelson@baruch.cuny.edu COMMENT= The rcs addition to mergemaster MASTER_FILES= # none DISTFILES= # none NO_BUILD= yes SUB_FILES= pkg-message NO_MTREE= yes CFGFILE= mergemaster.rc PREFIX?= / BINMODE?= 555 post-patch: patch-mmrc patch-rcs_checkin patch-crontab patch-newsyslog patch-mmrc: ${CP} ${FILESDIR}/${CFGFILE}.sample ${WRKDIR}/ ; patch-rcs_checkin: ${CP} ${FILESDIR}/rcs_checkin.sh ${WRKDIR}/ ; patch-crontab: if [ ! "`${GREP} 'rcs_checkin.sh' /etc/crontab`" ] ; then \ ${ECHO_CMD} "0 4 * * * \ root find /etc -type f -exec /usr/local/sbin/rcs_checkin.sh {} \; \ >> /var/log/rcs_checkin.log " >> ${WRKDIR}/crontab ; \ fi ; patch-newsyslog: if [ ! "`${GREP} 'rcs_checkin.log' /etc/newsyslog.conf`" ] ; then \ ${ECHO_CMD} "/var/log/rcs_checkin.log 600 \ 7 100 * J" >> ${WRKDIR}/newsyslog.conf ; \ fi do-install: install-mmrc install-conf install-rcs_checkin install-crontab \ install-newsyslog install-mmrc: ${INSTALL_DATA} ${WRKDIR}/${CFGFILE}.sample /etc install-rcs_checkin: ${INSTALL_SCRIPT} ${WRKDIR}/rcs_checkin.sh /usr/local/sbin install-conf: install-mmrc cd /etc ; \ if ${TEST} ! -f ${CFGFILE} ; then \ ${CP} -p ${WRKDIR}/${CFGFILE}.sample ${CFGFILE} ; \ fi ;\ install-crontab: if [ -f ${WRKDIR}/crontab -a \ ! "`${GREP} 'rcs_checkin.sh' /etc/crontab`" ]; then \ ${ECHO_CMD} "#" >> /etc/crontab; \ ${ECHO_CMD} "# Checkin files at night" >> /etc/crontab ; \ ${CAT} ${WRKDIR}/crontab >> /etc/crontab; \ fi install-newsyslog: if [ -f ${WRKDIR}/newsyslog.conf -a \ ! "`${GREP} 'rcs_checkin.log' /etc/newsyslog.conf`" ]; then \ ${CAT} ${WRKDIR}/newsyslog.conf >> /etc/newsyslog.conf; \ fi post-install: ${CAT} ${PKGMESSAGE} .include