mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
Various improvements:
- Add rc script for running bitlbee in experimental daemon mode - Add instructions for launching bitlbee from inetd(8) - Install bitlbee to be run as nobody, not root - Store saved user settings in /var/db/bitlbee, not $PREFIX/etc/bitlbee - Do not rely on autodetection for SSL library - Use $EXTRA_PATCHES instead of custom post-patch target - Install port documentation files - Install example configuration files as port examples - Reflect custom FreeBSD paths in installed man pages and example files - Bump PORTREVISION Please read UPDATING for important migration information. Approved by: Lars Sommer <lasg@lasg.dk> (maintainer), erwin (mentor)
This commit is contained in:
parent
93392cc22e
commit
43ba2e0478
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=205285
@ -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>
|
||||
|
31
irc/bitlbee-otr/files/bitlbee.in
Normal file
31
irc/bitlbee-otr/files/bitlbee.in
Normal file
@ -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"
|
@ -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"
|
||||
|
||||
*************************************************************************/
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
31
irc/bitlbee/files/bitlbee.in
Normal file
31
irc/bitlbee/files/bitlbee.in
Normal file
@ -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"
|
@ -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"
|
||||
|
||||
*************************************************************************/
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user