Added udev support.
authorBernd Porr <Bernd.Porr@f2s.com>
Mon, 23 Apr 2007 22:20:09 +0000 (22:20 +0000)
committerBernd Porr <Bernd.Porr@f2s.com>
Mon, 23 Apr 2007 22:20:09 +0000 (22:20 +0000)
configure.ac
etc/Makefile.am
etc/hotplug/usb/usbdux/Makefile.am
etc/hotplug/usb/usbduxfast/Makefile.am
etc/udev/90-comedi.rules [new file with mode: 0644]
etc/udev/Makefile.am [new file with mode: 0644]
etc/udev/Makefile.in [new file with mode: 0644]
etc/udev/usbdux [new file with mode: 0755]
etc/udev/usbduxfast [new file with mode: 0755]

index 05a4d42c4d11c3033b9e38e88e78e97c9e40a553..69bf4470b75808440d7c19df096d16a21d4dfca1 100644 (file)
@@ -121,15 +121,56 @@ AM_CONDITIONAL(HAVE_DOCBOOK2HTML, [test "$DOCBOOK2HTML" != "no"])
 pcmciadir="\${sysconfdir}/pcmcia"
 AC_SUBST(pcmciadir)
 
+
+
+# new udev hotplug
+AC_ARG_ENABLE([udev-hotplug], [  --enable-udev-hotplug=[[/lib]]    enable udev hotplug],
+       [ENABLE_UDEVHOTPLUG=$enableval], [ENABLE_UDEVHOTPLUG="no"])
+AM_CONDITIONAL(INSTALL_UDEVHOTPLUG, [test "$ENABLE_UDEVHOTPLUG" != "no"])
+if test "$ENABLE_UDEVHOTPLUG" != "no"; then
+       udevrulesdir="\${sysconfdir}/udev/rules.d/"
+       if  test "$ENABLE_UDEVHOTPLUG" == "yes"; then
+               AC_MSG_ERROR([udev-hotplug needs a path as an argument (usually: --enable-udev-hotplug=/lib).])
+       fi
+       if test "$ENABLE_UDEVHOTPLUG" != "/lib"; then
+               AC_MSG_WARN([Installing the udev scripts in the non-standard location: $ENABLE_UDEVHOTPLUG (should be --enable-udev-hotplug=/lib)])
+       fi
+       if test "$sysconfdir" != "/etc"; then
+               AC_MSG_WARN([udev hotplug works only if sysconfdir is set to /etc.])
+       fi
+       udevfirmwaredir="$ENABLE_UDEVHOTPLUG/firmware"
+       udevscriptsdir="$ENABLE_UDEVHOTPLUG/udev"
+       AC_SUBST(udevrulesdir)
+       AC_SUBST(udevfirmwaredir)
+       AC_SUBST(udevscriptsdir)
+else
+       ENABLE_UDEVHOTPLUG="no"
+fi
+
+
+# old hotplug mechanism
+AC_ARG_ENABLE([etc-hotplug], [  --enable-etc-hotplug    enable old hotplug in /etc/hotplug],
+       [ENABLE_ETCHOTPLUG=$enableval], [ENABLE_ETCHOTPLUG="no"])
+AM_CONDITIONAL(INSTALL_ETCHOTPLUG, [test "$ENABLE_ETCHOTPLUG" != "no"])
+
+if test "$ENABLE_ETCHOTPLUG" != "no"; then
 #see: http://linux-hotplug.sourceforge.net/
 #the hotplug expects the device dependent scripts here:
-usbhotplugdir="\${sysconfdir}/hotplug/usb"
-AC_SUBST(usbhotplugdir)
+       usbhotplugdir="\${sysconfdir}/hotplug/usb"
+       AC_SUBST(usbhotplugdir)
 
 #firmware for the hotplug script
 #see: http://linux-hotplug.sourceforge.net/
-usbfirmwaredir="\${datadir}/usb"
-AC_SUBST(usbfirmwaredir)
+       usbfirmwaredir="\${datadir}/usb"
+       AC_SUBST(usbfirmwaredir)
+       if test "$sysconfdir" != "/etc"; then
+               AC_MSG_WARN([hotplug works only if sysconfdir is set to /etc.])
+       fi
+fi
+
+if test "$ENABLE_ETCHOTPLUG" = "no" && test "$ENABLE_UDEVHOTPLUG" = "no" ; then
+               AC_MSG_WARN([No hotplug mechanism will we installed. Consult ./configure --help if you want hotplug.])
+fi
 
 #documentaion goes here
 doccomedilibdir="\${datadir}/doc/libcomedi0"
@@ -144,6 +185,7 @@ etc/hotplug/Makefile
 etc/hotplug/usb/Makefile
 etc/hotplug/usb/usbdux/Makefile
 etc/hotplug/usb/usbduxfast/Makefile
+etc/udev/Makefile
 doc/Makefile
 demo/Makefile
 include/Makefile
index 837e33b717e8a7d4b2e9d556d1c19b5946776457..dc09ca40ef305c6d72277b2501559a82b4f136b5 100644 (file)
@@ -1,5 +1,5 @@
 
-SUBDIRS = pcmcia hotplug
+SUBDIRS = pcmcia hotplug udev
 
 doccomedilib_DATA = das1600.conf dt282x.conf modules.conf
 
index 4a792492a6cfe638bbb1a1798d695e138144887b..cfa8cec429887202987c6401f188648673170ffa 100644 (file)
@@ -1,6 +1,10 @@
+if INSTALL_UDEVHOTPLUG
+udevfirmware_DATA = usbdux_firmware.hex
+EXTRA_DIST = usbdux_firmware.hex
+endif
 
+if INSTALL_ETCHOTPLUG
+usbfirmware_DATA =  usbdux_firmware.hex
 usbhotplug_SCRIPTS = usbdux
-
-usbfirmware_DATA = usbdux_firmware.hex
-
 EXTRA_DIST = usbdux usbdux_firmware.hex
+endif
index 565c9a98dee08d8746fdd2be302b9004c1f2dabf..06961d25b5176648b8ec46b6b96197dc82ff4cf7 100644 (file)
@@ -1,6 +1,10 @@
+if INSTALL_UDEVHOTPLUG
+udevfirmware_DATA = usbduxfast_firmware.hex
+EXTRA_DIST = usbduxfast_firmware.hex
+endif
 
+if INSTALL_ETCHOTPLUG
+usbfirmware_DATA =  usbduxfast_firmware.hex
 usbhotplug_SCRIPTS = usbduxfast
-
-usbfirmware_DATA = usbduxfast_firmware.hex
-
-EXTRA_DIST = usbdux usbduxfast_firmware.hex
+EXTRA_DIST = usbduxfast usbduxfast_firmware.hex
+endif
diff --git a/etc/udev/90-comedi.rules b/etc/udev/90-comedi.rules
new file mode 100644 (file)
index 0000000..748a72d
--- /dev/null
@@ -0,0 +1,9 @@
+ACTION!="add", GOTO="usbdux_end"
+SUBSYSTEM=="usb_device", GOTO="usbdux_rules_real"
+SUBSYSTEM=="usb", GOTO="usbdux_rules_real"
+BUS!="usb", GOTO="usbdux_end"
+LABEL="usbdux_rules_real"
+SYSFS{idVendor}=="13d8", SYSFS{idProduct}=="0001", RUN+="/lib/udev/usbdux"
+SYSFS{idVendor}=="13d8", SYSFS{idProduct}=="0002", RUN+="/lib/udev/usbdux"
+SYSFS{idVendor}=="13d8", SYSFS{idProduct}=="0010", RUN+="/lib/udev/usbduxfast"
+LABEL="usbdux_end"
diff --git a/etc/udev/Makefile.am b/etc/udev/Makefile.am
new file mode 100644 (file)
index 0000000..5b13f9f
--- /dev/null
@@ -0,0 +1,17 @@
+if INSTALL_UDEVHOTPLUG
+
+udevrules_DATA = 90-comedi.rules
+
+udevscripts_SCRIPTS = usbdux usbduxfast
+
+EXTRA_DIST = 90-comedi.rules usbdux usbduxfast
+
+else
+
+udevrules_SCRIPTS =
+
+udevscripts_SCRIPTS =
+
+EXTRA_DIST =
+
+endif
diff --git a/etc/udev/Makefile.in b/etc/udev/Makefile.in
new file mode 100644 (file)
index 0000000..b753f93
--- /dev/null
@@ -0,0 +1,467 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = etc/udev
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/am-check-python-headers.m4 \
+       $(top_srcdir)/m4/as-compiler-flag.m4 \
+       $(top_srcdir)/m4/as-libtool.m4 $(top_srcdir)/m4/as-version.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(udevrulesdir)" \
+       "$(DESTDIR)$(udevscriptsdir)" "$(DESTDIR)$(udevrulesdir)"
+udevrulesSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+udevscriptsSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(udevrules_SCRIPTS) $(udevscripts_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+udevrulesDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(udevrules_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_SCXI_FALSE = @BUILD_SCXI_FALSE@
+BUILD_SCXI_TRUE = @BUILD_SCXI_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMEDILIB = @COMEDILIB@
+COMEDILIB_AGE = @COMEDILIB_AGE@
+COMEDILIB_CFLAGS = @COMEDILIB_CFLAGS@
+COMEDILIB_CURRENT = @COMEDILIB_CURRENT@
+COMEDILIB_LIBS = @COMEDILIB_LIBS@
+COMEDILIB_LIBVERSION = @COMEDILIB_LIBVERSION@
+COMEDILIB_LT_LDFLAGS = @COMEDILIB_LT_LDFLAGS@
+COMEDILIB_MAJOR = @COMEDILIB_MAJOR@
+COMEDILIB_MICRO = @COMEDILIB_MICRO@
+COMEDILIB_MINOR = @COMEDILIB_MINOR@
+COMEDILIB_RELEASE = @COMEDILIB_RELEASE@
+COMEDILIB_REVISION = @COMEDILIB_REVISION@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOCBOOK2HTML = @DOCBOOK2HTML@
+DOCBOOK2MAN = @DOCBOOK2MAN@
+DOCBOOK2PDF = @DOCBOOK2PDF@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_DOCBOOK2HTML_FALSE = @HAVE_DOCBOOK2HTML_FALSE@
+HAVE_DOCBOOK2HTML_TRUE = @HAVE_DOCBOOK2HTML_TRUE@
+HAVE_DOCBOOK2MAN_FALSE = @HAVE_DOCBOOK2MAN_FALSE@
+HAVE_DOCBOOK2MAN_TRUE = @HAVE_DOCBOOK2MAN_TRUE@
+HAVE_DOCBOOK2PDF_FALSE = @HAVE_DOCBOOK2PDF_FALSE@
+HAVE_DOCBOOK2PDF_TRUE = @HAVE_DOCBOOK2PDF_TRUE@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+HAVE_RUBY_FALSE = @HAVE_RUBY_FALSE@
+HAVE_RUBY_TRUE = @HAVE_RUBY_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_ETCHOTPLUG_FALSE = @INSTALL_ETCHOTPLUG_FALSE@
+INSTALL_ETCHOTPLUG_TRUE = @INSTALL_ETCHOTPLUG_TRUE@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_UDEVHOTPLUG_FALSE = @INSTALL_UDEVHOTPLUG_FALSE@
+INSTALL_UDEVHOTPLUG_TRUE = @INSTALL_UDEVHOTPLUG_TRUE@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_QUIET = @PYTHON_QUIET@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RUBY = @RUBY@
+RUBY_CONFIG_OPTIONS = @RUBY_CONFIG_OPTIONS@
+RUBY_PREFIX = @RUBY_PREFIX@
+RUBY_SO_DIR = @RUBY_SO_DIR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+VERSION = @VERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+doccomedilibdir = @doccomedilibdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pcmciadir = @pcmciadir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+udevfirmwaredir = @udevfirmwaredir@
+udevrulesdir = @udevrulesdir@
+udevscriptsdir = @udevscriptsdir@
+usbfirmwaredir = @usbfirmwaredir@
+usbhotplugdir = @usbhotplugdir@
+@INSTALL_UDEVHOTPLUG_TRUE@udevrules_DATA = 90-comedi.rules
+@INSTALL_UDEVHOTPLUG_FALSE@udevscripts_SCRIPTS = 
+@INSTALL_UDEVHOTPLUG_TRUE@udevscripts_SCRIPTS = usbdux usbduxfast
+@INSTALL_UDEVHOTPLUG_FALSE@EXTRA_DIST = 
+@INSTALL_UDEVHOTPLUG_TRUE@EXTRA_DIST = 90-comedi.rules usbdux usbduxfast
+@INSTALL_UDEVHOTPLUG_FALSE@udevrules_SCRIPTS = 
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  etc/udev/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  etc/udev/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-udevrulesSCRIPTS: $(udevrules_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(udevrulesdir)" || $(mkdir_p) "$(DESTDIR)$(udevrulesdir)"
+       @list='$(udevrules_SCRIPTS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f $$d$$p; then \
+           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+           echo " $(udevrulesSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(udevrulesdir)/$$f'"; \
+           $(udevrulesSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(udevrulesdir)/$$f"; \
+         else :; fi; \
+       done
+
+uninstall-udevrulesSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(udevrules_SCRIPTS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+         echo " rm -f '$(DESTDIR)$(udevrulesdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(udevrulesdir)/$$f"; \
+       done
+install-udevscriptsSCRIPTS: $(udevscripts_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(udevscriptsdir)" || $(mkdir_p) "$(DESTDIR)$(udevscriptsdir)"
+       @list='$(udevscripts_SCRIPTS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f $$d$$p; then \
+           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+           echo " $(udevscriptsSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(udevscriptsdir)/$$f'"; \
+           $(udevscriptsSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(udevscriptsdir)/$$f"; \
+         else :; fi; \
+       done
+
+uninstall-udevscriptsSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(udevscripts_SCRIPTS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+         echo " rm -f '$(DESTDIR)$(udevscriptsdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(udevscriptsdir)/$$f"; \
+       done
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
+install-udevrulesDATA: $(udevrules_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(udevrulesdir)" || $(mkdir_p) "$(DESTDIR)$(udevrulesdir)"
+       @list='$(udevrules_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(udevrulesDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(udevrulesdir)/$$f'"; \
+         $(udevrulesDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(udevrulesdir)/$$f"; \
+       done
+
+uninstall-udevrulesDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(udevrules_DATA)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(udevrulesdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(udevrulesdir)/$$f"; \
+       done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(DATA)
+installdirs:
+       for dir in "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(udevscriptsdir)" "$(DESTDIR)$(udevrulesdir)"; do \
+         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-udevrulesDATA install-udevrulesSCRIPTS \
+       install-udevscriptsSCRIPTS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-udevrulesDATA \
+       uninstall-udevrulesSCRIPTS uninstall-udevscriptsSCRIPTS
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+       distclean distclean-generic distclean-libtool distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-exec install-exec-am \
+       install-info install-info-am install-man install-strip \
+       install-udevrulesDATA install-udevrulesSCRIPTS \
+       install-udevscriptsSCRIPTS installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am uninstall uninstall-am uninstall-info-am \
+       uninstall-udevrulesDATA uninstall-udevrulesSCRIPTS \
+       uninstall-udevscriptsSCRIPTS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/etc/udev/usbdux b/etc/udev/usbdux
new file mode 100755 (executable)
index 0000000..dce2528
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# hotplug script for USBDUX. Apr 21 GMT 2007
+# berndporr@f2s.com
+#
+#
+#
+#look for comedi config
+COMEDI_CONFIG=
+#
+if [ -e /usr/local/sbin/comedi_config ]; then
+       COMEDI_CONFIG=/usr/local/sbin/comedi_config
+fi
+if [ -e /usr/sbin/comedi_config ]; then 
+        COMEDI_CONFIG=/usr/sbin/comedi_config
+fi
+if [ -e /sbin/comedi_config ]; then 
+        COMEDI_CONFIG=/sbin/comedi_config
+fi
+#
+#
+#look for the firmware
+#default location
+USBDUX_FIRMWARE=/lib/firmware/usbdux_firmware.hex
+#
+#
+# 
+# just to make sure we remove the comedi device
+$COMEDI_CONFIG -r /dev/comedi0
+#
+# connecting the comedi device comedi0 with the module usbdux
+$COMEDI_CONFIG -i $USBDUX_FIRMWARE /dev/comedi0 usbdux
+#
+#
diff --git a/etc/udev/usbduxfast b/etc/udev/usbduxfast
new file mode 100755 (executable)
index 0000000..f45266d
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# hotplug script for USBDUXFAST. Apr 21 2007. 
+# berndporr@f2s.com
+#
+#
+#
+#look for comedi config
+COMEDI_CONFIG=
+#
+if [ -e /usr/local/sbin/comedi_config ]; then
+       COMEDI_CONFIG=/usr/local/sbin/comedi_config
+fi
+if [ -e /usr/sbin/comedi_config ]; then 
+        COMEDI_CONFIG=/usr/sbin/comedi_config
+fi
+if [ -e /sbin/comedi_config ]; then 
+        COMEDI_CONFIG=/sbin/comedi_config
+fi
+#
+#
+# default location
+USBDUX_FIRMWARE=/lib/firmware/usbduxfast_firmware.hex
+#
+#
+#
+#
+#
+# If you have more than one device please add/uncomment
+# 
+# just to make sure we remove the comedi device
+$COMEDI_CONFIG -r /dev/comedi0
+# $COMEDI_CONFIG -r /dev/comedi1
+#
+# connecting the comedi device comedi0 with the module usbdux
+$COMEDI_CONFIG --read-buffer 512 -i $USBDUX_FIRMWARE /dev/comedi0 usbduxfast
+# $COMEDI_CONFIG /dev/comedi1 usbduxfast
+#
+#