mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-30 15:02:06 +01:00
eclass/udev: Sync with gentoo
It's from gentoo commit 3fc8be35607dc65897279f666c8171b174dd2bf2.
This commit is contained in:
parent
2f3761b783
commit
63c8351338
@ -1,14 +1,10 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
|
||||||
# Flatcar: this file is modified to still support old EAPIs.
|
|
||||||
|
|
||||||
|
|
||||||
# @ECLASS: udev.eclass
|
# @ECLASS: udev.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
# systemd@gentoo.org
|
# systemd@gentoo.org
|
||||||
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
|
# @SUPPORTED_EAPIS: 5 6 7 8
|
||||||
# @BLURB: Default eclass for determining udev directories.
|
# @BLURB: Default eclass for determining udev directories.
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Default eclass for determining udev directories.
|
# Default eclass for determining udev directories.
|
||||||
@ -32,18 +28,17 @@
|
|||||||
# }
|
# }
|
||||||
# @CODE
|
# @CODE
|
||||||
|
|
||||||
|
case ${EAPI} in
|
||||||
|
5|6|7|8) ;;
|
||||||
|
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ -z ${_UDEV_ECLASS} ]]; then
|
if [[ -z ${_UDEV_ECLASS} ]]; then
|
||||||
_UDEV_ECLASS=1
|
_UDEV_ECLASS=1
|
||||||
|
|
||||||
inherit toolchain-funcs
|
inherit toolchain-funcs
|
||||||
|
|
||||||
case ${EAPI:-0} in
|
if [[ ${EAPI} == [56] ]]; then
|
||||||
0|1|2|3|4|5|6|7) ;;
|
|
||||||
*) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established."
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ ${EAPI:-0} == [0123456] ]]; then
|
|
||||||
RDEPEND=""
|
|
||||||
DEPEND="virtual/pkgconfig"
|
DEPEND="virtual/pkgconfig"
|
||||||
else
|
else
|
||||||
BDEPEND="virtual/pkgconfig"
|
BDEPEND="virtual/pkgconfig"
|
||||||
@ -88,8 +83,7 @@ get_udevdir() {
|
|||||||
# @FUNCTION: udev_dorules
|
# @FUNCTION: udev_dorules
|
||||||
# @USAGE: <rule> [...]
|
# @USAGE: <rule> [...]
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Install udev rule(s). Uses doins, thus it is fatal in EAPI 4
|
# Install udev rule(s). Uses doins, thus it is fatal.
|
||||||
# and non-fatal in earlier EAPIs.
|
|
||||||
udev_dorules() {
|
udev_dorules() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
@ -103,8 +97,7 @@ udev_dorules() {
|
|||||||
# @FUNCTION: udev_newrules
|
# @FUNCTION: udev_newrules
|
||||||
# @USAGE: <oldname> <newname>
|
# @USAGE: <oldname> <newname>
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Install udev rule with a new name. Uses newins, thus it is fatal
|
# Install udev rule with a new name. Uses newins, thus it is fatal.
|
||||||
# in EAPI 4 and non-fatal in earlier EAPIs.
|
|
||||||
udev_newrules() {
|
udev_newrules() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user