/[gentoo-x86]/eclass/systemd.eclass
Gentoo

Diff of /eclass/systemd.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.3 2011/06/11 06:06:43 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.4 2011/06/16 16:39:18 mgorny Exp $
4 4
5# @ECLASS: systemd.eclass 5# @ECLASS: systemd.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# mgorny@gentoo.org 7# mgorny@gentoo.org
8# @BLURB: helper functions to install systemd units 8# @BLURB: helper functions to install systemd units
86 dodir "${ud}"/"${target}".wants && \ 86 dodir "${ud}"/"${target}".wants && \
87 dosym ../"${service}" "${ud}"/"${target}".wants 87 dosym ../"${service}" "${ud}"/"${target}".wants
88} 88}
89 89
90# @FUNCTION: systemd_with_unitdir 90# @FUNCTION: systemd_with_unitdir
91# @USAGE: [configure option]
91# @DESCRIPTION: 92# @DESCRIPTION:
92# Output '--with-systemdsystemunitdir' as expected by systemd-aware configure 93# Output '--with-systemdsystemunitdir' as expected by systemd-aware configure
93# scripts. This function always succeeds. Its output may be quoted in order 94# scripts. This function always succeeds. Its output may be quoted in order
94# to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over 95# to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over
95# this function. 96# this function.
97#
98# If upstream does use invalid configure option to handle installing systemd
99# units (e.g. `--with-systemdunitdir'), you can pass the 'suffix' as an optional
100# argument to this function (`$(systemd_with_unitdir systemdunitdir)'). Please
101# remember to report a bug upstream as well.
96systemd_with_unitdir() { 102systemd_with_unitdir() {
97 debug-print-function ${FUNCNAME} "${@}" 103 debug-print-function ${FUNCNAME} "${@}"
104 local optname=${1:-systemdsystemunitdir}
98 105
99 echo -n --with-systemdsystemunitdir="$(systemd_get_unitdir)" 106 echo -n --with-${optname}="$(systemd_get_unitdir)"
100} 107}
101 108
102# @FUNCTION: systemd_to_myeconfargs 109# @FUNCTION: systemd_to_myeconfargs
103# @DESCRIPTION: 110# @DESCRIPTION:
104# Add '--with-systemdsystemunitdir' as expected by systemd-aware configure 111# Add '--with-systemdsystemunitdir' as expected by systemd-aware configure

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20