2004-12-28 03:47:40 +01:00
|
|
|
# $NetBSD: Makefile,v 1.14 2004/12/28 02:47:41 reed Exp $
|
2001-10-21 23:26:51 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
DISTNAME= ircd-hybrid-6.2
|
2004-12-28 03:47:40 +01:00
|
|
|
PKGREVISION= 3
|
2001-10-21 23:26:51 +02:00
|
|
|
CATEGORIES= chat
|
2002-05-12 12:16:44 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ircd-hybrid/}
|
2001-10-21 23:26:51 +02:00
|
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
|
|
|
|
MAINTAINER= seb@pbox.org
|
|
|
|
HOMEPAGE= http://www.ircd-hybrid.net/
|
2003-08-12 15:38:54 +02:00
|
|
|
COMMENT= IRC server with many options
|
2001-10-21 23:26:51 +02:00
|
|
|
|
|
|
|
GNU_CONFIGURE= YES
|
|
|
|
|
2004-04-11 18:08:55 +02:00
|
|
|
USE_BUILDLINK3= YES
|
2003-07-29 19:25:58 +02:00
|
|
|
USE_PKGINSTALL= YES
|
2001-10-21 23:26:51 +02:00
|
|
|
|
2003-07-29 22:21:37 +02:00
|
|
|
PKG_SYSCONFSUBDIR= ircd-hybrid
|
|
|
|
IRCD_HYBRID_DPATH= ${PKG_SYSCONFDIR}
|
|
|
|
|
2001-10-21 23:26:51 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2003-06-19 18:21:08 +02:00
|
|
|
.if ${IRCD_HYBRID_SMALL_NET} == "YES"
|
2001-10-21 23:26:51 +02:00
|
|
|
IRCD_HYBRID_LINK_PREALLOCATE?= 64
|
|
|
|
IRCD_HYBRID_CLIENTS_PREALLOCATE?= 64
|
|
|
|
IRCD_HYBRID_USERS_PREALLOCATE?= 64
|
|
|
|
IRCD_HYBRID_NICKNAMEHISTORYLENGTH?= 1000
|
|
|
|
IRCD_HYBRID_MAXSENDQLENGTH?= 500000
|
|
|
|
IRCD_HYBRID_INITIAL_DBUFS?= 300
|
|
|
|
IRCD_HYBRID_HARD_FDLIMIT_?= 90
|
|
|
|
IRCD_HYBRID_INIT_MAXCLIENTS?= 40
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# this is not supposed to be changed
|
|
|
|
IRCD_HYBRID_SPATH= ${PREFIX}/sbin/ircd-hybrid
|
|
|
|
IRCD_HYBRID_SDIR= ${IRCD_HYBRID_SPATH:C|/[^/]*$||}
|
|
|
|
|
|
|
|
# throw all the settings in _DEFS
|
|
|
|
.for def in \
|
|
|
|
IRCD_HYBRID_LINK_PREALLOCATE IRCD_HYBRID_CLIENTS_PREALLOCATE \
|
|
|
|
IRCD_HYBRID_USERS_PREALLOCATE IRCD_HYBRID_NICKNAMEHISTORYLENGTH \
|
|
|
|
IRCD_HYBRID_MAXSENDQLENGTH IRCD_HYBRID_INITIAL_DBUFS \
|
|
|
|
IRCD_HYBRID_HARD_FDLIMIT_ IRCD_HYBRID_INIT_MAXCLIENTS
|
2004-01-22 09:47:32 +01:00
|
|
|
. ifdef ${def}
|
2001-10-21 23:26:51 +02:00
|
|
|
_DEFS+= -D${def:S|^IRCD_HYBRID_||}=${${def}}
|
2004-01-22 09:47:32 +01:00
|
|
|
. endif
|
2001-10-21 23:26:51 +02:00
|
|
|
.endfor
|
|
|
|
.for def in \
|
|
|
|
IRCD_HYBRID_NETWORK_NAME IRCD_HYBRID_NETWORK_DESC
|
2004-01-22 09:47:32 +01:00
|
|
|
. ifdef ${def}
|
2001-10-21 23:26:51 +02:00
|
|
|
_DEFS+= -D${def:S|^IRCD_HYBRID_||}=\"${${def}:Q}\"
|
2004-01-22 09:47:32 +01:00
|
|
|
. endif
|
2001-10-21 23:26:51 +02:00
|
|
|
.endfor
|
|
|
|
.for def in \
|
|
|
|
IRCD_HYBRID_DPATH IRCD_HYBRID_SPATH \
|
|
|
|
IRCD_HYBRID_FNAME_USERLOG IRCD_HYBRID_FNAME_OPERLOG IRCD_HYBRID_PPATH \
|
|
|
|
IRCD_HYBRID_IRC_USER IRCD_HYBRID_IRC_GROUP
|
|
|
|
_DEFS+= -D${def:S|^IRCD_HYBRID_||}=\"${${def}}\"
|
|
|
|
.endfor
|
2003-06-19 18:21:08 +02:00
|
|
|
.if ${IRCD_HYBRID_USE_SYSLOG} == "YES"
|
2001-10-21 23:26:51 +02:00
|
|
|
_DEFS+= -DUSE_SYSLOG=1
|
|
|
|
_DEFS+= -DLOG_FACILITY=${IRCD_HYBRID_SYSLOG_FACILITY}
|
|
|
|
.endif
|
2003-06-19 18:21:08 +02:00
|
|
|
.if ${IRCD_HYBRID_USE_LOGFILE} == "YES"
|
2001-10-21 23:26:51 +02:00
|
|
|
_DEFS+= -DUSE_LOGFILE=1
|
|
|
|
_DEFS+= -DLPATH=\"${IRCD_HYBRID_LPATH}\"
|
|
|
|
.endif
|
|
|
|
_DEFS+= -DINIT_LOG_LEVEL=${IRCD_HYBRID_INIT_LOG_LEVEL}
|
|
|
|
|
|
|
|
# and pass then down to make as DEFS
|
|
|
|
MAKE_FLAGS+= DEFS='${_DEFS}'
|
|
|
|
|
|
|
|
# and few other things for install target
|
|
|
|
MAKE_FLAGS+= SPATH=${IRCD_HYBRID_SPATH} SDIR=${IRCD_HYBRID_SDIR}
|
|
|
|
MAKE_FLAGS+= PREFIX=${PREFIX} DESTDIR=${DESTDIR}
|
|
|
|
|
|
|
|
# for the records
|
|
|
|
.for def in \
|
|
|
|
IRCD_HYBRID_LINK_PREALLOCATE IRCD_HYBRID_CLIENTS_PREALLOCATE \
|
|
|
|
IRCD_HYBRID_USERS_PREALLOCATE IRCD_HYBRID_NICKNAMEHISTORYLENGTH \
|
|
|
|
IRCD_HYBRID_MAXSENDQLENGTH IRCD_HYBRID_INITIAL_DBUFS \
|
|
|
|
IRCD_HYBRID_HARD_FDLIMIT_ IRCD_HYBRID_INIT_MAXCLIENTS \
|
2003-07-29 22:21:37 +02:00
|
|
|
IRCD_HYBRID_NETWORK_NAME IRCD_HYBRID_NETWORK_DESC \
|
2001-10-21 23:26:51 +02:00
|
|
|
IRCD_HYBRID_FNAME_OPERLOG IRCD_HYBRID_PPATH \
|
|
|
|
IRCD_HYBRID_IRC_USER IRCD_HYBRID_IRC_GROUP
|
2004-01-22 09:47:32 +01:00
|
|
|
. ifdef ${def}
|
2001-10-21 23:26:51 +02:00
|
|
|
BUILD_DEFS+= ${def}
|
2004-01-22 09:47:32 +01:00
|
|
|
. endif
|
2001-10-21 23:26:51 +02:00
|
|
|
.endfor
|
|
|
|
.ifdef ${IRCD_HYBRID_USE_SYSLOG} == "YES"
|
|
|
|
BUILD_DEFS+= IRCD_HYBRID_USE_SYSLOG
|
|
|
|
BUILD_DEFS+= IRCD_HYBRID_SYSLOG_FACILITY
|
|
|
|
.else
|
|
|
|
BUILD_DEFS+= IRCD_HYBRID_FNAME_USERLOG
|
|
|
|
.endif
|
2003-06-19 18:21:08 +02:00
|
|
|
.if ${IRCD_HYBRID_USE_LOGFILE} == "YES"
|
2001-10-21 23:26:51 +02:00
|
|
|
BUILD_DEFS+= IRCD_HYBRID_USE_LOGFILE
|
|
|
|
BUILD_DEFS+= IRCD_HYBRID_LPATH
|
|
|
|
.endif
|
|
|
|
|
2003-07-29 19:25:58 +02:00
|
|
|
FILES_SUBST+= PPATH=${IRCD_HYBRID_PPATH:Q}
|
|
|
|
FILES_SUBST+= SPATH=${IRCD_HYBRID_SPATH:Q}
|
|
|
|
FILES_SUBST+= USER=${IRCD_HYBRID_IRC_USER:Q}
|
|
|
|
FILES_SUBST+= DPATH=${IRCD_HYBRID_DPATH:Q}
|
2003-07-29 22:21:37 +02:00
|
|
|
FILES_SUBST+= GROUP=${IRCD_HYBRID_IRC_GROUP}
|
|
|
|
FILES_SUBST+= SYSLOG_FACILITY=${IRCD_HYBRID_SYSLOG_FACILITY}
|
2001-10-21 23:26:51 +02:00
|
|
|
|
2003-07-29 19:25:58 +02:00
|
|
|
RCD_SCRIPTS= ircd-hybrid
|
|
|
|
|
|
|
|
PKG_USERS= ${IRCD_HYBRID_IRC_USER}:${IRCD_HYBRID_IRC_GROUP}::IRC\\ User::/sbin/nologin
|
|
|
|
PKG_GROUPS= ${IRCD_HYBRID_IRC_GROUP}
|
|
|
|
|
2003-07-29 22:21:37 +02:00
|
|
|
SUPPORT_FILES= ${PREFIX}/share/examples/ircd-hybrid/opers.txt \
|
2003-09-01 12:13:08 +02:00
|
|
|
${IRCD_HYBRID_DPATH}/opers.txt
|
2003-07-29 19:25:58 +02:00
|
|
|
SUPPORT_FILES_PERMS= /dev/null ${IRCD_HYBRID_FNAME_OPERLOG} \
|
|
|
|
${IRCD_HYBRID_IRC_USER} ${IRCD_HYBRID_IRC_GROUP} 600
|
|
|
|
SUPPORT_FILES_PERMS+= /dev/null ${IRCD_HYBRID_FNAME_USERLOG} \
|
|
|
|
${IRCD_HYBRID_IRC_USER} ${IRCD_HYBRID_IRC_GROUP} 600
|
|
|
|
.if ${IRCD_HYBRID_USE_LOGFILE} == "YES"
|
|
|
|
SUPPORT_FILES_PERMS+= /dev/null ${IRCD_HYBRID_LPATH} \
|
|
|
|
${IRCD_HYBRID_IRC_USER} ${IRCD_HYBRID_IRC_GROUP} 600
|
|
|
|
.endif
|
|
|
|
|
2001-10-21 23:26:51 +02:00
|
|
|
post-build:
|
2003-07-29 22:21:37 +02:00
|
|
|
${_PKG_SILENT}${_PKG_DEBUG} \
|
|
|
|
${CP} ${FILESDIR}/pkg-setup.txt ${WRKDIR}/pkg-setup.txt
|
2003-06-19 18:21:08 +02:00
|
|
|
.if ${IRCD_HYBRID_USE_SYSLOG} != "YES"
|
2003-07-29 22:21:37 +02:00
|
|
|
${_PKG_SILENT}${_PKG_DEBUG} \
|
|
|
|
${MV} ${WRKDIR}/pkg-setup.txt ${WRKDIR}/.pkg-setup.txt
|
|
|
|
${_PKG_SILENT}${_PKG_DEBUG} \
|
|
|
|
${SED} -e '/SYSLOG_FACILITY/d' ${WRKDIR}/.pkg-setup.txt \
|
|
|
|
> ${WRKDIR}/pkg-setup.txt
|
2001-10-21 23:26:51 +02:00
|
|
|
.endif
|
2003-07-29 22:21:37 +02:00
|
|
|
${_PKG_SILENT}${_PKG_DEBUG} \
|
|
|
|
${MV} ${WRKDIR}/pkg-setup.txt ${WRKDIR}/.pkg-setup.txt
|
|
|
|
${_PKG_SILENT}${_PKG_DEBUG} \
|
|
|
|
${SED} ${FILES_SUBST_SED} ${WRKDIR}/.pkg-setup.txt \
|
|
|
|
> ${WRKDIR}/pkg-setup.txt
|
2001-10-21 23:26:51 +02:00
|
|
|
|
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ircd-hybrid
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/pkg-setup.txt ${PREFIX}/share/doc/ircd-hybrid/pkg-setup.txt
|
|
|
|
for f in operguide.txt opermyth.txt; do \
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/ircd-hybrid-6.2/doc/$$f ${PREFIX}/share/doc/ircd-hybrid/$$f ; \
|
|
|
|
done
|
|
|
|
|
2004-04-11 07:48:49 +02:00
|
|
|
.include "../../devel/zlib/buildlink3.mk"
|
2001-10-21 23:26:51 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|