diff options
author | Henrik Brix Andersen <brix@FreeBSD.org> | 2008-01-08 20:51:45 +0000 |
---|---|---|
committer | Henrik Brix Andersen <brix@FreeBSD.org> | 2008-01-08 20:51:45 +0000 |
commit | 43ba2e0478faf9d98bb859eb5bc7ee9c8c3efd7e (patch) | |
tree | 1e8ecf4f7fa0d07f9e4bdfdda0b2953821eb2db7 /irc/bitlbee | |
parent | 93392cc22e391128f3c600efcc77cf417099eed0 (diff) | |
download | ports-43ba2e0478faf9d98bb859eb5bc7ee9c8c3efd7e.tar.gz ports-43ba2e0478faf9d98bb859eb5bc7ee9c8c3efd7e.zip |
Notes
Diffstat (limited to 'irc/bitlbee')
-rw-r--r-- | irc/bitlbee/Makefile | 35 | ||||
-rw-r--r-- | irc/bitlbee/files/bitlbee.in | 31 | ||||
-rw-r--r-- | irc/bitlbee/files/pkg-message.in | 27 | ||||
-rw-r--r-- | irc/bitlbee/pkg-plist | 7 |
4 files changed, 83 insertions, 17 deletions
diff --git a/irc/bitlbee/Makefile b/irc/bitlbee/Makefile index 4da96e18ee04..56df8503ad32 100644 --- a/irc/bitlbee/Makefile +++ b/irc/bitlbee/Makefile @@ -7,7 +7,7 @@ PORTNAME= bitlbee PORTVERSION= 1.0.4 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= irc MASTER_SITES= http://get.bitlbee.org/src/ @@ -19,11 +19,14 @@ COMMENT= An IRC to other chat networks gateway SUB_FILES= pkg-message MAN5= bitlbee.conf.5 MAN8= bitlbee.8 +PORTDOCS= AUTHORS CHANGES CREDITS FAQ README +PORTEXAMPLES= bitlbee.conf motd.txt GNU_CONFIGURE= yes USE_GMAKE= yes USE_GNOME= glib20 USE_GETOPT_LONG=yes +USE_RC_SUBR= bitlbee PKGMESSAGE= ${WRKDIR}/pkg-message OPTIONS= MSN "Enable MSN protocol support" On \ @@ -33,7 +36,7 @@ OPTIONS= MSN "Enable MSN protocol support" On \ OPENSSL "Use openssl rather than gnutls" Off \ IPV6 "Compile IPV6 support" On -CONFIGURE_ARGS= --config=${PREFIX}/etc/bitlbee +CONFIGURE_ARGS= --config=/var/db/bitlbee .include <bsd.port.pre.mk> @@ -50,6 +53,7 @@ CONFIGURE_ARGS+=--msn=0 --ssl=bogus .if defined(WITH_OPENSSL) CONFIGURE_ARGS+=--ssl=openssl .else +CONFIGURE_ARGS+=--ssl=gnutls LIB_DEPENDS+= gnutls.13:${PORTSDIR}/security/gnutls .endif @@ -59,9 +63,7 @@ CONFIGURE_ARGS+=--ldap=${LOCALBASE} .endif .if defined(WITH_RECODE) -post-patch:: - @cd ${WRKDIR} && \ - ${PATCH} ${PATCH_ARGS} < ${FILESDIR}/oscar-recode-patch +EXTRA_PATCHES+= ${FILESDIR}/oscar-recode-patch .endif .if defined(WITH_DEBUG) @@ -72,12 +74,29 @@ CONFIGURE_ARGS+=--debug=1 CONFIGURE_ARGS+=--ipv6=0 .endif +post-patch: + @${REINPLACE_CMD} \ + -e "s:/etc/bitlbee/motd.txt:${PREFIX}/etc/bitlbee/motd.txt:" \ + -e "s:/var/lib/bitlbee:/var/db/bitlbee:" \ + ${WRKSRC}/bitlbee.conf + @${REINPLACE_CMD} \ + -e "s:/var/lib/bitlbee:/var/db/bitlbee:" \ + ${WRKSRC}/doc/bitlbee.8 + pre-install: - @${MKDIR} -m 700 ${PREFIX}/etc/bitlbee + ${MKDIR} ${PREFIX}/etc/bitlbee + ${MKDIR} -m 0700 /var/db/bitlbee + ${CHOWN} nobody:nobody /var/db/bitlbee post-install: - @${CP} ${WRKSRC}/bitlbee.conf ${PREFIX}/etc/bitlbee/bitlbee.conf.orig - @${CP} ${WRKSRC}/motd.txt ${PREFIX}/etc/bitlbee/motd.txt.orig +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S@^@${WRKSRC}/doc/@} ${DOCSDIR} +.endif +.if !defined(NOPORTEXAMPLES) + ${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${PORTEXAMPLES:S@^@${WRKSRC}/@} ${EXAMPLESDIR} +.endif @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/irc/bitlbee/files/bitlbee.in b/irc/bitlbee/files/bitlbee.in new file mode 100644 index 000000000000..d28c65f34fb5 --- /dev/null +++ b/irc/bitlbee/files/bitlbee.in @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: bitlbee +# REQUIRE: DAEMON +# KEYWORD: shutdown + +. %%RC_SUBR%% + +name="bitlbee" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${bitlbee_enable="NO"} +: ${bitlbee_user="nobody"} +: ${bitlbee_config="%%PREFIX%%/etc/bitlbee/bitlbee.conf"} +: ${bitlbee_flags=""} + +required_files="${bitlbee_config}" +command="%%PREFIX%%/sbin/bitlbee" +start_cmd="bitlbee_start" + +bitlbee_start() +{ + echo "Starting ${name}." + su -m ${bitlbee_user} -c "${command} -D -c ${bitlbee_config} ${bitlbee_flags}" +} + +run_rc_command "$1" diff --git a/irc/bitlbee/files/pkg-message.in b/irc/bitlbee/files/pkg-message.in index 9651ae72cecc..0baaba16be62 100644 --- a/irc/bitlbee/files/pkg-message.in +++ b/irc/bitlbee/files/pkg-message.in @@ -1,8 +1,23 @@ /************************************************************************ -Remember: - rename %%PREFIX%%/etc/bitlbee/bitlbee.conf.orig - to %%PREFIX%%/etc/bitlbee/bitlbee.conf , - rename %%PREFIX%%/etc/bitlbee/motd.txt.orig - to %%PREFIX%%/etc/bitlbee/motd.txt - and modify them. +To configure bitlbee, do the following: + +Copy %%EXAMPLESDIR%%/bitlbee.conf + to %%PREFIX%%/etc/bitlbee/bitlbee.conf , +Copy %%EXAMPLESDIR%%/motd.txt + to %%PREFIX%%/etc/bitlbee/motd.txt +and modify them to suit your needs. + +You have two options for launching bitlbee: either launch it from +inetd(8) or run it as a stand-alone daemon (experimental). + +To launch bitlbee from inetd(8), add the following line to +/etc/inetd.conf and reload inetd(8): + +ircd stream tcp nowait nobody /usr/local/sbin/bitlbee bitlbee -I + +To instead launch bitlbee as a daemon (experimental), add the +following line to /etc/rc.conf: + +bitlbee_enable="YES" + *************************************************************************/ diff --git a/irc/bitlbee/pkg-plist b/irc/bitlbee/pkg-plist index 5c971aa85e51..697162f22bac 100644 --- a/irc/bitlbee/pkg-plist +++ b/irc/bitlbee/pkg-plist @@ -1,7 +1,8 @@ sbin/bitlbee %%DATADIR%%/help.txt -@exec mkdir -p -m 700 %D/etc/bitlbee -etc/bitlbee/bitlbee.conf.orig -etc/bitlbee/motd.txt.orig @dirrm %%DATADIR%% @dirrmtry etc/bitlbee +@exec mkdir -p %D/etc/bitlbee +@exec mkdir -m 0700 -p /var/db/bitlbee +@exec chown nobody:nobody /var/db/bitlbee +@unexec rmdir /var/db/bitlbee 2>/dev/null || true |