Subject: Re: correct form for install target for pkg
To: Hubert Feyrer <hubert.feyrer@rrzc1.rz.uni-regensburg.de>
From: Dan McMahill <mcmahill@mtl.mit.edu>
List: tech-userlevel
Date: 05/07/1998 23:35:03
In message <9805070853.ZM4261@rrzc1a>, Hubert Feyrer writes:
>On May 6, 10:03pm, Dan McMahill wrote:
>> 1)  Is it safe to count on BSD_INSTALL_XXXX being defined and passed
>>     on to the environment that "make install" is being run in?
>
>Sure - that's what we have these definitions for. They are also used in emacs
>and some other pkg.

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).

>For PLIST, you'll have to list every single files, plus @dirrm statements for
>non-std directories.
ok.


>> 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?

>Another side note: You may put that install-procedure into the pkg/Makefile's
>do-install target instead of patching it into the distfile's code. At least
>it's more simple, though the patch can be sent to the original author of the
>pkg, which is quite preferable, too. You decide. :)

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
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?

Thanks

Dan