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

Diff of /eclass/udev.eclass

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

Revision 1.3 Revision 1.4
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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/udev.eclass,v 1.3 2012/10/30 20:26:54 ssuominen Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/udev.eclass,v 1.4 2012/10/31 16:08:49 ssuominen Exp $
4 4
5# @ECLASS: udev.eclass 5# @ECLASS: udev.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# udev-bugs@gentoo.org 7# udev-bugs@gentoo.org
8# @BLURB: Default eclass for determining udev directories. 8# @BLURB: Default eclass for determining udev directories.
47# @DESCRIPTION: 47# @DESCRIPTION:
48# Output the path for the udev directory (not including ${D}). 48# Output the path for the udev directory (not including ${D}).
49# This function always succeeds, even if udev is not installed. 49# This function always succeeds, even if udev is not installed.
50# The fallback value is set to /lib/udev 50# The fallback value is set to /lib/udev
51udev_get_udevdir() { 51udev_get_udevdir() {
52 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
53 debug-print-function ${FUNCNAME} "${@}" 52 debug-print-function ${FUNCNAME} "${@}"
54 53
55 echo "${EPREFIX}$(_udev_get_udevdir)" 54 echo "$(_udev_get_udevdir)"
56} 55}
56
57# @FUNCTION: udev_dorules
58# @USAGE: rules [...]
59# @DESCRIPTION:
60# Install udev rule(s). Uses doins, thus it is fatal in EAPI 4
61# and non-fatal in earlier EAPIs.
62udev_dorules() {
63 debug-print-function ${FUNCNAME} "${@}"
64
65 (
66 insinto "$(_udev_get_udevdir)"/rules.d
67 doins "${@}"
68 )
69}
70
71# @FUNCTION: udev_newrules
72# @USAGE: oldname newname
73# @DESCRIPTION:
74# Install udev rule with a new name. Uses newins, thus it is fatal
75# in EAPI 4 and non-fatal in earlier EAPIs.
76udev_newrules() {
77 debug-print-function ${FUNCNAME} "${@}"
78
79 (
80 insinto "$(_udev_get_udevdir)"/rules.d
81 newins "${@}"
82 )
83}

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

  ViewVC Help
Powered by ViewVC 1.1.20