View previous topic :: View next topic |
Author |
Message |
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 235
|
Posted: Sat Jun 03, 2023 8:07 am Post subject: why gui-wm/dwl::guru installs into /usr/bin? |
|
|
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 |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30915 Location: here
|
Posted: Sat Jun 03, 2023 11:01 am Post subject: |
|
|
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 |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1530 Location: South America
|
Posted: Sat Jun 03, 2023 6:03 pm Post subject: Re: why gui-wm/dwl::guru installs into /usr/bin? |
|
|
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 |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 235
|
Posted: Sun Jun 04, 2023 2:53 am Post subject: |
|
|
@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 |
|
|
|