[PATCH] kde4 and spec



Attached patch fixes:

- configure: Use "kde4-config --install" to get directory, no sed-magic
  needed.
- configure: Fix default kde4 apps directory to match
  Fedora/Ubuntu/Debian. (PLEASE VERIFY!)
- spec: Find correct directories in runtime instead of hardcoding them
  in configure script. This is needed to create portable source rpm.
- spec: Remove one tailing white space.


diff -ur orig/configure.in sawfish/configure.in
--- orig/configure.in	2009-12-28 14:26:27.000000000 +0200
+++ sawfish/configure.in	2009-12-28 14:32:35.000000000 +0200
@@ -345,10 +345,10 @@
 AC_MSG_RESULT($LINGUAS)
 
 dnl install directory for sawfish-ksm.desktop
-KDEDIR="`kde4-config --path data | sed -e 's/.*://g'`"
+KDEDIR="`kde4-config --install data`"
 
 if test "x$KDEDIR" = x; then
-	KDEDIR="/usr/share/apps/"
+	KDEDIR="/usr/share/kde4/apps/"
 fi
 
 dnl Nonstandard exported symbols
diff -ur orig/sawfish.spec.in sawfish/sawfish.spec.in
--- orig/sawfish.spec.in	2009-12-28 14:26:27.000000000 +0200
+++ sawfish/sawfish.spec.in	2009-12-28 14:46:03.000000000 +0200
@@ -12,6 +12,13 @@
 BuildRequires: gmp-devel texinfo
 Provides: windowmanager
 
+%define rep_execdir %(pkg-config librep --variable=repcommonexecdir)
+%if %(kde4-config; echo $?)
+%define kde_apps %{_datadir}/kde4/apps/
+%else
+%define kde_apps %(kde4-config --install data)
+%endif
+
 %description
 Sawfish is an extensible window manager which uses a Lisp-based
 scripting language.  All window decorations are configurable and the
@@ -26,7 +33,7 @@
 %build
 ./autogen.sh \
 	--x-libraries=%{_libdir} \
-	--x-includes=/usr/include/X11 
+	--x-includes=/usr/include/X11
 
 %configure
 make host_type=%{_target_platform}
@@ -63,13 +70,13 @@
 %{_datadir}/sawfish/%{version}
 %{_datadir}/gnome/wm-properties/sawfish-wm.desktop
 %{_datadir}/applications/sawfish.desktop
- KDEDIR@/ksmserver/windowmanagers/sawfish.desktop
+%{kde_apps}/ksmserver/windowmanagers/sawfish.desktop
 %{_datadir}/xsessions/sawfish.desktop
 %{_datadir}/man/man1/sawfish*.gz
 %{_datadir}/sawfish/sawfish.png
 %{_libdir}/pkgconfig/sawfish.pc
 %{_libdir}/sawfish/%{version}/%{_host}
- REP_EXECDIR@/sawfish
+%{rep_execdir}/sawfish
 %{_infodir}/sawfish*
 
 %changelog


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