diff --git a/Makefile b/Makefile index 7141deb..8e4783b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Makefile for postplug -# Copyright (C) 2004-2005 by Silvan Calarco +# Copyright (C) 2004-2015 by Silvan Calarco # Copyright (C) 2004-2007 by Davide Madrisan include VERSION @@ -10,6 +10,7 @@ prefix = /usr exec_prefix = $(prefix) sysconfdir = /etc bindir = $(exec_prefix)/bin +libdir := $(prefix)/lib sbindir = $(exec_prefix)/sbin sbin = /sbin mandir = $(prefix)/share/man @@ -106,6 +107,7 @@ install-scripts: $(pck_scripts) $(INSTALL_DIR) $(DESTDIR)$(sbin) $(INSTALL_SCRIPT) $^ $(DESTDIR)$(sbin) $(INSTALL_SCRIPT) scripts/update-alternatives-set-dri $(DESTDIR)$(sbin) + sed -i "s|@LIBDIR@|$(libdir)|" $(DESTDIR)$(sbin)/update-alternatives-set-dri install-programs: install-plugins install-scripts install-defs @echo "installing $(PACKAGE)..." diff --git a/scripts/update-alternatives-set-dri b/scripts/update-alternatives-set-dri index ad66b64..58fc2a8 100755 --- a/scripts/update-alternatives-set-dri +++ b/scripts/update-alternatives-set-dri @@ -1,4 +1,4 @@ #!/bin/bash # Set DRI alternatives for Mesa/Xorg -update-alternatives --set libglx.so /usr/lib64/xorg/modules/glx-dri/libglx.so -update-alternatives --set libGL.so.1 /usr/lib64/mesa/libGL.so.1.2 +update-alternatives --set libglx.so @LIBDIR@/xorg/modules/glx-dri/libglx.so +update-alternatives --set libGL.so.1 @LIBDIR@/mesa/libGL.so.1.2