--- ./hplip.list.in.orig	2014-03-10 14:47:05.000000000 +0100
+++ ./hplip.list.in	2014-03-10 14:56:40.000000000 +0100
@@ -83,7 +83,7 @@
 f 0755 root root $cupsfilter/hpcups hpcups
 f 0755 root root $cupsfilter/hpps prnt/filters/hpps
 %endif
-f 0644 root root /etc/hp/hplip.conf hplip.conf
+f 0644 root root @PREFIX@/etc/hp/hplip.conf hplip.conf
 f 0644 root root /etc/cups/pstotiff.convs fax/filters/pstotiff.convs
 f 0644 root root /etc/cups/pstotiff.types fax/filters/pstotiff.types
 f 0755 root root $cupsfilter/pstotiff fax/filters/pstotiff
@@ -130,14 +130,14 @@
 @epm_scan@l 0755 root root $libdir/sane/libsane-hpaio.so.1 ${hpaio-version}
 @epm_scan@%system all
 @epm_scan@%postinstall <<EOF
-@epm_scan@if [ -f /etc/sane.d/dll.conf ]; then
-@epm_scan@   grep -q ^#hpaio /etc/sane.d/dll.conf
+@epm_scan@if [ -f @PREFIX@/etc/sane.d/dll.conf ]; then
+@epm_scan@   grep -q ^#hpaio @PREFIX@/etc/sane.d/dll.conf
 @epm_scan@   if [ $$? -eq 0 ]; then
-@epm_scan@      sed -i -e s/^#hpaio/hpaio/ /etc/sane.d/dll.conf
+@epm_scan@      sed -i -e s/^#hpaio/hpaio/ @PREFIX@/etc/sane.d/dll.conf
 @epm_scan@   else
-@epm_scan@      grep -q ^hpaio /etc/sane.d/dll.conf
+@epm_scan@      grep -q ^hpaio @PREFIX@/etc/sane.d/dll.conf
 @epm_scan@      if [ $$? -ne 0 ]; then
-@epm_scan@	 echo hpaio >>/etc/sane.d/dll.conf
+@epm_scan@	 echo hpaio >>@PREFIX@/etc/sane.d/dll.conf
 @epm_scan@      fi
 @epm_scan@   fi
 @epm_scan@fi
@@ -282,41 +282,41 @@
 @epm_full@d 775 root root $htmldir/styles -
 @epm_full@f 644 root root $htmldir/styles doc/styles/*
 # python commands
-@epm_full@l 755 root root $bindir/hp-toolbox ../share/hplip/toolbox.py
-@epm_full@l 755 root root $bindir/hp-colorcal ../share/hplip/colorcal.py
-@epm_full@l 755 root root $bindir/hp-sendfax ../share/hplip/sendfax.py
-@epm_full@l 755 root root $bindir/hp-clean ../share/hplip/clean.py
-@epm_full@l 755 root root $bindir/hp-testpage ../share/hplip/testpage.py
-@epm_full@l 755 root root $bindir/hp-systray ../share/hplip/systray.py
-@epm_full@l 755 root root $bindir/hp-firmware ../share/hplip/firmware.py
-@epm_full@l 755 root root $bindir/hp-makeuri ../share/hplip/makeuri.py
-@epm_full@l 755 root root $bindir/hp-fab ../share/hplip/fab.py
-@epm_full@l 755 root root $bindir/hp-pkservice ../share/hplip/pkservice.py
-@epm_full@l 755 root root $bindir/hp-align ../share/hplip/align.py
-@epm_full@l 755 root root $bindir/hp-print ../share/hplip/print.py
-@epm_full@l 755 root root $bindir/hp-setup ../share/hplip/setup.py
-@epm_full@l 755 root root $bindir/hp-levels ../share/hplip/levels.py
-@epm_full@l 755 root root $bindir/hp-unload ../share/hplip/unload.py
-@epm_full@l 755 root root $bindir/hp-probe ../share/hplip/probe.py
-@epm_full@l 755 root root $bindir/hp-timedate ../share/hplip/timedate.py
-@epm_full@l 755 root root $bindir/hp-plugin ../share/hplip/plugin.py
-@epm_full@l 755 root root $bindir/hp-diagnose_plugin ../share/hplip/diagnose_plugin.py
-@epm_full@l 755 root root $bindir/hp-check ../share/hplip/check.py
-@epm_full@l 755 root root $bindir/hp-doctor ../share/hplip/doctor.py
-@epm_full@l 755 root root $bindir/hp-logcapture ../share/hplip/logcapture.py
-@epm_full@l 755 root root $bindir/hp-info ../share/hplip/info.py
-@epm_full@l 755 root root $bindir/hp-makecopies ../share/hplip/makecopies.py
-@epm_full@l 755 root root $bindir/hp-scan ../share/hplip/scan.py
-@epm_full@l 755 root root $bindir/hp-faxsetup ../share/hplip/faxsetup.py
-@epm_full@l 755 root root $bindir/hp-linefeedcal ../share/hplip/linefeedcal.py
-@epm_full@l 755 root root $bindir/hp-printsettings ../share/hplip/printsettings.py
-@epm_full@l 755 root root $bindir/hp-query ../share/hplip/query.py
-@epm_full@l 755 root root $bindir/hp-wificonfig ../share/hplip/wificonfig.py
-@epm_full@l 755 root root $bindir/hp-devicesettings ../share/hplip/devicesettings.py
-@epm_full@l 755 root root $bindir/hp-uninstall ../share/hplip/uninstall.py
-@epm_full@l 755 root root $bindir/hp-upgrade ../share/hplip/upgrade.py
-@epm_full@l 755 root root $bindir/hp-config_usb_printer ../share/hplip/config_usb_printer.py
-@epm_full@l 755 root root $bindir/hp-diagnose_queues ../share/hplip/diagnose_queues.py
+@epm_full@l 755 root root $bindir/hp-toolbox ${datadir}/hplip/toolbox.py
+@epm_full@l 755 root root $bindir/hp-colorcal ${datadir}/hplip/colorcal.py
+@epm_full@l 755 root root $bindir/hp-sendfax ${datadir}/hplip/sendfax.py
+@epm_full@l 755 root root $bindir/hp-clean ${datadir}/hplip/clean.py
+@epm_full@l 755 root root $bindir/hp-testpage ${datadir}/hplip/testpage.py
+@epm_full@l 755 root root $bindir/hp-systray ${datadir}/hplip/systray.py
+@epm_full@l 755 root root $bindir/hp-firmware ${datadir}/hplip/firmware.py
+@epm_full@l 755 root root $bindir/hp-makeuri ${datadir}/hplip/makeuri.py
+@epm_full@l 755 root root $bindir/hp-fab ${datadir}/hplip/fab.py
+@epm_full@l 755 root root $bindir/hp-pkservice ${datadir}/hplip/pkservice.py
+@epm_full@l 755 root root $bindir/hp-align ${datadir}/hplip/align.py
+@epm_full@l 755 root root $bindir/hp-print ${datadir}/hplip/print.py
+@epm_full@l 755 root root $bindir/hp-setup ${datadir}/hplip/setup.py
+@epm_full@l 755 root root $bindir/hp-levels ${datadir}/hplip/levels.py
+@epm_full@l 755 root root $bindir/hp-unload ${datadir}/hplip/unload.py
+@epm_full@l 755 root root $bindir/hp-probe ${datadir}/hplip/probe.py
+@epm_full@l 755 root root $bindir/hp-timedate ${datadir}/hplip/timedate.py
+@epm_full@l 755 root root $bindir/hp-plugin ${datadir}/hplip/plugin.py
+@epm_full@l 755 root root $bindir/hp-diagnose_plugin ${datadir}/hplip/diagnose_plugin.py
+@epm_full@l 755 root root $bindir/hp-check ${datadir}/hplip/check.py
+@epm_full@l 755 root root $bindir/hp-doctor ${datadir}/hplip/doctor.py
+@epm_full@l 755 root root $bindir/hp-logcapture ${datadir}/hplip/logcapture.py
+@epm_full@l 755 root root $bindir/hp-info ${datadir}/hplip/info.py
+@epm_full@l 755 root root $bindir/hp-makecopies ${datadir}/hplip/makecopies.py
+@epm_full@l 755 root root $bindir/hp-scan ${datadir}/hplip/scan.py
+@epm_full@l 755 root root $bindir/hp-faxsetup ${datadir}/hplip/faxsetup.py
+@epm_full@l 755 root root $bindir/hp-linefeedcal ${datadir}/hplip/linefeedcal.py
+@epm_full@l 755 root root $bindir/hp-printsettings ${datadir}/hplip/printsettings.py
+@epm_full@l 755 root root $bindir/hp-query ${datadir}/hplip/query.py
+@epm_full@l 755 root root $bindir/hp-wificonfig ${datadir}/hplip/wificonfig.py
+@epm_full@l 755 root root $bindir/hp-devicesettings ${datadir}/hplip/devicesettings.py
+@epm_full@l 755 root root $bindir/hp-uninstall ${datadir}/hplip/uninstall.py
+@epm_full@l 755 root root $bindir/hp-upgrade ${datadir}/hplip/upgrade.py
+@epm_full@l 755 root root $bindir/hp-config_usb_printer ${datadir}/hplip/config_usb_printer.py
+@epm_full@l 755 root root $bindir/hp-diagnose_queues ${datadir}/hplip/diagnose_queues.py
 
 # qt4
 @epm_full@@epm_qt4@d 775 root root $home/ui4 -
@@ -332,7 +332,7 @@
 
 # Use LINPUS8 for Acer Aspire One
 %if LINPUS8 RHEL5
-@epm_print_only_exclude@f 0644 root root /etc/udev/rules.d/56-hpmud_sysfs.rules data/rules/56-hpmud_sysfs.rules
+@epm_print_only_exclude@f 0644 root root @PREFIX@/etc/udev/rules.d/56-hpmud_sysfs.rules data/rules/56-hpmud_sysfs.rules
 %endif
 
 %if RHEL3
@@ -350,7 +350,7 @@
 
 %system !darwin
 %if !LINPUS8 !RHEL3 !UBUNTU804 !SUSE9 !RHEL5
-@epm_print_only_exclude@f 0644 root root /etc/udev/rules.d/56-hpmud.rules data/rules/56-hpmud.rules
+@epm_print_only_exclude@f 0644 root root @PREFIX@/etc/udev/rules.d/56-hpmud.rules data/rules/56-hpmud.rules
 @epm_print_only_exclude@f 0644 root root /usr/share/hal/fdi/preprobe/10osvendor/20-hplip-devices.fdi data/rules/20-hplip-devices.fdi
 %endif
 %system all
@@ -388,7 +388,7 @@
 @epm_full@%replaces hplip-data
 @epm_full@f 0644 root root /usr/share/hal/fdi/preprobe/10osvendor/20-hplip-devices.fdi data/rules/20-hplip-devices.fdi
 @epm_full@%postinstall <<EOF
-@epm_full@install -m 644 data/rules/56-hpmud.rules /etc/udev/rules.d
+@epm_full@install -m 644 data/rules/56-hpmud.rules @PREFIX@/etc/udev/rules.d
 @epm_full@EOF
 %endif
 
@@ -399,7 +399,7 @@
 @epm_lite@%replaces hplip-data
 @epm_lite@f 0644 root root /usr/share/hal/fdi/preprobe/10osvendor/20-hplip-devices.fdi data/rules/20-hplip-devices.fdi
 @epm_lite@%postinstall <<EOF
-@epm_lite@install -m 644 data/rules/56-hpmud.rules /etc/udev/rules.d
+@epm_lite@install -m 644 data/rules/56-hpmud.rules @PREFIX@/etc/udev/rules.d
 @epm_lite@EOF
 %endif
 
@@ -422,7 +422,7 @@
 @epm_full@%replaces hplip-data
 @epm_full@%replaces hplip-gui
 @epm_full@%postinstall <<EOF
-@epm_full@sed -i -e s/GROUP=\"lp\"/GROUP=\"scanner\"/ /etc/udev/rules.d/56-hpmud.rules
+@epm_full@sed -i -e s/GROUP=\"lp\"/GROUP=\"scanner\"/ @PREFIX@/etc/udev/rules.d/56-hpmud.rules
 @epm_full@EOF
 %endif
 
@@ -442,7 +442,7 @@
 @epm_lite@%replaces hplip
 @epm_lite@%replaces hplip-data
 @epm_lite@%postinstall <<EOF
-@epm_lite@sed -i -e s/GROUP=\"lp\"/GROUP=\"scanner\"/ /etc/udev/rules.d/56-hpmud.rules
+@epm_lite@sed -i -e s/GROUP=\"lp\"/GROUP=\"scanner\"/ @PREFIX@/etc/udev/rules.d/56-hpmud.rules
 @epm_lite@EOF
 %endif
 
@@ -450,7 +450,7 @@
 f 0644 root root $docdir/license.txt prnt/plugins/license.txt
 f 0644 root root $docdir/COPYING prnt/plugins/license.txt
 f 0644 root root $docdir/copyright prnt/plugins/copyright
-d 0755 root root /var/lib/hp/ -
+d 0755 root root @PREFIX@/var/lib/hp/ -
 f 0644 root root $home/data/firmware data/firmware/*.fw.gz
 d 0775 root root $home/data/plugin -
 
@@ -487,10 +487,10 @@
 %else
 f 0644 root root $docdir/COPYING COPYING
 f 0644 root root $docdir/copyright copyright
-d 0755 root root /var/lib/hp/ -
+d 0755 root root @PREFIX@/var/lib/hp/ -
 
 %system !darwin
-@epm_print_only_exclude@f 0644 root root /etc/udev/rules.d/56-hpmud.rules data/rules/56-hpmud.rules
+@epm_print_only_exclude@f 0644 root root @PREFIX@/etc/udev/rules.d/56-hpmud.rules data/rules/56-hpmud.rules
 
 %system all
 %endif

