Date: Fri, 18 Jan 2013 12:37:44 +0000 (UTC) From: Chris Rees <crees@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r310601 - in head/irc/darkbot: . files Message-ID: <201301181237.r0ICbim1090050@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: crees Date: Fri Jan 18 12:37:43 2013 New Revision: 310601 URL: http://svnweb.freebsd.org/changeset/ports/310601 Log: Stop being INTERACTIVE No longer clobbers configuration files on install/deinstall (no version bump because current users would have to upgrade for no good reason) Added: head/irc/darkbot/files/pkg-message.in (contents, props changed) Deleted: head/irc/darkbot/pkg-plist Modified: head/irc/darkbot/Makefile Modified: head/irc/darkbot/Makefile ============================================================================== --- head/irc/darkbot/Makefile Fri Jan 18 12:35:17 2013 (r310600) +++ head/irc/darkbot/Makefile Fri Jan 18 12:37:43 2013 (r310601) @@ -1,9 +1,5 @@ -# Ports collection makefile for: Darkbot -# Date created: 24 February 2003 -# Whom: A. Gabriel <backslash@BSDCode.org> -# +# Created by: A. Gabriel <backslash@BSDCode.org> # $FreeBSD$ -# PORTNAME= darkbot PORTVERSION= 6f6.r6 @@ -16,15 +12,49 @@ DISTNAME= ${PORTNAME}-${PORTVERSION:S/./ MAINTAINER= ports@FreeBSD.org COMMENT= IRC talking bot with a very fast algorithm for its database -PLIST= ${WRKDIR}/plist +SUB_FILES= pkg-message MAN1= darkbot.1 MANCOMPRESSED= yes -GNU_CONFIGURE= yes -IS_INTERACTIVE= yes +PORTDOCS= README +PLIST_FILES= bin/darkbot %%ETCDIR%%/logs/.pkgcreate -pre-install: - ${CAT} ${MASTERDIR}/pkg-plist | ${SED} -e "s,/usr/local,${LOCALBASE},g" > ${PLIST} +.include <bsd.port.options.mk> + +post-patch: + ${CP} ${WRKSRC}/configure ${WRKSRC}/config + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1.gz ${MAN1PREFIX}/man/man1/ + +post-install: + ${MKDIR} ${ETCDIR}/dat ${ETCDIR}/logs + ${TOUCH} ${ETCDIR}/logs/.pkgcreate + cd ${WRKSRC}/dat; \ + for file in *; do \ + ${INSTALL_DATA} $$file ${ETCDIR}/dat/$${file}.dist; \ + ${CP} -np ${ETCDIR}/dat/$${file}.dist ${ETCDIR}/dat/$$file; \ + ${ECHO_CMD} "@unexec cmp -s ${ETCDIR}/dat/$$file \ + ${ETCDIR}/dat/$${file}.dist && \ + rm -f ${ETCDIR}/dat/$$file || true" >> ${TMPPLIST}; \ + ${ECHO_CMD} "${ETCDIR_REL}/dat/$${file}.dist" >> ${TMPPLIST}; \ + ${ECHO_CMD} "@exec cp -np %D/%F %B/$$file" >> ${TMPPLIST}; \ + done + ${ECHO_CMD} "@unexec rmdir ${ETCDIR}/logs 2>/dev/null || true" >> ${TMPPLIST} + ${ECHO_CMD} "@unexec rmdir ${ETCDIR}/dat 2>/dev/null || true" >> ${TMPPLIST} + ${ECHO_CMD} "@unexec rmdir ${ETCDIR} 2>/dev/null || true" >> ${TMPPLIST} + ${ECHO_CMD} '#!/bin/sh' > ${WRKSRC}/configure + ${ECHO_CMD} 'cd ${ETCDIR} && ${SH} config' >> ${WRKSRC}/configure +.for s in config configure AddServer Adduser + ${INSTALL_SCRIPT} ${WRKSRC}/$s ${ETCDIR} + ${ECHO_CMD} ${ETCDIR_REL}/$s >> ${TMPPLIST} +.endfor +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/README ${DOCSDIR}/ +.endif + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> Added: head/irc/darkbot/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/irc/darkbot/files/pkg-message.in Fri Jan 18 12:37:43 2013 (r310601) @@ -0,0 +1,5 @@ +Before using darkbot, it must be configured. + +Configuration is achieved using: + +# sh %%ETCDIR%%/configure
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301181237.r0ICbim1090050>