summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2012-09-08 16:45:01 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2012-09-08 16:45:01 +0200
commitd79e4f8dca10542b3f53a6b8b95095bcad42bf9c (patch)
tree82aa3e59cc44cbdd8dfa3f092a04977db055563f
parentb81bf9a481e37a0e1eef0b0d5f38ce7b4950dd0d (diff)
don't install udev rules by default, as it may pollute the system
For cmake call with -DINSTALL_UDEV_RULES=ON for the rules to be installed during the default install/uninstall stages. For autotools call "make install-udev-rules" or "make uninstall-udev- The rules file will be installed to "/etc/udev/rules.d".
-rw-r--r--software/libosmosdr/CMakeLists.txt2
-rw-r--r--software/libosmosdr/Makefile.am11
2 files changed, 8 insertions, 5 deletions
diff --git a/software/libosmosdr/CMakeLists.txt b/software/libosmosdr/CMakeLists.txt
index 57cc0a7..60f43d8 100644
--- a/software/libosmosdr/CMakeLists.txt
+++ b/software/libosmosdr/CMakeLists.txt
@@ -84,7 +84,7 @@ add_custom_target(uninstall
########################################################################
# Install udev rules
########################################################################
-option(INSTALL_UDEV_RULES "Install udev rules for OsmoSDR" ON)
+option(INSTALL_UDEV_RULES "Install udev rules for OsmoSDR" OFF)
if (INSTALL_UDEV_RULES)
install (
FILES osmosdr.rules
diff --git a/software/libosmosdr/Makefile.am b/software/libosmosdr/Makefile.am
index d456cd4..09416ba 100644
--- a/software/libosmosdr/Makefile.am
+++ b/software/libosmosdr/Makefile.am
@@ -7,16 +7,19 @@ 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 $(udevrules_DATA)
+install-udev-rules:
+ $(INSTALL_DATA) osmosdr.rules /etc/udev/rules.d
+
+uninstall-udev-rules:
+ rm -rf /etc/udev/rules.d/osmosdr.rules
+
+EXTRA_DIST = git-version-gen
if HAVE_DOXYGEN