diff options
author | Dimitri Stolnikov <horiz0n@gmx.net> | 2012-09-02 22:15:36 +0200 |
---|---|---|
committer | Dimitri Stolnikov <horiz0n@gmx.net> | 2012-09-02 22:15:36 +0200 |
commit | b81bf9a481e37a0e1eef0b0d5f38ce7b4950dd0d (patch) | |
tree | a19cbbf1558dfbb77f4e40f4ea969e76eac39d6a | |
parent | a09144bc88c35a74b425216a434bbf25a613ecc3 (diff) |
install (and uninstall) udev rules file
-rw-r--r-- | software/libosmosdr/CMakeLists.txt | 14 | ||||
-rw-r--r-- | software/libosmosdr/Makefile.am | 5 |
2 files changed, 18 insertions, 1 deletions
diff --git a/software/libosmosdr/CMakeLists.txt b/software/libosmosdr/CMakeLists.txt index 868d03c..57cc0a7 100644 --- a/software/libosmosdr/CMakeLists.txt +++ b/software/libosmosdr/CMakeLists.txt @@ -82,6 +82,20 @@ add_custom_target(uninstall ) ######################################################################## +# Install udev rules +######################################################################## +option(INSTALL_UDEV_RULES "Install udev rules for OsmoSDR" ON) +if (INSTALL_UDEV_RULES) + install ( + FILES osmosdr.rules + DESTINATION "/etc/udev/rules.d" + COMPONENT "udev" + ) +else (INSTALL_UDEV_RULES) + message (STATUS "Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON") +endif (INSTALL_UDEV_RULES) + +######################################################################## # Add subdirectories ######################################################################## add_subdirectory(include) diff --git a/software/libosmosdr/Makefile.am b/software/libosmosdr/Makefile.am index aa66251..d456cd4 100644 --- a/software/libosmosdr/Makefile.am +++ b/software/libosmosdr/Makefile.am @@ -7,13 +7,16 @@ SUBDIRS = include src pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libosmosdr.pc +udevrulesdir=/etc/udev/rules.d +udevrules_DATA = osmosdr.rules + BUILT_SOURCES = $(top_srcdir)/.version $(top_srcdir)/.version: echo $(VERSION) > $@-t && mv $@-t $@ dist-hook: echo $(VERSION) > $(distdir)/.tarball-version -EXTRA_DIST = git-version-gen +EXTRA_DIST = git-version-gen $(udevrules_DATA) if HAVE_DOXYGEN |