Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2000 18:13:46 -0400
From:      Tim Vanderhoek <hoek@FreeBSD.org>
To:        papowell@astart.com
Cc:        ports@FreeBSD.org
Subject:   Re: A possible flaw and headache in the PORTS philosophy
Message-ID:  <20000530181345.C83316@orange>
In-Reply-To: <200005301734.KAA02193@h4.private>; from papowell@astart.com on Tue, May 30, 2000 at 10:34:30AM -0700
References:  <200005301734.KAA02193@h4.private>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 30, 2000 at 10:34:30AM -0700, papowell@astart.com wrote:
> 
>   You need a way at PACKAGE generation time to tell the package

There are many things we need.  :)


>   I am putting up the LPRng print spooler in a package for FreeBSD.

Excellent!


>   Question 1:
>     There does not appear to be a facility to inform the pkg_create
>    facility that there are a set of files that are 'temporary',  and
>    need to be placed in the package.  The packinglist '@ignore' facility
>    might be useful,  but there is no documentation or explanations
>    of where or how to use it.  Same for the '@ignore_inst'
>    directive.

I think my answer to Q. #3 applies here.

The package system (pkg_create(1), pkg_add(1), etc) is meant to be
functional outside of the ports system.  Not all of its features are
easy to use from within the ports system, nor are they necessarily
appropriate.


>   Question 2:
>     You need to put these files that you want in place in the locations
>    where you want them for the package.  This should be done 'before'
>    you do the actual package work.  A 'pre-package' target in the Makefile
>    would be VERY useful for this purpose.

Actually, there is a pre-package: target.  It's probably not
documented because it's usually not needed, though.

You can also conditionalize anything with:

.if defined(PACKAGE_BUILDING)
	...
.endif

However, simply installing files from pre-package: probably won't do
what you want.

I think what you want to do is always install the lpgNG files
printcap, etc. into a directory, either ${PREFIX}/share/lprNG or
${PREFIX}/share/doc/lprNG.  Add those files to pkg/PLIST (don't forget
the @dirrm).  Those are then sample copies.  Now, write a pkg/INSTALL
script that will conditionally copy files from their sample location
in ${PREFIX}/share/lprNG to wherever.  Add a post-install: target that
looks like:

post-install:
	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL}

That will work for both the binary package and the build-from-source
cases.

As far as I can understand what you are trying to do, this is the way
to do it.


>   Question 3:
>     How do you tell the package stuff to ignore files if they are
>    not there (i.e. - Question 1 and Question 2).  Or does the '@ignore'
>    take care of this?

I think the answer is that the question is invalid.  :)  If I
understand you correctly, then the question is nulled by my answer to
#2.

I hope I've understood you correctly, however.


-- 
Signature withheld by request of author.


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?20000530181345.C83316>