Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jan 2000 20:17:21 -0600 (CST)
From:      Steve Price <sprice@hiwaay.net>
To:        Karl Denninger <karl@Denninger.Net>
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: ports/15822: Update port misc/HomeDaemon to V0.99
Message-ID:  <Pine.OSF.4.21.0001011950580.3979-100000@fly.HiWAAY.net>
In-Reply-To: <20000101194611.A17603@Denninger.Net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 1 Jan 2000, Karl Denninger wrote:

# I'm NOT going to maintain two SEPARATE bases of code, one for FreeBSD-Ports

<sarcasm>
Surely the fifteen lines of make(1) magic is easier to maintain
than the Makefile and three scripts that currently do nearly the
same thing.  I can't help it that most of the world chooses to
use gmake(1) in all its brokenness.
</sarcasm>

# and one for everyone else.  As such the "one" has to work both ways, or the
# Ports lose - that much is simple (widest audience for ONE version is a
# non-port one)

Except when it comes to including FreeBSD in that audience.  I'd
venture to guess that most software is being used via the Ports
Collection.  Sure many people venture out on there own, but they
tend to be the more apt to cope with any problems they might find.

Fundamentally I agree with your argument of one distribution fits
all.  We have a ports collection because many don't believe this
and we *have* to tweak things to get them to work with FreeBSD.

# > post-patch:
# > .for f in defs.h Defaults/HomeDaemon.rc
# > 	${PERL} -pi -e 's,/usr/local,${PREFIX},g' ${WRKSRC}/${f}
# > .endfor
# 
# That's even more ill , as its a one-way road.  No thanks.

Not if you stick it in your Makefile.  There are quite a number
of ways of accomplishing the same thing in your distribution.
Before you go and slam perl, use sed(1) instead.  Something like
this ought to work in your Makefile.

PREFIX?=	/usr/local

all: defs.h Defaults/HomeDaemon.rc $(PROGS)
	...

defs.h: defs.h.in
	sed -e 's,%%PREFIX%%,${PREFIX},g' $@.in > $@

Defaults/HomeDaemon.rc: Defaults/HomeDaemon.rc.in
	sed -e 's,%%PREFIX%%,${PREFIX},g' $@.in > $@

Then in defs.h.in you have lines like this.

#define BASE_DIR	"%%PREFIX%%/share/HomeDaemon"
#define BIN_DIR		"%%PREFIX%%/bin"

Similarly for HomeDaemon.rc, which should probably get installed
as ${PREFIX}/etc/rc.d/HomeDaemon.sh BTW so that it will get
started automagically when the machine is rebooted.

-steve



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.4.21.0001011950580.3979-100000>