Skip to content

Commit

Permalink
don't install udev rules by default, as it may pollute the system
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
Dimitri Stolnikov committed Sep 8, 2012
1 parent 5a26bd5 commit 0c7ba8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ add_custom_target(uninstall
########################################################################
# Install udev rules
########################################################################
option(INSTALL_UDEV_RULES "Install udev rules for RTL-SDR" ON)
option(INSTALL_UDEV_RULES "Install udev rules for RTL-SDR" OFF)
if (INSTALL_UDEV_RULES)
install (
FILES rtl-sdr.rules
Expand Down
11 changes: 7 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ SUBDIRS = include src
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = librtlsdr.pc

udevrulesdir=/etc/udev/rules.d
udevrules_DATA = rtl-sdr.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) rtl-sdr.rules /etc/udev/rules.d

uninstall-udev-rules:
rm -rf /etc/udev/rules.d/rtl-sdr.rules

EXTRA_DIST = git-version-gen

if HAVE_DOXYGEN

Expand Down

0 comments on commit 0c7ba8e

Please sign in to comment.