View | Details | Raw Unified | Return to bug 81624
Collapse All | Expand All

(-)ircd-ru/Makefile (-7 / +3 lines)
Lines 18-24 Link Here
18
USE_BZIP2=	yes
18
USE_BZIP2=	yes
19
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
20
USE_REINPLACE=	yes
20
USE_REINPLACE=	yes
21
PKGMESSAGE=	${WRKSRC}/pkg-message
21
SUB_FILES=	pkg-message
22
USE_RC_SUBR=	ircd.sh
22
23
23
VARDIR=		/var
24
VARDIR=		/var
24
PLIST_SUB=	VARDIR=${VARDIR}
25
PLIST_SUB=	VARDIR=${VARDIR}
Lines 94-105 Link Here
94
	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
95
	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
95
96
96
post-install:
97
post-install:
97
	@${INSTALL_SCRIPT} -m 555 ${FILESDIR}/ircd.sh.sample ${PREFIX}/etc/rc.d
98
	@${CHOWN} -R ircd:ircd ${VARDIR}/log/ircd-ru
98
	@${CHOWN} -R ircd:ircd ${PREFIX}/etc/ircd-ru ${DATADIR} ${VARDIR}/log/ircd-ru ${VARDIR}/run/ircd-ru
99
.if !defined(NOPORTDOCS)
100
	@${CHOWN} -R ircd:ircd ${DOCSDIR}
101
.endif
102
	@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' pkg-message > ${PKGMESSAGE}
103
	@${CAT} ${PKGMESSAGE}
99
	@${CAT} ${PKGMESSAGE}
104
100
105
.include <bsd.port.post.mk>
101
.include <bsd.port.post.mk>
(-)ircd-ru/files/ircd.sh.in (+32 lines)
Line 0 Link Here
1
#! /bin/sh
2
3
#
4
# PROVIDE: ircd
5
#
6
# Add the fellowing line to /etc/rc.conf to enable ircd:
7
#
8
# ircd_enable="YES"
9
#
10
11
. "%%RC_SUBR%%"
12
13
name=ircd
14
rcvar=`set_rcvar`
15
16
command=/usr/local/sbin/ircd
17
18
ircd_pidfile="/var/run/ircd-ru/ircd.pid"
19
ircd_required_files="/usr/local/etc/ircd-ru/ircd.conf /usr/local/etc/ircd-ru/ircd.motd /usr/local/etc/ircd-ru/ircd.smotd"
20
ircd_user="ircd"
21
22
pidfile=${ircd_pidfile}
23
required_files=${ircd_required_files}
24
25
ircd_precmd () {
26
	/usr/bin/install -d -o ircd -g ircd /var/run/ircd-ru
27
        eval `/usr/bin/limits -U ${ircd_user} -e`
28
}
29
start_precmd="ircd_precmd"
30
31
load_rc_config ${name}
32
run_rc_command "$1"
(-)ircd-ru/files/ircd.sh.sample (-23 lines)
Lines 1-23 Link Here
1
#!/bin/sh
2
3
PREFIX=$(expr $0 : "\(/.*/\)etc/rc\.d/$(basename $0)\$")
4
5
IRCD=${PREFIX}sbin/ircd
6
7
case "$1" in
8
start)
9
	if [ -x $IRCD ]; then
10
		$IRCD -u ircd -g ircd >/dev/null 2>&1
11
		echo -n ' ircd'
12
	fi
13
	;;
14
stop)
15
	kill `cat /var/run/ircd-ru/ircd.pid` >/dev/null 2>&1
16
	echo -n ' ircd'
17
	;;
18
*)
19
	echo "Usage: `basename $0` {start|stop}" >&2
20
	;;
21
esac
22
23
exit 0
(-)ircd-ru/files/pkg-message.in (+16 lines)
Line 0 Link Here
1
2
----------------------------------------------------
3
4
ircd-RU has now been installed.
5
6
This port create user ircd and group ircd
7
8
You should now edit %%PREFIX%%/ircd-RU/etc/ircd.conf
9
 to suit your needs.
10
 (cp ircd.conf-dist ircd.conf; vi ircd.conf)
11
12
You may then start the server by running:
13
 echo "ircd_enable=\"YES\"" >> /etc/rc.conf
14
 %%PREFIX%%/etc/rc.d/ircd.sh start
15
16
----------------------------------------------------
(-)ircd-ru/pkg-message (-17 lines)
Lines 1-17 Link Here
1
2
----------------------------------------------------
3
4
ircd-RU has now been installed.
5
6
This port create user ircd and group ircd
7
8
You should now edit %%PREFIX%%/ircd-RU/etc/ircd.conf
9
 to suit your needs.
10
 (cp ircd.conf-dist ircd.conf; vi ircd.conf)
11
12
You may then start the server by running:
13
 cd %%PREFIX%%/etc/rc.d/
14
 mv ircd.sh.sample ircd.sh
15
 %%PREFIX%%/etc/rc.d/ircd.sh start
16
17
----------------------------------------------------
(-)ircd-ru/pkg-plist (-4 lines)
Lines 7-13 Link Here
7
etc/ircd-ru/ru_RU.CP1251/ircd.motd-dist
7
etc/ircd-ru/ru_RU.CP1251/ircd.motd-dist
8
etc/ircd-ru/ru_RU.CP1251/ircd.smotd-dist
8
etc/ircd-ru/ru_RU.CP1251/ircd.smotd-dist
9
etc/ircd-ru/ru_RU.KOI8-R/ircd.conf-dist
9
etc/ircd-ru/ru_RU.KOI8-R/ircd.conf-dist
10
etc/rc.d/ircd.sh.sample
11
%%PORTDOCS%%%%DOCSDIR%%/README.Ilines
10
%%PORTDOCS%%%%DOCSDIR%%/README.Ilines
12
%%PORTDOCS%%%%DOCSDIR%%/opers.txt
11
%%PORTDOCS%%%%DOCSDIR%%/opers.txt
13
%%PORTDOCS%%%%DOCSDIR%%/ru_RU.KOI8-R/FAQ
12
%%PORTDOCS%%%%DOCSDIR%%/ru_RU.KOI8-R/FAQ
Lines 27-34 Link Here
27
%%PORTDOCS%%@dirrm %%DOCSDIR%%
26
%%PORTDOCS%%@dirrm %%DOCSDIR%%
28
@exec mkdir -m 755 %%VARDIR%%/log/ircd-ru
27
@exec mkdir -m 755 %%VARDIR%%/log/ircd-ru
29
@exec chown ircd:ircd %%VARDIR%%/log/ircd-ru
28
@exec chown ircd:ircd %%VARDIR%%/log/ircd-ru
30
@exec mkdir -m 755 %%VARDIR%%/run/ircd-ru
31
@exec chown ircd:ircd %%VARDIR%%/run/ircd-ru
32
@unexec rm -R %%VARDIR%%/run/ircd-ru 2>&1 >/dev/null || true
33
@unexec rm -R %%VARDIR%%/log/ircd-ru 2>&1 >/dev/null || true
29
@unexec rm -R %%VARDIR%%/log/ircd-ru 2>&1 >/dev/null || true
34
@unexec (rmdir %D/etc/ircd-ru && pw user del ircd) || echo 'To completely remove this port delete user ircd, group ircd and remove etc/ircd-ru'
30
@unexec (rmdir %D/etc/ircd-ru && pw user del ircd) || echo 'To completely remove this port delete user ircd, group ircd and remove etc/ircd-ru'

Return to bug 81624