You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
58 lines
1.6 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../udev/udev.conf |
|
# Copyright (C) 2007 - 2010 The OpenSDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This program is free software; you can redistribute it and/or modify |
|
# it under the terms of the GNU General Public License as published by |
|
# the Free Software Foundation; version 2 of the License. A copy of the |
|
# GNU General Public License can be found in the file COPYING. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
if [ "$prefix_auto" = 1 ] ; then |
|
prefix= |
|
set_confopt |
|
fi |
|
|
|
var_append confopt ' ' "--libexecdir=$libdir/udev" |
|
|
|
# check if we have to disable udev extras |
|
for x in glib gperf acl libusb usbutils; do |
|
if ! pkginstalled -f $x; then |
|
echo_warning "Disabling udev extras ($x not installed)" |
|
var_append extraconfopt ' ' '--disable-extras' |
|
break |
|
fi |
|
done |
|
|
|
if ! pkginstalled gobject-introspection; then |
|
var_append extraconfopt ' ' "--disable-introspection" |
|
fi |
|
|
|
udev_devices() { |
|
local devdir="$root/lib/udev/devices" |
|
local node= |
|
|
|
echo "Creating base nodes ..." |
|
mkdir -p "$devdir" |
|
$confdir/create_nodes.sh $devdir < $confdir/udev_device_nodes.txt | while read node; do |
|
add_flist "$node" |
|
done |
|
} |
|
|
|
udev_rules() { |
|
local rulesd=$root$libdir/udev/rules.d |
|
|
|
echo "Installing our .rules files..." |
|
|
|
for x in $confdir/rules/*.rules; do |
|
[ ! -e "rules/rules.d/${x##*/}" ] || echo_warning "${x##*/}: conflict detected." |
|
install -v -m 644 $x $rulesd/ |
|
done |
|
} |
|
|
|
hook_add postmake 5 'udev_devices' |
|
hook_add postmake 6 'udev_rules'
|
|
|