blob: 570930a4321361a3e773de4140ef3b4c5de4beec (
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
|
# $NetBSD: Makefile,v 1.68 2019/08/23 13:32:30 nia Exp $
DISTNAME= inspircd-2.0.28
CATEGORIES= chat
MASTER_SITES= ${MASTER_SITE_GITHUB:=inspircd/}
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= nia@NetBSD.org
HOMEPAGE= https://www.inspircd.org/
COMMENT= Modular Internet Relay Chat (IRC) server (v2 branch)
LICENSE= gnu-gpl-v2
EXTRACT_USING= bsdtar
USE_TOOLS+= perl pkg-config
USE_LANGUAGES= c c++
HAS_CONFIGURE= yes
MAKE_FILE= BSDmakefile
BUILD_DEFS+= PKG_SYSCONFDIR
PKG_SYSCONFSUBDIR= inspircd
CONFIGURE_ARGS+= --with-cc="${CXX} ${CXXFLAGS} ${LDFLAGS}"
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --module-dir=${PREFIX}/lib/inspircd/modules
CONFIGURE_ARGS+= --config-dir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --data-dir=${PREFIX}/inspircd/data
CONFIGURE_ARGS+= --log-dir=${PREFIX}/inspircd/logs
CONFIG_SHELL= ${PERL5}
.include "../../mk/bsd.prefs.mk"
INSPIRCD_USER?= inspircd
INSPIRCD_GROUP?= inspircd
PKG_GROUPS= ${INSPIRCD_GROUP}
PKG_USERS= ${INSPIRCD_USER}:${INSPIRCD_GROUP}
PKG_GROUPS_VARS= INSPIRCD_USER
PKG_USERS_VARS= INSPIRCD_GROUP
FILES_SUBST+= INSPIRCD_GROUP=${INSPIRCD_GROUP:Q}
FILES_SUBST+= INSPIRCD_USER=${INSPIRCD_USER:Q}
OWN_DIRS_PERMS+= ${PREFIX}/inspircd ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755
OWN_DIRS_PERMS+= ${PREFIX}/inspircd/data ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755
OWN_DIRS_PERMS+= ${PREFIX}/inspircd/logs ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755
RCD_SCRIPTS= inspircd
EGDIR= ${PREFIX}/share/examples/inspircd
CONF_FILES+= ${EGDIR}/motd.txt ${PKG_SYSCONFDIR}/motd.txt
CONF_FILES+= ${EGDIR}/rules.txt ${PKG_SYSCONFDIR}/rules.txt
CONF_FILES+= ${EGDIR}/inspircd.conf ${PKG_SYSCONFDIR}/inspircd.conf
CONF_FILES+= ${EGDIR}/links.conf ${PKG_SYSCONFDIR}/links.conf
CONF_FILES+= ${EGDIR}/modules.conf ${PKG_SYSCONFDIR}/modules.conf
CONF_FILES+= ${EGDIR}/opers.conf ${PKG_SYSCONFDIR}/opers.conf
CONF_FILES+= ${EGDIR}/motd.txt ${PKG_SYSCONFDIR}/motd.txt
CONF_FILES+= ${EGDIR}/rules.txt ${PKG_SYSCONFDIR}/rules.txt
SUBST_CLASSES+= conf
SUBST_STAGE.conf= pre-configure
SUBST_MESSAGE.conf= Set variables in configuration file.
SUBST_FILES.conf+= conf/inspircd.conf
SUBST_VARS.conf= PREFIX
SUBST_VARS.conf+= PKG_SYSCONFDIR
INSTALLATION_DIRS+= ${EGDIR}
.include "options.mk"
post-configure:
.for extra in ${INSPIRCD_EXTRAS}
cd ${WRKSRC} && ${CONFIGURE_ENV} ${PERL5} ./configure --enable-extras=${extra}
.endfor
post-extract:
${MKDIR} ${WRKSRC}/conf
${CP} ${FILESDIR}/*.conf ${WRKSRC}/conf
post-install:
${RM} -f ${DESTDIR}${PREFIX}/.gdbargs
${INSTALL_DATA} ${DESTDIR}${PKG_SYSCONFDIR}/examples/motd.txt.example ${DESTDIR}${EGDIR}/motd.txt
${INSTALL_DATA} ${DESTDIR}${PKG_SYSCONFDIR}/examples/rules.txt.example ${DESTDIR}${EGDIR}/rules.txt
${RM} -rf ${DESTDIR}${PKG_SYSCONFDIR}/examples
${INSTALL_DATA} ${WRKSRC}/conf/*.conf ${DESTDIR}${EGDIR}
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|