summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Walleij <triad@df.lth.se>2011-01-18 15:33:09 +0100
committerLinus Walleij <triad@df.lth.se>2011-01-23 09:02:07 +0100
commit5cf12e7a959341208a74bbc17bd268342328afd2 (patch)
tree08e97034e1610b2cba89d3fd495a83923b25595c
parent68c383ee6c9645270ebeb16c9bd8ce804cc98b33 (diff)
downloadlibmtp-5cf12e7a959341208a74bbc17bd268342328afd2.tar.gz
Patch the udev file
-rw-r--r--ChangeLog4
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac7
3 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c1d75d9..b8fb341 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
2011-01-18 Denis Dupeyron <calchan@gentoo.org>
- * configure.ac: make Doxygen doc generation optional.
+ * configure.ac: make Doxygen doc generation optional, make
+ it possible to pass a custom name for the udev rules file,
+ use e.g. --with-udev-rules-file=70-libmtp.rules
2011-01-09 Linus Walleij <triad@df.lth.se>
diff --git a/Makefile.am b/Makefile.am
index 03ba01a..4cb9772 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,15 +10,15 @@ EXTRA_DIST=libmtp.pc libmtp.sh COPYING README.windows.txt
# build and ship it on Linux.
if USE_LINUX
udevrulesdir=$(libexecdir)/rules.d
-udevrules_DATA=libmtp.rules
+udevrules_DATA=@UDEV_RULES_FILE@
noinst_DATA=libmtp.usermap libmtp.fdi
libmtp.usermap: util/mtp-hotplug
util/mtp-hotplug > libmtp.usermap
-libmtp.rules: util/mtp-hotplug
- util/mtp-hotplug -u > libmtp.rules
+@UDEV_RULES_FILE@: util/mtp-hotplug
+ util/mtp-hotplug -u > @UDEV_RULES_FILE@
libmtp.fdi: util/mtp-hotplug
util/mtp-hotplug -H > libmtp.fdi
-CLEANFILES = libmtp.usermap libmtp.rules libmtp.fdi
+CLEANFILES = libmtp.usermap @UDEV_RULES_FILE@ libmtp.fdi
endif
diff --git a/configure.ac b/configure.ac
index a9aef87..5a541e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,13 @@ AM_ICONV
# nothing else makes sense for this.
libexecdir=/lib/udev
+# Optionally set udev rules file name
+UDEV_RULES_FILE=libmtp.rules
+AC_ARG_WITH(udev-rules-file,
+ AC_HELP_STRING([--with-udev-rules-file=NAME],
+ [udev rules file name [default=libmtp.rules]]), [UDEV_RULES_FILE="$withval"], [])
+AC_SUBST(UDEV_RULES_FILE)
+
# Optionally enable and check for doxygen
AC_ARG_ENABLE([doxygen],
AS_HELP_STRING([--enable-doxygen], [Build API documentation using Doxygen]),