quorumcontrol / dgit

dgit adds decentralized ownership to git - powered by Tupelo DLT and Skynet
https://dgit.dev/
MIT License
207 stars 16 forks source link

add prefix environment variable and install dgit under that prefix #70

Closed zonotope closed 4 years ago

zonotope commented 4 years ago

This patch allows for setting the install prefix with the PREFIX environment variable instead of relying on GOPATH to be set and installing it there. It also uses a DESTDIR environment variable that most linux package managers use to install packages into an intermediate sandbox (and works normally when DESTDIR 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 (where GOPATH is not likely to be set). This will be more flexible for writing install scripts for other operating systems and distributions.

cap10morgan commented 4 years ago

Though can we keep the go path around under go-install and go-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.