On 2023.03.21 15:19, Morgan Wesström wrote:
Dear list,
I'm trying to create an ebuild for a ZFS snapshot/replication
automation tool called Znapzend that I've been using on FreeBSD for
some time and also would like to use in Gentoo.
https://github.com/oetiker/znapzend
The project homepage has a link to a 3 year old abandoned ebuild that
no longer works. The program exists as a package in FreeBSD and also
in Arch Linux and I've used all these sources to try to understand
the best approach how to handle it in Gentoo.
I've managed to create a working ebuild but I need some input for the
final install phase. The program is written in Perl and creates a few
modules. The above mentioned sources do not agree on the location of
these files and gives no hints to why the maintainers chose the
solution they did.
The FreeBSD approach seems straight forward and places the files
accordingly:
/usr/local/lib/perl5/site_perl/ZnapZend.pm
/usr/local/lib/perl5/site_perl/ZnapZend/Config.pm
/usr/local/lib/perl5/site_perl/ZnapZend/Time.pm
/usr/local/lib/perl5/site_perl/ZnapZend/ZFS.pm
/usr/local/lib/perl5/site_perl/inheritLevels.pm
In Gentoo I find .pm files in a multitude of places e.g.
/usr/lib64/perl5/5.36
/usr/lib64/perl5/vendor_perl/5.36
This is where I lack the necessary knowledge to proceed.
1) Where's the appropriate place for these files in Gentoo and why?
2) If the appropriate place is either of those folders with a version
number, how do I install the files there without hard coding the
version number in the ebuild (which would naturally break the next
time Perl gets updated)?
Regards
Morgan Wesström
I'd suggest looking at ebuilds created by g-cpan, which produces
ebuilds for any module in CPAN. I suspect the eclass(es) involved deal
with the perl version issue. I don't think you can savely ignore that,
since there are likely to be things in the module which do depend on
the version of perl used to create that module.