Re: [PATCH] Do not hardcode "/usr/share" in build scripts.



On date Tuesday 2010-12-07 11:10:39 +0900, Teika Kazura opened this window:
> Hi. There's one more point to avoid "/usr/share". The installation
> fails without root privilege.
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=636023

Yes, exactly this is the reason for which I patched my local
branch. And I suppose KDE should have some way to support custom
prefix dirs (e.g. for a local opt install).
 
> So please accept his patch. (cfg/Makefile.in has one more /usr/share
> in "uninstall" section.)

Fixed.
 
> Thanks Stefano and Chris,
> Teika (Teika kazura)

Regards.
>From 294cb8330b267bcb97d73d26e40d94aaab916def Mon Sep 17 00:00:00 2001
From: Stefano Sabatini <stefano arborea caos org>
Date: Sat, 4 Dec 2010 13:15:27 +0100
Subject: [PATCH] Do not hardcode "/usr/share" in build scripts.

Use ${datadir} instead. In particualr fix installation without root
permission.
---
 configure.in                 |    2 +-
 lisp/sawfish/cfg/Makefile.in |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.in b/configure.in
index f4edf2f..6cb4845 100644
--- a/configure.in
+++ b/configure.in
@@ -333,7 +333,7 @@ dnl install directory for sawfish-ksm.desktop
 KDEDIR="`kde4-config --install data`"
 
 if test "x$KDEDIR" = x; then
-	KDEDIR="/usr/share/kde4/apps/"
+	KDEDIR="${datadir}/kde4/apps/"
 fi
 
 gitdate=`date +%y%m%d`
diff --git a/lisp/sawfish/cfg/Makefile.in b/lisp/sawfish/cfg/Makefile.in
index 7d93a1f..ec43141 100644
--- a/lisp/sawfish/cfg/Makefile.in
+++ b/lisp/sawfish/cfg/Makefile.in
@@ -79,18 +79,18 @@ install : all installdirs
 	  $(INSTALL_DATA) $$p $(DESTDIR)${lispdir}/sawfish/cfg/layouts; \
 	done
 	$(INSTALL_SCRIPT) main.jlc $(DESTDIR)${bindir}/sawfish-config
-	$(INSTALL_DATA) sawfish-config.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/
+	$(INSTALL_DATA) sawfish-config.png $(DESTDIR)${datadir}/icons/hicolor/32x32/apps/
 
 uninstall :
 	rm -rf $(DESTDIR)${lispdir}/sawfish/cfg
-	rm -f $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/sawfish-config.png
+	rm -f $(DESTDIR)${datadir}/icons/hicolor/32x32/apps/sawfish-config.png
 	rm -f $(DESTDIR)${bindir}/sawfish-config
 
 installdirs : $(top_srcdir)/mkinstalldirs
 	$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(lispdir)/sawfish/cfg \
 	  $(DESTDIR)$(lispdir)/sawfish/cfg/widgets \
 	  $(DESTDIR)$(lispdir)/sawfish/cfg/layouts $(DESTDIR)$(bindir) \
-	  $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/
+	  $(DESTDIR)${datadir}/icons/hicolor/32x32/apps/
 
 clean : 
 	rm -f *.jlc *~ core
-- 
1.7.2.3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]