summaryrefslogtreecommitdiff
path: root/chat/cgiirc/Makefile
blob: ab73b29eefca44e17b421df04c2a2d4c05d6a9ac (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# $NetBSD: Makefile,v 1.3 2005/03/26 09:26:12 adrianp Exp $

DISTNAME=	cgiirc-0.5.6
CATEGORIES=	chat
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=cgiirc/}

MAINTAINER=	adrianp@NetBSD.org
HOMEPAGE=	http://cgiirc.sourceforge.net/
COMMENT=	Access IRC from a web browser

NO_BUILDLINK=	YES
USE_PERL5=	run
NO_BUILD=	YES
USE_PKGINSTALL=	YES

SUBST_CLASSES=		config
SUBST_STAGE.config=	post-patch
SUBST_FILES.config= 	${WRKDIR}/cgiirc.conf
SUBST_SED.config=	-e "s|@CGIIRC@|${CGIIRC}|g"
SUBST_MESSAGE.config=	"Setting defaults in configuration files."

BUILD_DEFS+=	USE_INET6

CONF_FILES=	${PREFIX}/share/examples/cgiirc/cgiirc.conf \
			${PKG_SYSCONFDIR}/cgiirc.conf
CONF_FILES+=	${PREFIX}/share/examples/cgiirc/cgiirc.config \
			${CGIIRC}/cgiirc.config

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

.if defined(USE_INET6) && !empty(USE_INET6:M[Yy][Ee][Ss])
DEPENDS+=	p5-INET6-*:../../net/p5-INET6
.endif

REPLACE_PERL=	client-perl.cgi irc.cgi nph-irc.cgi docs/decode.pl \
		docs/identd.pl viewconnects.pl modules/parse.pl \
		interfaces/interface-make/make-js-interfaces.pl

DOCFILES=	identd.xinetd decode.pl identd.pl viewconnects.pl
EGFILES=	cgiirc.config.full client.c ipaccess.example
CGIIRC=		${PREFIX}/share/cgiirc

pre-patch:
	@${CP} ${FILESDIR}/cgiirc.conf ${WRKDIR}/cgiirc.conf

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/cgiirc
	${INSTALL_DATA_DIR} ${CGIIRC}
	${INSTALL_DATA_DIR} ${CGIIRC}/formats
	${INSTALL_DATA_DIR} ${CGIIRC}/images
	${INSTALL_DATA_DIR} ${CGIIRC}/images/taras
	${INSTALL_DATA_DIR} ${CGIIRC}/interfaces
	${INSTALL_DATA_DIR} ${CGIIRC}/interfaces/interface-make
	${INSTALL_DATA_DIR} ${CGIIRC}/modules
	${INSTALL_DATA_DIR} ${CGIIRC}/modules/IRC
	${INSTALL_DATA_DIR} ${CGIIRC}/modules/IRC/Channel
	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/cgiirc

	${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/cgiirc
.	for f in ${DOCFILES}
		${INSTALL_DATA} ${WRKSRC}/docs/${f} \
			${PREFIX}/share/examples/cgiirc/${f}
.	endfor
.	undef f
	${INSTALL_DATA} ${WRKSRC}/cgiirc.config ${PREFIX}/share/examples/cgiirc
	${INSTALL_DATA} ${WRKDIR}/cgiirc.conf ${PREFIX}/share/examples/cgiirc
.	for f in ${EGFILES}
		${INSTALL_DATA} ${WRKSRC}/${f} \
			${PREFIX}/share/examples/cgiirc/${f}
.	endfor
.	undef f
	${INSTALL_SCRIPT} ${WRKSRC}/*.cgi ${CGIIRC}
	${INSTALL_DATA} ${WRKSRC}/formats/* ${CGIIRC}/formats/
	${INSTALL_DATA} ${WRKSRC}/images/*.gif ${CGIIRC}/images/
	${INSTALL_DATA} ${WRKSRC}/images/*.wav ${CGIIRC}/images/
	${INSTALL_DATA} ${WRKSRC}/images/*.ico ${CGIIRC}/images/
	${INSTALL_DATA} ${WRKSRC}/images/taras/*.gif ${CGIIRC}/images/taras
	${INSTALL_DATA} ${WRKSRC}/interfaces/*.pm ${CGIIRC}/interfaces/
	${INSTALL_DATA} ${WRKSRC}/interfaces/*.css ${CGIIRC}/interfaces/
	${INSTALL_DATA} ${WRKSRC}/interfaces/interface-make/*.pm \
		${CGIIRC}/interfaces/interface-make/
	${INSTALL_SCRIPT} ${WRKSRC}/interfaces/interface-make/*.pl \
		${CGIIRC}/interfaces/interface-make/
	${INSTALL_DATA} ${WRKSRC}/modules/*.pm ${CGIIRC}/modules/
	${INSTALL_SCRIPT} ${WRKSRC}/modules/*.pl ${CGIIRC}/modules/
	${INSTALL_DATA} ${WRKSRC}/modules/IRC/*.pm ${CGIIRC}/modules/IRC/
	${INSTALL_DATA} ${WRKSRC}/modules/IRC/Channel/*.pm \
		${CGIIRC}/modules/IRC/Channel/

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