Subject: USE_SSH, comments please
To: None <tech-pkg@netbsd.org>
From: None <mcmahill@mtl.mit.edu>
List: tech-pkg
Date: 08/24/2000 12:33:25
How does the following addition to bsd.pkg.mk look? There would, of
course, be appropriate changes to mk.conf.example and packages(7).
The pkg Makefile would define USE_SSH and the build system would put SSH
in the environment and pull in needed depends. Defaults would be provided
but the user could specifiy PKG_SSH= one of {openssh,ssh,ssh6, or the full
path to someother ssh program}.
.if defined(USE_SSH)
# first provide defaults. If we have ssh in the base system
# use that as a default, otherwise use the security/ssh package
# as a default.
.if exists(/usr/bin/ssh)
PKG_SSH?= /usr/bin/ssh
.else
PKG_SSH?= ssh
.endif
# now pull in any depends we may need and provide the full path
# to ssh.
SSH= ${LOCALBASE}/bin/ssh
.if (${PKG_SSH} == "openssh")
DEPENDS+= openssh-*:../../security/openssh
.elif (${PKG_SSH} == "ssh")
DEPENDS+= ssh-*:../../security/ssh
.elif (${PKG_SSH} == "ssh6")
DEPENDS+= ssh6-*:../../security/ssh6
.else
SSH= ${PKG_SSH}
.endif
MAKE_ENV+= SSH="${SSH}"
.endif
-dan