1#!/bin/sh
2#
3# SPDX-License-Identifier: MIT
4#
5
6set -e
7
8case "${PREFERRED_PROVIDER_udev}" in
9	systemd)
10		UDEV_EXTRA_ARGS="--usr"
11		UDEVLIBDIR="${rootlibexecdir}"
12		;;
13
14	*)
15		UDEV_EXTRA_ARGS=""
16		UDEVLIBDIR="${sysconfdir}"
17		;;
18esac
19
20PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS}
21chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin
22