From 8fdb3b9af3235a899e0bfa04ccc09367dccaa1fd Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Mon, 10 Sep 2012 12:34:58 +0200 Subject: [PATCH] udev: improve paths --- sane-backends.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sane-backends.spec b/sane-backends.spec index 93547bb..a544fe7 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -9,6 +9,12 @@ %global _hardened_build 1 %endif +%if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%global udevrulesdir %{prefix}/lib/udev/rules.d +%else +%global udevrulesdir /lib/udev/rules.d +%endif + Summary: Scanner access software Name: sane-backends Version: 1.0.23 @@ -148,8 +154,8 @@ rm -f %{buildroot}%{_mandir}/man1/gamma4scanimage.1* rm -f %{buildroot}%{_libdir}/sane/*.a %{buildroot}%{_libdir}/*.a rm -f %{buildroot}%{_libdir}/libsane*.la %{buildroot}%{_libdir}/sane/*.la -mkdir -p %{buildroot}/lib/udev/rules.d -install -m 0644 tools/udev/libsane.rules %{buildroot}/lib/udev/rules.d/65-libsane.rules +mkdir -p %{buildroot}%{udevrulesdir} +install -m 0644 tools/udev/libsane.rules %{buildroot}%{udevrulesdir}/65-libsane.rules mkdir -p %{buildroot}%{_libdir}/pkgconfig install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/ @@ -164,7 +170,7 @@ install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/ %dir /etc/sane.d %dir /etc/sane.d/dll.d %config(noreplace) /etc/sane.d/*.conf -/lib/udev/rules.d/65-libsane.rules +%{udevrulesdir}/65-libsane.rules %{_datadir}/pixmaps/sane.png %{_bindir}/sane-find-scanner @@ -200,7 +206,7 @@ install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/ %changelog * Mon Sep 10 2012 Nils Philippsen - 1.0.23-3 -- udev: set up for generic user access rules +- udev: set up for generic user access rules, improve paths * Tue Sep 04 2012 Nils Philippsen - 1.0.23-2 - make installed sane-config multi-lib aware again