diff options
author | crees <crees@FreeBSD.org> | 2013-01-18 20:37:43 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2013-01-18 20:37:43 +0800 |
commit | b439b79fa3e4afd956e5a4410f96c07feb251751 (patch) | |
tree | 96c20d201b1a748d0e6e7737a488a3bd07dc8259 /irc/darkbot | |
parent | 0a9fb2e7e59229327d65653cf4de8ebc578cc955 (diff) | |
download | freebsd-ports-gnome-b439b79fa3e4afd956e5a4410f96c07feb251751.tar.gz freebsd-ports-gnome-b439b79fa3e4afd956e5a4410f96c07feb251751.tar.zst freebsd-ports-gnome-b439b79fa3e4afd956e5a4410f96c07feb251751.zip |
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)
Diffstat (limited to 'irc/darkbot')
-rw-r--r-- | irc/darkbot/Makefile | 50 | ||||
-rw-r--r-- | irc/darkbot/files/pkg-message.in | 5 | ||||
-rw-r--r-- | irc/darkbot/pkg-plist | 9 |
3 files changed, 45 insertions, 19 deletions
diff --git a/irc/darkbot/Makefile b/irc/darkbot/Makefile index d9da158351f9..38b7253d7549 100644 --- a/irc/darkbot/Makefile +++ b/irc/darkbot/Makefile @@ -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> diff --git a/irc/darkbot/files/pkg-message.in b/irc/darkbot/files/pkg-message.in new file mode 100644 index 000000000000..76a0e833a0d3 --- /dev/null +++ b/irc/darkbot/files/pkg-message.in @@ -0,0 +1,5 @@ +Before using darkbot, it must be configured. + +Configuration is achieved using: + +# sh %%ETCDIR%%/configure diff --git a/irc/darkbot/pkg-plist b/irc/darkbot/pkg-plist deleted file mode 100644 index 040d0c918038..000000000000 --- a/irc/darkbot/pkg-plist +++ /dev/null @@ -1,9 +0,0 @@ -bin/darkbot -etc/darkbot/dat/info2.db -etc/darkbot/dat/deop.ini -etc/darkbot/dat/perform.ini -etc/darkbot/dat/permbans.db -etc/darkbot/dat/random.ini -etc/darkbot/dat/randomstuff.ini -etc/darkbot/dat/seen.db -@unexec rm -rf /usr/local/etc/darkbot/ /usr/local/bin/darkbot* |