OpenSDE Packages Database (without history before r20070)
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

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../udev/udev.conf
  5. # Copyright (C) 2007 - 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. if [ "$prefix_auto" = 1 ] ; then
  15. prefix=
  16. set_confopt
  17. fi
  18. var_append extraconfopt ' ' "--libexecdir=$libdir/udev"
  19. # check if we have to disable udev extras
  20. for x in glib gperf acl libusb usbutils; do
  21. if ! pkginstalled -f $x; then
  22. echo_warning "Disabling udev extras ($x not installed)"
  23. var_append extraconfopt ' ' '--disable-extras'
  24. break
  25. fi
  26. done
  27. if ! pkginstalled -f gobject-introspection; then
  28. var_append extraconfopt ' ' "--disable-introspection"
  29. fi
  30. udev_devices() {
  31. local devdir="$root$libdir/udev/devices"
  32. local node=
  33. echo "Creating base nodes ..."
  34. mkdir -p "$devdir"
  35. $confdir/create_nodes.sh $devdir < $confdir/udev_device_nodes.txt | while read node; do
  36. add_flist "$node"
  37. done
  38. }
  39. udev_rules() {
  40. local rulesd=$root$libdir/udev/rules.d
  41. echo "Installing our .rules files..."
  42. for x in $confdir/rules/*.rules; do
  43. [ ! -e "rules/rules.d/${x##*/}" ] || echo_warning "${x##*/}: conflict detected."
  44. install -v -m 644 $x $rulesd/
  45. done
  46. }
  47. hook_add postmake 5 'udev_devices'
  48. hook_add postmake 6 'udev_rules'