diff options
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/systemd.eclass | 32 |
2 files changed, 34 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 90eb2acf74b6..3431deafd504 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1277 2014/05/28 18:53:20 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1278 2014/05/31 10:23:36 mgorny Exp $ + + 31 May 2014; Michał Górny <mgorny@gentoo.org> systemd.eclass: + Add systemd_{do,new}userunit. 28 May 2014; Michał Górny <mgorny@gentoo.org> multilib-build.eclass: Fix ABI flag stripping in multilib_get_enabled_abis(), bug #511682. diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index c2dafbfc30c3..f06d85063b0c 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.31 2013/10/22 15:14:40 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.32 2014/05/31 10:23:36 mgorny Exp $ # @ECLASS: systemd.eclass # @MAINTAINER: @@ -133,6 +133,34 @@ systemd_newunit() { ) } +# @FUNCTION: systemd_douserunit +# @USAGE: <unit>... +# @DESCRIPTION: +# Install systemd user unit(s). Uses doins, thus it is fatal in EAPI 4 +# and non-fatal in earlier EAPIs. +systemd_douserunit() { + debug-print-function ${FUNCNAME} "${@}" + + ( + insinto "$(_systemd_get_userunitdir)" + doins "${@}" + ) +} + +# @FUNCTION: systemd_newuserunit +# @USAGE: <old-name> <new-name> +# @DESCRIPTION: +# Install systemd user unit with a new name. Uses newins, thus it +# is fatal in EAPI 4 and non-fatal in earlier EAPIs. +systemd_newuserunit() { + debug-print-function ${FUNCNAME} "${@}" + + ( + insinto "$(_systemd_get_userunitdir)" + newins "${@}" + ) +} + # @FUNCTION: systemd_install_serviced # @USAGE: <conf-file> [<service.d>] # @DESCRIPTION: |