Closed zonotope closed 4 years ago
Though can we keep the go path around under
go-install
andgo-uninstall
for ease of use for the non linux pkg manager case?
👍 ...or even make it do the current FIRSTGOPATH
install on make install
if PREFIX
isn't set but GOPATH
is.
This patch allows for setting the install prefix with the
PREFIX
environment variable instead of relying onGOPATH
to be set and installing it there. It also uses aDESTDIR
environment variable that most linux package managers use to install packages into an intermediate sandbox (and works normally whenDESTDIR
is not set).This is a more standard way (beyond go) to install binary packages on unix like system with Makefiles because it allows for building the package as an unprivileged user (where
GOPATH
is more likely to be set), but installing the package system wide as root (whereGOPATH
is not likely to be set). This will be more flexible for writing install scripts for other operating systems and distributions.