Hello, I'd like to submit an initial version of systemd.eclass, providing helper functions for packages installing systemd unit files. Such an eclass would be pushed to gx86 before first systemd packages to control the packages installing upstream systemd units.
The eclass currently provides four functions: - systemd_get_unitdir() which simply outputs the unitdir (for insinto), - systemd_dounit() which installs the specified units into unitdir, - systemd_enable_service() which symlinks service ${2} into target ${1}, creating that target if necessary, - systemd_with_unitdir() which outputs the '--with-systemdsystemunitdir' option as expected by systemd-capable configure scripts. The eclass currently assumes the following: - systemd units are installed into /$(get_libdir)/systemd/system, - systemd units are installed unconditionally. Though it should be possible to change that behaviour within the eclass without modifying the ebuild files. I'm attaching the eclass file. It is also available in my devoverlay [1]. [1] http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=blob;f=eclass/systemd.eclass -- Best regards, Michał Górny
systemd.eclass
Description: Binary data
signature.asc
Description: PGP signature