summaryrefslogtreecommitdiff
path: root/irc
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-10-27 22:18:13 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-10-27 22:18:13 +0000
commit9895e601382e2c62e1f7d8c8482945027daa6785 (patch)
tree68f869215ad15bc33927c701fc9fabc0ce44e560 /irc
parent- Fixed CONFLICTS (diff)
- Tidy-up
- Improved config handling PR: 117547 Submitted by: Lewis <moggie@elasticmind.net> (maintainer)
Notes
Notes: svn path=/head/; revision=202190
Diffstat (limited to 'irc')
-rw-r--r--irc/ratbox-services/Makefile10
-rw-r--r--irc/ratbox-services/files/pkg-message.in4
-rw-r--r--irc/ratbox-services/pkg-descr2
-rw-r--r--irc/ratbox-services/pkg-plist4
4 files changed, 14 insertions, 6 deletions
diff --git a/irc/ratbox-services/Makefile b/irc/ratbox-services/Makefile
index 439bed9bec41..cb768afeca96 100644
--- a/irc/ratbox-services/Makefile
+++ b/irc/ratbox-services/Makefile
@@ -6,12 +6,13 @@
PORTNAME= ratbox-services
PORTVERSION= 1.1.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= irc
MASTER_SITES= ftp://ftp.ircd-ratbox.org/pub/ircd-ratbox/${PORTNAME}/ \
ftp://ftp.demon.co.uk/pub/mirrors/ircd-ratbox/${PORTNAME}/ \
http://services.ircd-ratbox.org/download/ \
- ftp://ftp.parodius.com/pub/ircd-ratbox/${PORTNAME}/
+ ftp://ftp.parodius.com/pub/ircd-ratbox/${PORTNAME}/ \
+ http://services.ircd-ratbox.org/download/old/
EXTRACT_SUFX= .tgz
PATCH_SITES= http://www.elasticmind.net/freebsd/ports/distfiles/ \
@@ -183,6 +184,11 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/UPGRADING ${DOCSDIR}/UPGRADING
${INSTALL_DATA} ${WRKSRC}/DBMOVE ${DOCSDIR}/DBMOVE
+ @if [ ! -f ${PREFIX}/etc/ratbox-services.conf ]; then \
+ ${ECHO} "Installing default configuration file."; \
+ ${CP} -p ${PREFIX}/etc/ratbox-services.conf.sample ${PREFIX}/etc/ratbox-services.conf ; \
+ fi
+
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
diff --git a/irc/ratbox-services/files/pkg-message.in b/irc/ratbox-services/files/pkg-message.in
index 8fc6f848c92c..422e59db2ad1 100644
--- a/irc/ratbox-services/files/pkg-message.in
+++ b/irc/ratbox-services/files/pkg-message.in
@@ -1,8 +1,8 @@
------------------------------------------------------------------------
ratbox-services has been successfully installed.
-You should now copy %%PREFIX%%/etc/ratbox-services.conf.sample to
-%%PREFIX%%/etc/ratbox-services.conf, and edit it as per the
+A sample configuration file 'ratbox-services.conf' has been created in
+'%%PREFIX%%/etc/', you should edit this file as per the
ratbox-services documentation. This file is required to start services.
You may also need to perform the following steps, if you have not
diff --git a/irc/ratbox-services/pkg-descr b/irc/ratbox-services/pkg-descr
index d6716f6b0c52..0a684b402e75 100644
--- a/irc/ratbox-services/pkg-descr
+++ b/irc/ratbox-services/pkg-descr
@@ -2,7 +2,7 @@ ratbox-services is a services package written mostly from scratch for
use with ircd-ratbox.
It is highly configurable, with nearly all options being set in a config
-that can be rehashed rather than set at compile time. As well supporting
+that can be rehashed rather than set at compile time. As well as supporting
standard database backends like PostgreSQL, its default is to use
the SQLite database backend, which works as a database interface to a normal
file, meaning no seperate database software must be running.
diff --git a/irc/ratbox-services/pkg-plist b/irc/ratbox-services/pkg-plist
index 15dbb85cd4a9..c1694658a6e6 100644
--- a/irc/ratbox-services/pkg-plist
+++ b/irc/ratbox-services/pkg-plist
@@ -16,7 +16,6 @@
%%DOCSDIR%%/INSTALL.sqlite
%%DOCSDIR%%/UPGRADING
%%DOCSDIR%%/DBMOVE
-etc/ratbox-services.conf.sample
sbin/ratbox-services
include/setup.h
include/rserv.h
@@ -201,5 +200,8 @@ include/client.h
@dirrm %%DATADIR%%
@dirrmtry %%DBDIR%%
@dirrmtry %%DOCSDIR%%
+@unexec if cmp -s %D/etc/ratbox-services.conf.sample %D/etc/ratbox-services.conf; then rm -f %D/etc/ratbox-services.conf; fi
+etc/ratbox-services.conf.sample
+@exec if [ ! -f %D/etc/ratbox-services.conf ] ; then cp -p %D/%F %B/ratbox-services.conf; fi
@unexec f="/var/log/ratbox-services.log"; if [ ! -s "$f" ]; then rm -f "$f"; fi
@unexec f="/var/run/ratbox-services.pid"; if [ ! -s "$f" ]; then rm -f "$f"; fi