Subject: Re: correct form for install target for pkg
To: None <mcmahill@mtl.mit.edu>
From: Hubert Feyrer <hubert.feyrer@rrzc1.rz.uni-regensburg.de>
List: tech-userlevel
Date: 05/08/1998 08:39:14
On May 7, 11:35pm, Dan McMahill wrote:
> I've noticed that in the emacs pkg, it calls out INSTALL_PROGRAM while
> I had to call out BSD_INSTALL_PROGRAM (in the Makefile for the source,
> not the pkg Makefile).

Hum, right, the emacs pkg does an ugly hack to prevent patching some emacs
Makefiles by making sure INSTALL_PROGRAM gets defined propperly (by us).

Using BSD_INSTALL_PROGRAM is probably cleaner.


> >> 3)  There is no man page.  The manual comes with the distribution in LaTex
> >>     form and is also available for download via FTP in postscript form.
> >
> >Don't depend on LaTeX, esp. if there is a pre-built documentation available
> >already. Just make sure it gets downloaded and stuff it wherever it fits to.
> so the distribution site for the source is laid out like this:
>
> ./fastcap-2.0-15Jul92.tar.Z
> ./postscript/manual1.ps.Z
> ./postscript/manual2.ps.Z
> ./postscript/manual3.ps.Z
>
> I have in my pkg Makefile:
>
> DISTNAME=               fastcap-2.0-15Jul92
> EXTRACT_SUFX=           .tar.Z
>
> and it correctly downloads and extracts fastcap-2.0-15Jul92.tar.Z,
> but I'm having problems with the others.
>
> I tried:
> DISTFILES=             fastcap-2.0-15Jul92.tar.Z \
>                        postscript/ug.ps.Z \
>                        postscript/mtt.ps.Z \
>                        postscript/tcad.ps.Z
> EXTRACT_SUFX=           .tar.Z
> CATEGORIES=             cad
> MASTER_SITES=           ftp://rle-vlsi.mit.edu/pub/fastcap/
> DIST_SUBDIR=           fastcap
>
> and it downloaded the 4 files and put them into /usr/pkgsrc/distfiles/fastcap
> but when it went to the extract target it said something like
> "couldn't open postscript/manual1.ps.Z".  ie, make was looking in
> /usr/pkgsrc/distfiles/fastcap/postscript/manual.1.ps.Z while the file
> was really
> /usr/pkgsrc/distfiles/fastcap/manual.1.ps.Z
>
> Any suggestions?

Eh, no... Maybe check out all the Free/Net/OpenBSD pkgs/ports, I don't know
offhands too. But I'm sure there's some solution for this.


> hmmm, I tried putting stuff like
>
> do-install:
>         ${BSD_INSTALL_PROGRAM} ./bin/fastcap ${PREFIX}/bin
>
> in the pkg Makefile.  If i put it after the
> .include "../../mk/bsd.pkg.mk"
> then the do-install target was already defined in bsd.pkg.mk

Um, in the pkg Makefile, you should the versions without leadking "BSD_"s.


> If I put it before the .include, then ${BSD_INSTALL_PROGRAM}
> ends up not being defined.  In fact if I just do
>
> do-install:
> 	printenv
>
> then I don't see any of the INSTALL_PROGRAM type variables
>
> Am I missing something simple?

Yes - make variables != environment variables
And look in pkgsrc/mk/bsd.pkg.mk for how/where BSD_* gets defined.


 - Hubert

-- 
Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>