cvs commit: src/share/mk bsd.pkg.mk bsd.prog.mk

John Baldwin jhb at FreeBSD.org
Thu Dec 23 12:28:58 PST 2004


On Monday 20 December 2004 07:37 pm, Paul Richards wrote:
> On Mon, Dec 20, 2004 at 11:28:38PM +0200, Ruslan Ermilov wrote:
> > On Mon, Dec 20, 2004 at 03:52:00PM +0000, Paul Richards wrote:
> > > On Mon, Dec 20, 2004 at 03:46:56PM +0000, Paul Richards wrote:
> > > > paul        2004-12-20 15:46:56 UTC
> > > >
> > > >   FreeBSD src repository
> > > >
> > > >   Modified files:
> > > >     share/mk             bsd.prog.mk
> > > >   Added files:
> > > >     share/mk             bsd.pkg.mk
> > > >   Log:
> > > >   If PORTNAME is set in a system Makefile then hook into the ports
> > > >   mechanisms to allow a package to be created. This paves the way
> > > >   for packaging the main tree.
> > >
> > > This is 90% working, I can create packages in the src tree by adding
> > > the following:
> > >
> > > e.g for cat
> > >
> > > PROG=   cat
> > > PORTNAME=cat
> > > PORTVERSION=    1
> > > PORTREVISION=   1
> > > CATEGORIES=bin
> > >
> > > There are some loose ends though that need tidying up, particularly
> > > clashes with some main targets in the ports makefile. I could do
> > > with some ports people to help clean things up but decided it was
> > > time to commit it to get other people involved.  It's a non-intrusive
> > > addition at the moment until it's switched on in a Makefile.
> >
> > I think 90% is overestimation.  This doesn't seem to handle FILES,
> > SCRIPTS, etc., at all that are so common in BSD makefiles.  Or am
> > I wrong?  I like the idea though...
>
> You're probably right. I've got a plan to add an option to install
> that takes a package name and generates the plist as it does the
> install so that things work properly. My initial aim was to show that
> it's actually pretty simple to integrate the ports makefile
> infrastructure into the main BSD mk files.
>
> I've discussed offline with Colin a little bit and his approach is
> very different. My motivation is that I use the BSD mk files a lot in
> third party code, since it's a really nice development infrastructure
> and I wanted to be able to combine using the BSD mk files and also
> having an easy way to create packages.
>
> For that reason I wanted a solution that is not tied to the system
> build mechanism, which Colin's proposal is, but instead allows you
> to use the excellent build env that FreeBSD has for developing code
> that is outside of the FreeBSD tree. This approach allows that but
> I accept that there's a fair bit more to do before it's finished.
>
> I'm hoping that someone who understands our mk files better than I
> do, especially the ports side of things, can develop the concept
> further so that it's more polished.
>
> I'll be working on the install patches next since that's a piece of
> the solution that needs doing, so if someone picks up the mk files
> part of it I'd be very grateful.

I do this for TWC software, but the way that I do it is to do a make install 
into a destination tree via DESTDIR and then use find to generate my plist 
from that when I build the package.

-- 
John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the cvs-all mailing list