[gnome-lirc-properties] Make lirc hardware.conf location configurable



commit 7f3317ecdab106556a5c978e2b055c49f9960b07
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 14 18:40:05 2010 +0100

    Make lirc hardware.conf location configurable
    
    By default /etc/lirc/hardware.conf on all distros but Fedora
    (for which we have /etc/sysconfig/lirc).
    
    Override by passing --with-lirc-conf=[location]
    
    https://bugzilla.gnome.org/show_bug.cgi?id=530648

 configure.ac                       |   11 +++++++++++
 gnome_lirc_properties/config.py.in |    2 +-
 2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 97188c3..84f91f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,10 +91,12 @@ if test -f /etc/fedora-release ; then
 	lirc_confdir="/etc/lirc"
 	remotes_database="/usr/share/lirc-remotes"
 	lircd_socket="/var/run/lirc/lircd"
+	lirc_hardware_conf="/etc/sysconfig/lirc"
 else
 	lirc_confdir="$sysconfdir/lirc"
 	remotes_database="$datadir/lirc/remotes"
 	lircd_socket="/dev/lircd"
+	lirc_hardware_conf="$lirc_confdir/hardware.conf"
 fi
 
 AC_ARG_WITH([lirc_confdir],
@@ -112,9 +114,15 @@ AC_ARG_WITH([lircd_socket],
                            [Path of the system's LIRCD socket, e.g. /dev/lircd]),
             [], [with_lircd_socket=`expand_vars "$lircd_socket"`])
 
+AC_ARG_WITH([lirc_conf],
+            AS_HELP_STRING([--with-lirc-conf],
+			   [Path of the system's lirc configuration file, e.g. /etc/lirc/hardware.conf]),
+            [], [with_lirc_hardware_conf=`expand_vars "$lirc_hardware_conf"`])
+
 AC_SUBST([with_lirc_confdir])
 AC_SUBST([with_remotes_database])
 AC_SUBST([with_lircd_socket])
+AC_SUBST([with_lirc_hardware_conf])
 
 AC_MSG_CHECKING([configured LIRC configuration folder])
 
@@ -207,6 +215,9 @@ AC_MSG_NOTICE([=================================================================
 AC_MSG_NOTICE([  PolicyKit support: $enable_policy_kit])
 AC_MSG_NOTICE([  Remotes database: $with_remotes_database])
 AC_MSG_NOTICE([  IR record tool: $LIRC_IRRECORD])
+AC_MSG_NOTICE([  LIRC configuration directory: $with_lirc_confdir])
+AC_MSG_NOTICE([  LIRC configuration file: $with_lirc_hardware_conf])
+AC_MSG_NOTICE([  LIRCd socket: $with_lircd_socket])
 AC_MSG_NOTICE([  Download URI: $with_download_uri])
 AC_MSG_NOTICE([  Upload URI: $with_upload_uri])
 AC_MSG_NOTICE([=====================================================================])
diff --git a/gnome_lirc_properties/config.py.in b/gnome_lirc_properties/config.py.in
index eeeda1c..d8a7b6f 100644
--- a/gnome_lirc_properties/config.py.in
+++ b/gnome_lirc_properties/config.py.in
@@ -13,7 +13,7 @@ PACKAGE_DIR           = path.join('@prefix@', 'share', '@PACKAGE@')
 LIRC_CONFDIR          = '@with_lirc_confdir@'
 LIRCD_SOCKET          = '@with_lircd_socket@'
 
-LIRC_HARDWARE_CONF    = path.join(LIRC_CONFDIR, 'hardware.conf')
+LIRC_HARDWARE_CONF    = '@with_lirc_hardware_conf@'
 LIRC_REMOTE_CONF      = path.join(LIRC_CONFDIR, 'lircd.conf.gnome')
 LIRC_DAEMON_CONF      = path.join(LIRC_CONFDIR, 'lircd.conf')
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]