This is a long email, so let me give a brief summary: I didn't notice INSTALL_PREFIX. This solves the make install issue. Except for creating INSTALL_PREFIX/BINDIR; the specfile/user can do that manually, but it would be better if the Makefile did it.
Passing all of rpm's stuff to ./Configure based on the site, user, env, and command-line settings is still messy. Take a look at what rpmbuild actually does with a line like "%configure" (and check it out on two different distros/versions/platforms/large sites). All those options (well, the ones that are relevant to the project) have to be handled the same way by metaconfig as by autoconf, or the ignorant will assume that metaconfig is inferior (rather than that RPM was built around autoconf). The options are: 1. Have an ugly specfile for any metaconfig'd project. 2. Improve the ./configure front-end to ./Configure. 3. Get metaconfig-friendly macros into RPM. If you don't expect anyone else to use metaconfig, #1 is obviously the simplest. Otherwise, I think we should definitely work toward #3, whether or not you want to do #2. I'm pretty sure I can get such macros into Mandrake--and I'm pretty sure someone else will have to deal with Redhat. It's up to you; do you think it's worth doing? On Tue, 2003-08-12 at 15:27, Raphael Manfredi wrote: > Quoting Andrew Barnert <[EMAIL PROTECTED]> from ml.softs.gtk-gnutella.devel: > :One minor problem, for building RPM's: make install assumes that the BINDIR > :already exists.... > > Hmm... No, the BINDIR should exist beforehand. Not when you're building an RPM, it shouldn't. The BINDIR passed to make install is something like /var/tmp/rpmbuild-foo-1.2-20030812-1/usr/bin, and since we've just rm -rf'd and mkdir'd the directory from scratch, it's not going to have a usr/bin subdirectory. > Is it hard to pre-create? Not at all. Look at the specfile fragment that you quoted below: the one line right before the %makeinstall is all it takes. But it would be nice if the Makefile checked for this and did it for you. > :%build > :./Configure -D_prefix=%_prefix/ -Dbindir=%_bindir/ -Dprivlib=%_datadir/%name/ > :-Dsysman=%_mandir/man1/ -Dcc="$CC" -Dccflags="-Wall $CFLAGS" > :-Doptimize="%optflags" -Dgtkversion=2 -Dremotectrl=true -ders > :%make > : > :%install > :rm -rf $RPM_BUILD_ROOTway, > :mkdir -p $RPM_BUILD_ROOT/%_bindir > :%makeinstall DESTDIR=$RPM_BUILD_ROOT/ PREFIX=$RPM_BUILD_ROOT/%_prefix/ > :BINDIR=$RPM_BUILD_ROOT/%_bindir/ PRIVLIB=$RPM_BUILD_ROOT/%_datadir/%name/ > > You should use the INSTALL_PREFIX=%_prefix parameter to shorten the above! I think you mean INSTALL_PREFIX=$RPM_BUILD_ROOT. But yet, this simplifies the %install section to this: rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%_bindir %makeinstall INSTALL_PREFIX=$RPM_BUILD_ROOT/ But it doesn't help with the ./Configure line; there's no way of knowing what %_bindir, etc. are on any given system, or how they relate to %_prefix or each other. If we're going to have the macros added to RPM, the %makeinstall_meta would be just "make install INSTALL_PREFIX=$RPM_BUILD_ROOT/", but the %configure_meta is going to be just as hairy as the %configure. > Please avoid using the "crap" qualifying adjective when referring to > metaconfig. That is reserved for autoconf. ;-) So even when intentionally emulating autoconf's craptasticity, metaconfig is still 100% crap-free? Now that's impressive! > If you run "metaconfig -m -G", it will already produce a "configure" > frontend. I guess one could start from here and tailor the default > configure further. This is cool, but it sounds like the default only gives you the basics; to get things like --with-gtkversion=2, or the i18n stuff, or even --bindir=/opt/bin is going to require extra work. In the long run, I think either RPM needs to understand metaconfig, or metaconfig's ./configure front end has to get smart enough to understand all of those options. Are you going to do that, or are you looking for volunteers? > :2. Generate a Makefile that honors the autoconf-style defines (prefix, > :exec_prefix, etc.). Alternatively, just honor DESTDIR and "%makeinstall > :DESTDIR=$RPM_BUILD_ROOT" will work 99% of the time. Never mind, INSTALL_PREFIX == DESTDIR. > :I suppose the real solution is to build metaconfig-aware rpm macros instead > :(so you'd just use %configure_meta and %makeinstall_meta--or, better yet, > :%configure and %makeinstall would automagically figure out that the package > :uses metaconfig and act accordingly). I'll see if the Mandrake people are > :interested in such a solution. It handles the make install part, but it doesn't help for the billion site- and user-customizable variables that are designed to be passed to ./configure and have to get passed to ./Configure. > Nah, this would depend too much on the goodwill of people writing units. > Remember that Configure is meant to be an interactive configuration tool. Which is yet another reason why rpmbuild should be interactive, but that's a whole separate topic. > It would be better to add support in metaconfig directly, and embed the > help text in the units. However, this would only be done for things that > the user would want to override at build-time. I won't do that now, > however. Yes, that seems like a good solution, but also seems a bit more long-term than 0.92.1.... ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Gtk-gnutella-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel
