View previous topic :: View next topic |
Author |
Message |
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Sun Jun 23, 2024 9:28 am Post subject: [Solved] Ebuild files for script-based utilities |
|
|
Hi folks
Is there a nice way to write a .ebuild file for a utility that consists of nothing but scripts? There's a Makefile, but only 'make install' does anything, because there's nothing to build. I'm fairly sure these utilities could be treated like C programs, but is there an official, nicer way? I guess I could just provide empty implementations of `src_compile()` etc.
BR, Lars.
Last edited by lars_the_bear on Wed Jun 26, 2024 8:38 am; edited 1 time in total |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2436
|
Posted: Sun Jun 23, 2024 10:46 am Post subject: Re: Ebuild files for script-based utilities |
|
|
lars_the_bear wrote: | Hi folks
I guess I could just provide empty implementations of `src_compile()` etc.
|
I think you don't need to provide anything at all. Just package and host the scripts somewhere. Everything else will be taken care of. See mktwpol for reference. It seems to be purely scripts. It does something but it doesn't seem to be related to installing the scripts.
Best Regards,
Georgi |
|
Back to top |
|
|
RumpletonBongworth Tux's lil' helper
Joined: 17 Jun 2024 Posts: 82
|
Posted: Sun Jun 23, 2024 4:38 pm Post subject: |
|
|
An implementation of src_compile that does nothing would save a minute amount of overhead. You can do what whatever you want in the src_install phase (exeinto, doexe etc).
EDIT: I just realised that you mentioned that there is already a Makefile. In that case, and as logrusx stated, you shouldn't have to do anything in particular. |
|
Back to top |
|
|
eschwartz Developer
Joined: 29 Oct 2023 Posts: 228
|
Posted: Mon Jun 24, 2024 2:52 pm Post subject: |
|
|
If the default Makefile target does something incompatible with src_compile, such as attempting to install to $(DESTDIR)/usr/bin, then you do indeed need to override src_compile.
Or make the default Makefile target be a no-op target, which is a good idea anyway. It's not generally expected that running `make` would install the software.
Perhaps this Makefile is already doing the right thing and the default target is a no-op.
(If there is *no* Makefile, then you don't need to do anything since it will only try to execute a Makefile if a Makefile exists.) |
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 522
|
Posted: Mon Jun 24, 2024 6:07 pm Post subject: |
|
|
eschwartz wrote: |
Perhaps this Makefile is already doing the right thing and the default target is a no-op.
|
Exactly so. And the package installs perfectly well, with a .ebuild file that is essentially empty except for the download URI. It just seems a bit pointless to run 'make' at all, when there's nothing to build. But it does no harm. I was just wondering if there was an official, idiomatic Gentoo way to package something that is just scripts.
BR, Lars. |
|
Back to top |
|
|
|