summaryrefslogtreecommitdiff
path: root/chat/ircu/Makefile
blob: 0bff8021baf30720de5cbe738508f1825d351ce1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# $NetBSD: Makefile,v 1.28 2007/07/04 20:54:32 jlam Exp $
#

DISTNAME=	ircu2.10.12.10
PKGNAME=	${DISTNAME:S/ircu2/ircu-2/}
CATEGORIES=	chat
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=undernet-ircu/}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://coder-com.undernet.org/
COMMENT=	Internet Relay Chat server customized for Undernet

CONFLICTS+=	ircd-hybrid-[0-9]*

GNU_CONFIGURE=	YES

CONFIGURE_ARGS+=	--bindir=${PREFIX}/sbin
CONFIGURE_ARGS+=	--with-cpath=${PKG_SYSCONFDIR}/ircd.conf
CONFIGURE_ARGS+=	--with-dpath=${DATADIR}
CONFIGURE_ARGS+=	--with-lpath=${DATADIR}/ircd.log
CONFIGURE_ARGS+=	--with-mode=555
CONFIGURE_ARGS+=	--with-owner=0
CONFIGURE_ARGS+=	--with-group=0
CONFIGURE_ARGS+=	--with-symlink=no

PKG_SYSCONFSUBDIR=	ircd

.include "../../mk/bsd.prefs.mk"

IRCD_USER?=		ircd
IRCD_GROUP?=		ircd
PKG_USERS_VARS+=	IRCD_USER
PKG_GROUPS_VARS+=	IRCD_GROUP

DATADIR=		${VARBASE}/ircd
OWN_DIRS_PERMS=		${DATADIR} ${IRCD_USER} ${IRCD_GROUP} 0700
EGDIR=			${PREFIX}/share/examples/ircd
DOCDIR=			${PREFIX}/share/doc/ircd
BUILD_DEFS+=		VARBASE

CONF_FILES_PERMS+=	${EGDIR}/example.conf ${PKG_SYSCONFDIR}/ircd.conf \
			${IRCD_USER} ${IRCD_GROUP} 0600

PKG_SYSCONFDIR_PERMS=	${IRCD_USER} ${IRCD_GROUP} 0700

RCD_SCRIPTS=		ircd

FILES_SUBST+=		IRCD_USER=${IRCD_USER:Q}
MESSAGE_SUBST+=		IRCD_USER=${IRCD_USER}
MESSAGE_SUBST+=		IRCD_GROUP=${IRCD_GROUP}

PKG_GROUPS=		${IRCD_GROUP}
PKG_USERS=		${IRCD_USER}:${IRCD_GROUP}

PKG_GECOS.${IRCD_USER}=	IRC server user
PKG_SHELL.${IRCD_USER}=	${SH}

INSTALLATION_DIRS=	${PKGMANDIR}/man8 sbin

do-install:
	${INSTALL_DATA_DIR} ${DOCDIR}
	${INSTALL_DATA_DIR} ${EGDIR}
	${INSTALL_PROGRAM} ${WRKSRC}/ircd/ircd ${PREFIX}/sbin
	${INSTALL_PROGRAM} ${WRKSRC}/ircd/umkpasswd ${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/ircd/convert-conf \
		${PREFIX}/bin/uconvert-conf
	${INSTALL_MAN} ${WRKSRC}/doc/ircd.8 ${PREFIX}/${PKGMANDIR}/man8
	${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/RELEASE.NOTES ${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/doc/readme.* ${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/doc/*.html ${DOCDIR}

.include "../../mk/bsd.pkg.mk"