From 2ad1ee7e800292f4894cdbb8b9d37510f8653fc9 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Thu, 8 Feb 2007 22:32:06 +0000 Subject: - Update to 5.7.3 - Pass maintainership to submitter Changelog: - no more run as root, uses own user and group by default - RCng startup script (trircd) - fixed build for amd64 - installs bin/tr-ircd instead of bin/ircd (conflict with irc/ircd-hybrid, irc/ptlink-ircd & co.) - does not install bin/md5sum (we have our md5) (conflict with archivers/dpkg and not necessary) - run and log directories can be defined via TRIRCD_RUNDIR and TRIRCD_LOGDIR - configuration directory via TRIRCD_CONFDIR (can be specified on runtime as well) - user and group definable via TRIRCD_USER TRIRCD_GROUP PR: 108835 Submitted by: Martin Matuska --- irc/tr-ircd/Makefile | 106 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 80 insertions(+), 26 deletions(-) (limited to 'irc/tr-ircd/Makefile') diff --git a/irc/tr-ircd/Makefile b/irc/tr-ircd/Makefile index 2e69bd41d703..f98a873cf18c 100644 --- a/irc/tr-ircd/Makefile +++ b/irc/tr-ircd/Makefile @@ -6,58 +6,112 @@ # PORTNAME= tr-ircd -PORTVERSION= 5.1.7 -PORTREVISION= 1 +PORTVERSION= 5.7.3 CATEGORIES= irc ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} DISTNAME= ${PORTNAME:S/-//}-release-${PORTVERSION}-r -MAINTAINER= ports@FreeBSD.org +MAINTAINER= martin@matuska.org COMMENT= An irc daeemon based on Bahamut and hybrid-7 USE_GMAKE= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS= --localstatedir=/var \ - --libdir=${PREFIX}/lib/tr-ircd \ - --includedir=${PREFIX}/include/tr-ircd \ - --enable-kqueue \ - --enable-root \ - --with-fakehost-postfix=COM -MAN1= md5sum.1 -MAN5= ircd.conf.5 -MAN8= ircd.8 +TRIRCD_MAXCLIENTS?= 128 + +TRIRCD_USER?= trircd +TRIRCD_GROUP?= trircd +TRIRCD_RUNDIR?= /var/run/tr-ircd +TRIRCD_LOGDIR?= /var/log/tr-ircd +TRIRCD_CONFDIR?= ${TARGETDIR}/etc/tr-ircd +TRIRCD_LIBDIR= ${TARGETDIR}/lib/tr-ircd +TRIRCD_INCLUDEDIR= ${TARGETDIR}/include/tr-ircd + +CONFIGURE_ARGS= --prefix=${TARGETDIR} \ + --localstatedir=${TRIRCD_RUNDIR} \ + --sysconfdir=${TRIRCD_CONFDIR} \ + --libdir=${TRIRCD_LIBDIR} \ + --includedir=${TRIRCD_INCLUDEDIR} \ + --datadir=${DATADIR} \ + --enable-network-loop=kqueue \ + --with-fakehost-postfix=COM \ + --with-maxclients=${TRIRCD_MAXCLIENTS} + +CONFIGURE_ENV+= MD5SUMS="\"${MD5} -r\"" + +USE_RC_SUBR= trircd + +SUB_LIST+= TRIRCD_USER="${TRIRCD_USER}" TRIRCD_GROUP="${TRIRCD_GROUP}" \ + TRIRCD_RUNDIR="${TRIRCD_RUNDIR}" TRIRCD_LOGDIR="${TRIRCD_LOGDIR}" \ + TRIRCD_CONFDIR="${TRIRCD_CONFDIR}" + +SUB_FILES+= pkg-install pkg-deinstall pkg-message +PKGINSTALL= ${WRKDIR}/pkg-install +PKGDEINSTALL= ${WRKDIR}/pkg-deinstall +PKGMESSAGE= ${WRKDIR}/pkg-message + +.if !defined(NO_INSTALL_MANPAGES) +MAN8= tr-ircd.8 +.endif + +DOCS= AUTHORS ChangeLog INSTALL LICENSE README.FIRST README.HTTPD \ + README.OPM RELNOTES TODO .if !defined(WITHOUT_SSL) USE_OPENSSL= yes CONFIGURE_ARGS+=--enable-openssl=${OPENSSLBASE} .endif -.if defined(SMALL_NET) -CONFIGURE_ARGS+=--enable-small-nets -.endif - .include -.if ${OSVERSION} >= 700019 -BROKEN= Does not compile on FreeBSD >= 7.0 +PW?= /usr/sbin/pw +SUB_LIST+= MKDIR="${MKDIR}" PW="${PW}" CHMOD="${CHMOD}" CHOWN="${CHOWN}" + +.if ${ARCH} == "amd64" || ${ARCH} == "ia64" +CFLAGS+= -fPIC .endif .if ${OSVERSION} < 500000 USE_GCC= 3.4 # Needs va_copy .endif -.if ${OSVERSION} >= 400014 && !defined(WITHOUT_IPV6) -CONFIGURE_ARGS+=--enable-ipv6 -.endif - post-patch: - ${REINPLACE_CMD} -e "s,-O2,${CFLAGS}," ${WRKSRC}/configure + @${REINPLACE_CMD} -e "s,-O2,${CFLAGS}," ${WRKSRC}/configure + @${REINPLACE_CMD} -e "s, ircpasswd,tr-ircpasswd," \ + -e "s,/home/ircd/lib,${TRIRCD_LIBDIR}," \ + -e "s,/home/ircd/ircd5/lib/,${TRIRCD_LIBDIR}," \ + -e "s,/home/ircd/ircd5/etc/,${TRIRCD_CONFDIR}," \ + -e "s,/home/ircd/var/run/tr-ircd,${TRIRCD_RUNDIR}," \ + ${WRKSRC}/doc/configuration/example.conf + @${REINPLACE_CMD} -e "s,@localstatedir@/lib/tr-ircd,${TRIRCD_RUNDIR}," \ + ${WRKSRC}/tools/irandom.sh.in ${WRKSRC}/tools/isslconfig.sh.in + @${REINPLACE_CMD} -e "s,@bindir@,${DATADIR}/tools," ${WRKSRC}/tools/Makefile.in + +post-configure: + @${REINPLACE_CMD} -e "s,/var/log/tr-ircd,${TRIRCD_LOGDIR}," ${WRKSRC}/include/ircpath.h + +pre-install: + @${SH} ${PKGINSTALL} post-install: - @${ECHO} "Installing ${PREFIX}/etc/rc.d/tr-ircd.sh.sample startup file." - @${INSTALL_SCRIPT} ${FILESDIR}/tr-ircd.sh \ - ${PREFIX}/etc/rc.d/tr-ircd.sh.sample + @${MKDIR} ${TRIRCD_CONFDIR} + @${INSTALL_DATA} ${WRKSRC}/doc/configuration/example.conf ${TRIRCD_CONFDIR}/ircd.conf.sample + @${INSTALL_DATA} ${WRKSRC}/doc/configuration/example-ihttpd.conf ${TRIRCD_CONFDIR}/ihttpd.conf.sample + @${INSTALL_DATA} ${WRKSRC}/doc/configuration/example-maskfile.conf ${TRIRCD_CONFDIR}/maskfile.conf.sample + @${INSTALL_DATA} ${WRKSRC}/doc/configuration/example-socks.conf ${TRIRCD_CONFDIR}/socks.conf.sample + @${INSTALL_DATA} ${WRKSRC}/doc/configuration/ircdssl.conf ${TRIRCD_CONFDIR}/ircdssl.conf.sample + @${INSTALL_DATA} ${WRKSRC}/doc/configuration/ircd.motd ${TRIRCD_CONFDIR}/ircd.motd.sample + @${MKDIR} ${TRIRCD_RUNDIR} +.if !defined(NO_INSTALL_MANPAGES) + @${INSTALL_MAN} ${WRKSRC}/doc/man/ircd.8 ${MANPREFIX}/man/man8/tr-ircd.8 +.endif +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for FILE in ${DOCS} + @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}/${FILE} +.endfor +.endif + @${CAT} ${PKGMESSAGE} .include -- cgit v1.2.3