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 (+37 lines)
Added Link Here
1
PORTNAME=	pounce
2
DISTVERSION=	2.4
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}/var/run/calico
33
.for b in calico pounce
34
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${b}
35
.endfor
36
37
.include <bsd.port.post.mk>
(-)b/irc/pounce/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1622139837
2
SHA256 (pounce-2.4.tar.gz) = 0fe406700a80798eb669db90bef73cc4a644a29a2a36ea7178fed73623050a21
3
SIZE (pounce-2.4.tar.gz) = 51453
(-)b/irc/pounce/files/calico.in (+37 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: calico
4
# REQUIRE: LOGIN
5
# KEYWORD: shutdown
6
7
# Add the following lines to /etc/rc.conf to enable calico:
8
#
9
# calico_enable="YES"
10
#
11
# The calico socket directory is set by the calico_path variable.
12
# The default is calico_path="/var/run/calico".
13
14
. /etc/rc.subr
15
16
name='calico'
17
rcvar='calico_enable'
18
19
load_rc_config "${name}"
20
21
: ${calico_enable:='NO'}
22
: ${calico_path:="/var/run/${name}"}
23
calico_flags="${calico_flags} ${calico_path}"
24
25
command='/usr/sbin/daemon'
26
procname='%%PREFIX%%/bin/calico'
27
pidfile="/var/run/${name}.pid"
28
required_dirs=$calico_path
29
30
child_flags=$calico_flags
31
child_user=$calico_user
32
unset calico_flags calico_user
33
command_args="\
34
	-p ${pidfile} -T ${name} ${child_user:+-u ${child_user}} \
35
	-- ${procname} ${child_flags}"
36
37
run_rc_command "$1"
(-)b/irc/pounce/files/pounce.in (+78 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: pounce
4
# REQUIRE: LOGIN
5
# KEYWORD: shutdown
6
7
# Add the following lines to /etc/rc.conf to enable pounce:
8
#
9
# pounce_enable="YES"
10
# pounce_user="example"
11
# pounce_flags="example.conf"
12
#
13
# The pounce rc.d script supports multiple profiles. When profiles are
14
# specified, the non-profile-specific parameters become defaults.
15
# Example:
16
#
17
# pounce_enable="YES"
18
# pounce_user="example"
19
# pounce_profiles="server1 server2"
20
# pounce_server1_flags="server1.conf"
21
# pounce_server2_flags="server2.conf"
22
23
. /etc/rc.subr
24
25
name='pounce'
26
rcvar='pounce_enable'
27
extra_commands='reload'
28
sig_reload='USR1'
29
30
load_rc_config "${name}"
31
32
: ${pounce_enable:='NO'}
33
34
command='/usr/sbin/daemon'
35
pidprefix="/var/run/${name}"
36
pidfile="${pidprefix}.pid"
37
38
child_command='%%PREFIX%%/bin/pounce'
39
child_pidfile="${pidprefix}.child.pid"
40
41
if [ -n "$2" ]; then
42
	profile=$2
43
	if [ -n "${pounce_profiles}" ]; then
44
		pidfile="${pidprefix}.${profile}.pid"
45
		child_pidfile="${pidprefix}.${profile}.child.pid"
46
		eval pounce_enable="\${pounce_${profile}_enable:-${pounce_enable}}"
47
		eval pounce_flags="\${pounce_${profile}_flags:-${pounce_flags}}"
48
		eval pounce_user="\${pounce_${profile}_user:-${pounce_user}}"
49
		eval pounce_env="\${pounce_${profile}_env:-${pounce_env}}"
50
		export HOME="$(/usr/bin/getent passwd ${pounce_user} | /usr/bin/cut -d: -f6)"
51
	else
52
		echo "$0: extra argument ignored"
53
	fi
54
else
55
	if [ -n "${pounce_profiles}" -a -n "$1" ]; then
56
		for profile in ${pounce_profiles}; do
57
			echo "===> ${name} profile: ${profile}"
58
			%%PREFIX%%/etc/rc.d/${name} "$1" "${profile}" || exit "$?"
59
		done
60
		exit
61
	fi
62
fi
63
64
child_flags=$pounce_flags
65
child_user=$pounce_user
66
unset pounce_flags pounce_user
67
command_args="\
68
	-r -P ${pidfile} -p ${child_pidfile} -T ${name}${profile:+/${profile}} \
69
	${child_user:+-u ${child_user}} \
70
	-- ${child_command} ${child_flags}"
71
72
pounce_reload() {
73
	rc_pid=$(check_pidfile "$child_pidfile" "$child_command")
74
	kill "-$sig_reload" "$rc_pid"
75
}
76
reload_cmd='pounce_reload'
77
78
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 (+5 lines)
Added Link Here
1
bin/calico
2
bin/pounce
3
man/man1/calico.1.gz
4
man/man1/pounce.1.gz
5
@dir /var/run/calico

Return to bug 246637