update-alternatives-set-dir: make libdir parametric

This commit is contained in:
Silvan Calarco 2015-02-08 21:40:04 +01:00
parent ba52c3f82b
commit 1c1cd54ad6
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# Makefile for postplug
# Copyright (C) 2004-2005 by Silvan Calarco <silvan.calarco@qilinux.it>
# Copyright (C) 2004-2015 by Silvan Calarco <silvan.calarco@qilinux.it>
# Copyright (C) 2004-2007 by Davide Madrisan <davide.madrisan@gmail.com>
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)..."

View File

@ -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