View | Details | Raw Unified | Return to bug 246637 | Differences between
and this patch

Collapse All | Expand All

(-)b/irc/Makefile (+1 lines)
Lines 84-89 Link Here
84
    SUBDIR += pircbot
84
    SUBDIR += pircbot
85
    SUBDIR += pisg
85
    SUBDIR += pisg
86
    SUBDIR += polari
86
    SUBDIR += polari
87
    SUBDIR += pounce
87
    SUBDIR += py-fishcrypt
88
    SUBDIR += py-fishcrypt
88
    SUBDIR += py-irc
89
    SUBDIR += py-irc
89
    SUBDIR += py-limnoria
90
    SUBDIR += py-limnoria
(-)b/irc/pounce/Makefile (+38 lines)
Added Link Here
1
PORTNAME=	pounce
2
DISTVERSION=	2.3
3
CATEGORIES=	irc
4
MASTER_SITES=	https://git.causal.agency/pounce/snapshot/
5
6
MAINTAINER=	june@causal.agency
7
COMMENT=	Multi-client IRC bouncer
8
9
LICENSE=	GPLv3+
10
LICENSE_FILE=	${WRKSRC}/LICENSE
11
12
USES=		localbase:ldflags ssl
13
USE_RC_SUBR=	calico pounce
14
15
MAKE_ENV+=	MANDIR=${MANPREFIX}/man
16
CFLAGS+=	-D'OPENSSL_BIN=\"${OPENSSL_BIN}\"'
17
CFLAGS+=	-D'CERTBOT_PATH=\"${LOCALBASE}/etc/letsencrypt\"'
18
19
.include <bsd.port.pre.mk>
20
21
.if ${SSL_DEFAULT} == base || ${SSL_DEFAULT} == openssl
22
LIB_DEPENDS+=	libtls.so:security/libretls
23
.endif
24
25
.if ${SSL_DEFAULT} == base
26
OPENSSL_BIN=/usr/bin/openssl
27
.else
28
OPENSSL_BIN=${LOCALBASE}/bin/openssl
29
.endif
30
31
post-install:
32
	@${MKDIR} ${STAGEDIR}${ETCDIR}
33
	@${MKDIR} ${STAGEDIR}/var/run/calico
34
.for b in calico pounce
35
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${b}
36
.endfor
37
38
.include <bsd.port.post.mk>
(-)b/irc/pounce/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1620429245
2
SHA256 (pounce-2.3.tar.gz) = 47e77cf01ccd94c6ecb83410d7f832426de61e28573b7aa4ac60fec5ac3f468b
3
SIZE (pounce-2.3.tar.gz) = 49151
(-)b/irc/pounce/files/calico.in (+30 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: calico
4
# REQUIRE: LOGIN
5
# KEYWORD: shutdown
6
7
. /etc/rc.subr
8
9
name='calico'
10
rcvar='calico_enable'
11
12
load_rc_config "${name}"
13
14
: ${calico_enable:='NO'}
15
: ${calico_path:="/var/run/${name}"}
16
calico_flags="${calico_flags} ${calico_path}"
17
18
command='/usr/sbin/daemon'
19
procname='%%PREFIX%%/bin/calico'
20
pidfile="/var/run/${name}.pid"
21
required_dirs=$calico_path
22
23
child_flags=$calico_flags
24
child_user=$calico_user
25
unset calico_flags calico_user
26
command_args="\
27
	-p ${pidfile} -T ${name} ${child_user:+-u ${child_user}} \
28
	-- ${procname} ${child_flags}"
29
30
run_rc_command "$1"
(-)b/irc/pounce/files/pounce.in (+65 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: pounce
4
# REQUIRE: LOGIN
5
# KEYWORD: shutdown
6
7
. /etc/rc.subr
8
9
name='pounce'
10
rcvar='pounce_enable'
11
extra_commands='reload'
12
sig_reload='USR1'
13
14
load_rc_config "${name}"
15
16
: ${pounce_enable:='NO'}
17
: ${pounce_chdir:="%%PREFIX%%/etc/${name}"}
18
19
command='/usr/sbin/daemon'
20
pidprefix="/var/run/${name}"
21
pidfile="${pidprefix}.pid"
22
required_dirs=$pounce_chdir
23
24
child_command='%%PREFIX%%/bin/pounce'
25
child_pidfile="${pidprefix}.child.pid"
26
27
if [ -n "$2" ]; then
28
	profile=$2
29
	if [ -n "${pounce_profiles}" ]; then
30
		pidfile="${pidprefix}.${profile}.pid"
31
		child_pidfile="${pidprefix}.${profile}.child.pid"
32
		eval pounce_enable="\${pounce_${profile}_enable:-${pounce_enable}}"
33
		eval pounce_flags="\${pounce_${profile}_flags:-${pounce_flags}}"
34
		eval pounce_chdir="\${pounce_${profile}_chdir:-${pounce_chdir}}"
35
		eval pounce_user="\${pounce_${profile}_user:-${pounce_user}}"
36
		eval pounce_env="\${pounce_${profile}_env:-${pounce_env}}"
37
		export HOME="$(/usr/bin/getent passwd ${pounce_user} | /usr/bin/cut -d: -f6)"
38
	else
39
		echo "$0: extra argument ignored"
40
	fi
41
else
42
	if [ -n "${pounce_profiles}" -a -n "$1" ]; then
43
		for profile in ${pounce_profiles}; do
44
			echo "===> ${name} profile: ${profile}"
45
			%%PREFIX%%/etc/rc.d/${name} "$1" "${profile}" || exit "$?"
46
		done
47
		exit
48
	fi
49
fi
50
51
child_flags=$pounce_flags
52
child_user=$pounce_user
53
unset pounce_flags pounce_user
54
command_args="\
55
	-r -P ${pidfile} -p ${child_pidfile} -T ${name}${profile:+/${profile}} \
56
	${child_user:+-u ${child_user}} \
57
	-- ${child_command} ${child_flags}"
58
59
pounce_reload() {
60
	rc_pid=$(check_pidfile "$child_pidfile" "$child_command")
61
	kill "-$sig_reload" "$rc_pid"
62
}
63
reload_cmd='pounce_reload'
64
65
run_rc_command "$1"
(-)b/irc/pounce/pkg-descr (+5 lines)
Added Link Here
1
pounce is a multi-client, TLS-only IRC bouncer. It takes a simple
2
approach, using a multiple-consumer ring buffer and the IRCv3.2
3
server-time extension to communicate with clients.
4
5
WWW: https://git.causal.agency/pounce/
(-)b/irc/pounce/pkg-plist (+6 lines)
Added Link Here
1
bin/calico
2
bin/pounce
3
man/man1/calico.1.gz
4
man/man1/pounce.1.gz
5
@dir etc/pounce
6
@dir /var/run/calico

Return to bug 246637