On Sat, Jan 02, 2010 at 10:24:23AM +0200, Kim B. Heino wrote: > This batch of patches will unify compile commands for > librep/rep-gtk/sawfish: > > 1) ./autogen.sh > - Is this step needed with official tarballs? It is if using > git-snapshots, so let's do it... > - This will run configure with wrong parameters (/usr/local/). It > will be fixed in the next step. > > 2) %configure > - rpm will define correct --prefix etc automatically.
That is not good enough, I am afraid. If you are running ./autogen.sh that way like in those spec files then you should do it with the same flags as passed to %configure which follows. The last in these autogen scripts is './configure "$@"' and what you are passing to configure may be required for it not to fail. Because %configure is not really the same as ./configure then possibly a "better hack" is to do in a spec file ./autogen.sh -V. ./configure -V does then "display version information and exit" and the real configuration run follows that. The next problem is this line in sawfish.spec.in: @KDEDIR@/ksmserver/windowmanagers/sawfish.desktop Even if this is Fedora 11 or 12 there is no way to guarantee that this will be replaced by something meaningfull as kde may simply be not installed. In any case in spec from http://b.bbbs.net/sawfish/sawfish-1.6.0-1.fc12.src.rpm this ended up as /usr/share/apps//ksmserver/windowmanagers/sawfish.desktop which is surely wrong and only leads to errors. I am not sure how binary package on http://b.bbbs.net/sawfish/ were created. I would propose something like that instead: at the end if %install section: %if %{?_kde4_appsdir:1}%{!?_kde4_appsdir:0} %define ksmdesktop %{_kde4_appsdir}/ksmserver/windowmanagers/sawfish.desktop %else rm -f $RPM_BUILD_ROOT%{_kde4_appsdir}/ksmserver/windowmanagers/sawfish.desktop %define ksmdesktop %{nil} %endif and '%{ksmdesktop}' line in %files. Of course that depends on a presence of %{_kde4_appsdir} macro but at least Fedora 11 and 12 provide it and if it is missing we will just not get this file (which may happen to be a desired outcome). "[PATCH 2/3] rep-gtk" was completely mangled courtesy of a sending mailer and I am not sure why it adds '%{_includedir}/rep-gtk/'. Nothing was installing anything of that sort when I was recompiling rep-gtk. Michal
