Subject: Re: pkgsrc installing binary packages
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 05/02/2001 18:02:30
On Thu, 3 May 2001, Hubert Feyrer wrote:

> On Wed, 2 May 2001, Jeremy C. Reed wrote:
> > Can anyone explain this? Provide (or point me to) further documentation?
> > Or is my idea not implemented? If not, is anyone interested?
> 
> bin-install:
>         @if [ -f ${PKGFILE} ] ; then                                    \
>                 ${PKG_ADD} ${PKGFILE} ;                                 \
>         else                                                            \
>                 ${MAKE} ${MAKEFLAGS} package &&                         \
>         fi
> 
> Um... what else do you want? If a binary pkg is there, it's installed with
> pkg_add. If not, the pkg is built, installed, and pkg'd up for later us. 

What else do I want ...
I want it to be recursive; I want it to try remote FTP servers.

 rainier:/usr/pkgsrc/games/pacman$ export
 PKG_PATH=ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5.1/i386/All/
 rainier:/usr/pkgsrc/games/pacman$ make bin-install 2>&1 | tee LOG
 Please unset PKG_PATH before doing pkgsrc works!

I want to be able to use PKG_PATH. But to work-around this, I retrieved
one of the required files and put into /usr/pkgsrc/packages/All.

 rainier:/usr/pkgsrc/games/pacman$ make bin-install 2>&1 | tee LOG
 Installing from source
 ===> Validating dependencies for Pacman-0.3
 => Checksum OK for Pacman-0.3-CVS-00-11-17.tar.gz.
 ===> Extracting for Pacman-0.3
 ===> Required package ClanLib>=0.2.2: NOT found
 ===> Verifying package for ../../graphics/clanlib
 ===> Validating dependencies for ClanLib-0.4.4
 => ClanLib-0.4.4.tar.gz doesn't seem to exist on this system.
 => Attempting to fetch ClanLib-0.4.4.tar.gz from
 http://dark.x.dtu.dk/~mbn/clanlib/download/.

I want it to use /usr/pkgsrc/packages/All/ClanLib-0.4.4.tgz instead of
building from source. (But for anything missing, then use the source.)

I am looking at mk/bsd.pkg.mk to see how to do this.

   Jeremy C. Reed
   http://www.reedmedia.net/