nautilus-open-any-terminal icon indicating copy to clipboard operation
nautilus-open-any-terminal copied to clipboard

Makefile: respect DESTDIR

Open WavyEbuilder opened this issue 1 year ago • 7 comments

Currently, the Makefile does not support DESTDIR. This pr fixes that.

WavyEbuilder avatar Mar 01 '24 17:03 WavyEbuilder

Good points, will fix now!

WavyEbuilder avatar Mar 01 '24 21:03 WavyEbuilder

Could I ask for a clarification on what you mean by "PREFIX is still set to $HOME/.local when not running as root"? I see a conditional setting that so I'm not too sure what needs changing.

WavyEbuilder avatar Mar 01 '24 21:03 WavyEbuilder

If someone is running as non-root and sets DESTDIR to something, say /test/path, then the actual installation path will be /test/path/home/$USER/.local, which might be confusing. I think it would be better if instead PREFIX was set to /.local if running as non-root and DESTDIR is unset, otherwise to /usr, and default DESTDIR to $HOME if running as non-root.

lvxnull avatar Mar 01 '24 21:03 lvxnull

Ah thanks for that! I'll fix that now :)

WavyEbuilder avatar Mar 01 '24 21:03 WavyEbuilder

I think you could just write export DESTDIR instead of passing it explicitly in arguments

lvxnull avatar Mar 01 '24 21:03 lvxnull

Will check and report back later

WavyEbuilder avatar Mar 01 '24 21:03 WavyEbuilder

If someone is running as non-root and sets DESTDIR to something, say /test/path, then the actual installation path will be /test/path/home/$USER/.local, which might be confusing. I think it would be better if instead PREFIX was set to /.local if running as non-root and DESTDIR is unset, otherwise to /usr, and default DESTDIR to $HOME if running as non-root.

Alternatively, default PREFIX to /.local and DESTDIR to $HOME when not running as root regardless if DESTDIR was set or not. This might be easier to implement and still covers the majority of usecases of DESTDIR and PREFIX.

ifeq ($(shell id -u),0)
PREFIX ?= /usr
else
PREFIX ?= /.local
DESTDIR ?= $(HOME)
endif

export PREFIX
export DESTDIR

lvxnull avatar Mar 01 '24 22:03 lvxnull

Hey, is this PR still active?

JulianVennen avatar Apr 19 '24 11:04 JulianVennen

I wanted to implement this feature sooner but i never found time to do it. Once im home I'll make a new PR.

On Fri, Apr 19, 2024, 13:22 Julian Vennen @.***> wrote:

Hey, is this PR still active?

— Reply to this email directly, view it on GitHub https://github.com/Stunkymonkey/nautilus-open-any-terminal/pull/144#issuecomment-2066366744, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUV2BDJX5K2LLUS23EWRJCDY6D45ZAVCNFSM6AAAAABECFJLCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRWGM3DMNZUGQ . You are receiving this because you commented.Message ID: @.***>

lvxnull avatar Apr 19 '24 12:04 lvxnull

Already implemented in #156

lvxnull avatar Apr 19 '24 19:04 lvxnull

Thanks :)

JulianVennen avatar Apr 20 '24 09:04 JulianVennen