# $NetBSD: Makefile,v 1.14 2004/12/28 02:47:41 reed Exp $ # DISTNAME= ircd-hybrid-6.2 PKGREVISION= 3 CATEGORIES= chat MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ircd-hybrid/} EXTRACT_SUFX= .tgz MAINTAINER= seb@pbox.org HOMEPAGE= http://www.ircd-hybrid.net/ COMMENT= IRC server with many options GNU_CONFIGURE= YES USE_BUILDLINK3= YES USE_PKGINSTALL= YES PKG_SYSCONFSUBDIR= ircd-hybrid IRCD_HYBRID_DPATH= ${PKG_SYSCONFDIR} .include "../../mk/bsd.prefs.mk" .if ${IRCD_HYBRID_SMALL_NET} == "YES" 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 . ifdef ${def} _DEFS+= -D${def:S|^IRCD_HYBRID_||}=${${def}} . endif .endfor .for def in \ IRCD_HYBRID_NETWORK_NAME IRCD_HYBRID_NETWORK_DESC . ifdef ${def} _DEFS+= -D${def:S|^IRCD_HYBRID_||}=\"${${def}:Q}\" . endif .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 .if ${IRCD_HYBRID_USE_SYSLOG} == "YES" _DEFS+= -DUSE_SYSLOG=1 _DEFS+= -DLOG_FACILITY=${IRCD_HYBRID_SYSLOG_FACILITY} .endif .if ${IRCD_HYBRID_USE_LOGFILE} == "YES" _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 \ IRCD_HYBRID_NETWORK_NAME IRCD_HYBRID_NETWORK_DESC \ IRCD_HYBRID_FNAME_OPERLOG IRCD_HYBRID_PPATH \ IRCD_HYBRID_IRC_USER IRCD_HYBRID_IRC_GROUP . ifdef ${def} BUILD_DEFS+= ${def} . endif .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 .if ${IRCD_HYBRID_USE_LOGFILE} == "YES" BUILD_DEFS+= IRCD_HYBRID_USE_LOGFILE BUILD_DEFS+= IRCD_HYBRID_LPATH .endif 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} FILES_SUBST+= GROUP=${IRCD_HYBRID_IRC_GROUP} FILES_SUBST+= SYSLOG_FACILITY=${IRCD_HYBRID_SYSLOG_FACILITY} RCD_SCRIPTS= ircd-hybrid PKG_USERS= ${IRCD_HYBRID_IRC_USER}:${IRCD_HYBRID_IRC_GROUP}::IRC\\ User::/sbin/nologin PKG_GROUPS= ${IRCD_HYBRID_IRC_GROUP} SUPPORT_FILES= ${PREFIX}/share/examples/ircd-hybrid/opers.txt \ ${IRCD_HYBRID_DPATH}/opers.txt 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 post-build: ${_PKG_SILENT}${_PKG_DEBUG} \ ${CP} ${FILESDIR}/pkg-setup.txt ${WRKDIR}/pkg-setup.txt .if ${IRCD_HYBRID_USE_SYSLOG} != "YES" ${_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 .endif ${_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 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 .include "../../devel/zlib/buildlink3.mk" .include "../../mk/bsd.pkg.mk"