Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
why gui-wm/dwl::guru installs into /usr/bin?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Sat Jun 03, 2023 8:07 am    Post subject: why gui-wm/dwl::guru installs into /usr/bin? Reply with quote

when i emerge gui-wm/dwl::guru , it installs into /usr/bin.

If i git clone DWL source code into local, and make install, it will install into /usr/local/bin

in the simple Makefile for dwl (https://github.com/djpohly/dwl/blob/main/Makefile), there is an "include config.mk" line, and in config.mk, there is PREFIX = /usr/local


And i am creating an ebuild for rfm: https://github.com/padgettr/rfm/blob/master/Makefile . The Makefile also contains a line PREFIX = /usr/local. I just copy the ebuild from dwl and make adjustment for rfm, so, both ebuilds inherit the same set of eclasses.

But no matter through local make install or emerging through ebuild file, rfm always installs into /usr/local/bin folder.

I just wonder why ebuild for DWL can install dwl into /usr/bin, instead of /usr/local/bin? and how can i achieve this for rfm.ebuild
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Sat Jun 03, 2023 11:01 am    Post subject: Reply with quote

Usually /usr/local is used when you compile and install software outside a package manage.
So it's correct that dwl ebuild installs in /usr while the one you compiled in /usr/local.
This also allows you to not overwrite binaries/libraries when you compile outside the package manager.

To understand why your rfm ebuild does not install in /usr you should post it.

-- edit --
See also https://refspecs.linuxbase.org/FHS_3.0/fhs/ch04s09.html
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Sat Jun 03, 2023 6:03 pm    Post subject: Re: why gui-wm/dwl::guru installs into /usr/bin? Reply with quote

And to answer the "how" part of the question:

guyuming wrote:
I just wonder why ebuild for DWL can install dwl into /usr/bin, instead of /usr/local/bin? and how can i achieve this for rfm.ebuild


In the src_prepare() phase, the ebuild for DWL changes the value of PREFIX in the makefile fragment that makes the corresponding assignment:

Code:
sed -i "s:/local::g" config.mk || die

_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Sun Jun 04, 2023 2:53 am    Post subject: Reply with quote

@GDH-gentoo, thanks so much!

I should have though about it. I have seen this line of code and even thought about it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum