Gentoo Development Guide

SYSTEMD.ECLASS

Section: portage (5)
Updated: May 2013
Index Return to Main Contents
 

NAME

systemd.eclass - helper functions to install systemd units  

DESCRIPTION

This eclass provides a set of functions to install unit files for sys-apps/systemd within ebuilds.  

EXAMPLE

inherit autotools-utils systemd

src_configure() {
local myeconfargs=(
        --enable-foo
        --disable-bar
)

systemd_to_myeconfargs
autotools-utils_src_configure
}
 

FUNCTIONS

systemd_get_unitdir
Output the path for the systemd unit directory (not including ${D}). This function always succeeds, even if systemd is not installed.
systemd_get_userunitdir
Output the path for the systemd user unit directory (not including ${D}). This function always succeeds, even if systemd is not installed.
systemd_get_utildir
Output the path for the systemd utility directory (not including ${D}). This function always succeeds, even if systemd is not installed.
systemd_dounit unit1 [...]
Install systemd unit(s). Uses doins, thus it is fatal in EAPI 4 and non-fatal in earlier EAPIs.
systemd_newunit oldname newname
Install systemd unit with a new name. Uses newins, thus it is fatal in EAPI 4 and non-fatal in earlier EAPIs.
systemd_dotmpfilesd tmpfilesd1 [...]
Install systemd tmpfiles.d files. Uses doins, thus it is fatal in EAPI 4 and non-fatal in earlier EAPIs.
systemd_newtmpfilesd oldname newname.conf
Install systemd tmpfiles.d file under a new name. Uses newins, thus it is fatal in EAPI 4 and non-fatal in earlier EAPIs.
systemd_enable_service target service
Enable service in desired target, e.g. install a symlink for it. Uses dosym, thus it is fatal in EAPI 4 and non-fatal in earlier EAPIs.
systemd_with_unitdir [configure option]
Output '--with-systemdsystemunitdir' as expected by systemd-aware configure scripts. This function always succeeds. Its output may be quoted in order to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over this function.

If upstream does use invalid configure option to handle installing systemd units (e.g. `--with-systemdunitdir'), you can pass the 'suffix' as an optional argument to this function (`$(systemd_with_unitdir systemdunitdir)'). Please remember to report a bug upstream as well.

systemd_with_utildir
Output '--with-systemdsystemutildir' as used by some packages to install systemd helpers. This function always succeeds. Its output may be quoted in order to preserve whitespace in paths.
systemd_to_myeconfargs
Add '--with-systemdsystemunitdir' as expected by systemd-aware configure scripts to the myeconfargs variable used by autotools-utils eclass. Handles quoting automatically.
systemd_update_catalog
Update the journald catalog. This needs to be called after installing or removing catalog files.

If systemd is not installed, no operation will be done. The catalog will be (re)built once systemd is installed.

See: http://www.freedesktop.org/wiki/Software/systemd/catalog

 

MAINTAINERS

systemd@gentoo.org
 

REPORTING BUGS

Please report bugs via http://bugs.gentoo.org/  

FILES

/usr/portage/eclass/systemd.eclass  

SEE ALSO

ebuild(5)
http://sources.gentoo.org/eclass/systemd.eclass?view=log


 

Index

NAME
DESCRIPTION
EXAMPLE
FUNCTIONS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:25:03 GMT, May 19, 2013