Subject: Re: correct form for install target for pkg
To: None <>
From: Hubert Feyrer <>
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/
> ./postscript/
> ./postscript/
> 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/ \
>                        postscript/ \
>                        postscript/
> EXTRACT_SUFX=           .tar.Z
> CATEGORIES=             cad
> 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/".  ie, make was looking in
> /usr/pkgsrc/distfiles/fastcap/postscript/ while the file
> was really
> /usr/pkgsrc/distfiles/fastcap/
> 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/"
> then the do-install target was already defined in

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/ for how/where BSD_* gets defined.

 - Hubert

Hubert Feyrer <>