diff --git a/nut-hal.patch b/nut-hal.patch new file mode 100644 index 0000000..bdad002 --- /dev/null +++ b/nut-hal.patch @@ -0,0 +1,17 @@ +Index: nut-2.6.0/m4/nut_config_libhal.m4 +=================================================================== +--- nut-2.6.0.orig/m4/nut_config_libhal.m4 ++++ nut-2.6.0/m4/nut_config_libhal.m4 +@@ -71,7 +71,11 @@ if test -z "${nut_have_config_libhal_see + dnl As per HAL spec, ยง5 Callouts addon install path: $libdir/hal + HAL_CALLOUTS_PATH="`pkg-config --silence-errors --variable=libexecdir hal 2>/dev/null`" + if test "$?" != "0" -o -z "${HAL_CALLOUTS_PATH}"; then +- HAL_CALLOUTS_PATH="${libdir}/hal" ++ if test -d "${prefix}/lib/hal"; then ++ HAL_CALLOUTS_PATH="${prefix}/lib/hal" ++ else ++ HAL_CALLOUTS_PATH="${libdir}/hal" ++ fi + fi + ]) + AC_MSG_RESULT(${HAL_CALLOUTS_PATH}) diff --git a/nut.changes b/nut.changes index d8a683b..49f2530 100644 --- a/nut.changes +++ b/nut.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- -Wed Feb 9 13:59:06 CET 2011 - sbrabec@suse.cz +Wed Feb 9 15:21:54 CET 2011 - sbrabec@suse.cz -- Do not force move hal addons - configure check does it correctly. +- Do not force move hal addons - fix configure check instead - + different SUSE versions need different path. ------------------------------------------------------------------- Tue Feb 8 10:16:54 UTC 2011 - coolo@novell.com diff --git a/nut.spec b/nut.spec index 536e9d9..31498a5 100644 --- a/nut.spec +++ b/nut.spec @@ -37,6 +37,8 @@ Source5: nut.firewall.in Source6: nut-disable-hal-hid-ups.fdi Source7: nut.sleep Patch: nut-preconfig.patch +# PATCH-FIX-OPENSUSE nut-hal.patch sbrabec@suse.cz -- Fix hal callouts path. +Patch1: nut-hal.patch Patch3: nut-notifyflag.patch Patch4: nut-powersave.patch Patch6: nut-udev.patch @@ -220,6 +222,7 @@ cp -a %{S:1} %{S:2} %{S:3} %{S:5} %{S:7} . cp -a %{S:6} 20-nut-disable-hal-hid-ups.fdi mv upsd-early-powerdown.init upsd-early-powerdown %patch +%patch1 -p1 %patch3 %if %suse_version < 1110 %patch4