Makefile question

Roman Neuhauser neuhauser at sigpipe.cz
Tue Jun 14 11:24:48 GMT 2005


# gabor.kovesdan at t-hosting.hu / 2005-06-14 10:52:25 +0200:
> It is the DALnet's BahamutIRCD. You can grab it from 
> http://bahamut.dal.net/. Try to install it with specifying --prefix, 
> --bindir, --libdir, ... even if You specify all of the pathnames, every 
> file go directly to --prefix. But I'm interested, whether You can find a 
> better solution.

    Ok, I see the problem now. This one is a bit funny, and "fixing" the
    authors' preference for relocatable binaries will require a bit of
    tweaking so that MPATH etc in include/config.h end up qualified with
    the desired paths. I don't feel like playing with autoconf right
    now, so I don't have a "better" solution, just a hack.

    I'm attaching a possible irc/bahamut/Makefile.  I haven't bothered
    creating pkg-plist or testing the compiled product beyond what you
    see below (which BTW shows that ircd exits with 0 (success) even if
    it outputs what looks like a reaction to an error condition; that's
    a bit unorthodox):

    roman at isis ports/irc/bahamut 1053:0 > /tmp/bahamut/sbin/ircd

    bahamut-1.8(03) booting...
    Security related issues should be sent to coders at dal.net
    All other issues should be sent to dalnet-src at dal.net

    CONFIGFILE:
    Error changing directory to ircd.conf location
    Server not started
    roman at isis ports/irc/bahamut 1054:0 >

    You'll need to chase down the rest of such problems (if there are
    any left) and patch them.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991
-------------- next part --------------
# New ports collection makefile for:	bahamut
# Date created:				Tue Jun 14 11:27:56 CEST 2005
# Whom:					Roman Neuhauser <neuhauser at sigpipe.cz>
#
# $FreeBSD$
#

PORTNAME=	bahamut
PORTVERSION=	1.8.3
CATEGORIES=	irc
MASTER_SITES=	ftp://ftp.dal.net/dalnet/server/bahamut/ \
		http://bahamut.dal.net/download/
EXTRACT_SUFX=	-release.tar.gz

MAINTAINER=	ports at FreeBSD.org
COMMENT=	Internet Relay Chat Daemon (IRCd) designed for DALnet

GNU_CONFIGURE=	yes
USE_REINPLACE=	yes
REINPLACE_ARGS=	-Ei.bak

LOGDIR?=	/var/log
PIDDIR?=	/var/run
TOOLDIR?=	${PREFIX}/libexec/${PORTNAME}

MOTD=		${DATADIR}/ircd.motd
DOCFILES=	opers.txt reference.conf template.conf
TOOLFILES=	mkpasswd convert_conf

do-patch:
	${REINPLACE_CMD} \
		-e '/^#define[	 ](S?M|H)PATH[	 ]/s,,&"${DATADIR}/" ,' \
		-e '/^#define[	 ]LPATH[	 ]/s,,&"${LOGDIR}/" ,' \
		-e '/^#define[	 ]PPATH[	 ]/s,,&"${PIDDIR}/" ,' \
		${WRKSRC}/include/config.h

do-install:
	${MKDIR} -p ${DATADIR}
	${MKDIR} -p ${DOCSDIR}
	${MKDIR} -p ${TOOLDIR}
	${INSTALL_PROGRAM} ${WRKSRC}/src/ircd ${PREFIX}/sbin/ircd
	${INSTALL_DATA} ${DOCFILES:S,^,${WRKSRC}/doc/,} ${DOCSDIR}
	[ -e ${MOTD} ] || ${TOUCH} ${MOTD}
	${INSTALL_SCRIPT} ${TOOLFILES:S,^,${WRKSRC}/tools/,} ${TOOLDIR}

.include <bsd.port.mk>


More information about the freebsd-ports mailing list