On Tue, Jan 21, 2003 at 03:14:39PM +0000, Angus Leeming wrote: > rpm has been split in 2 on RH8. "rpm" will install, update, query and > "rpmbuild" will generate an rpm from the source files. > > So, I guess that there needs to be a test for the presence of > rpmbuild somewhere.
How about this? It works for me. ---Kayvan -- Kayvan A. Sylvan | Proud husband of | Father to my kids: Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena (8/8/89) http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)
Index: Makefile.am =================================================================== RCS file: /cvs/lyx/lyx-devel/Makefile.am,v retrieving revision 1.42 diff -u -u -r1.42 Makefile.am --- Makefile.am 2003/01/18 22:42:57 1.42 +++ Makefile.am 2003/01/21 17:13:37 @@ -29,7 +29,12 @@ rpmdist: dist ln -s lib/images/lyx.xpm . ; \ - rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz ; saved_status=$$?; \ + if [ -z "`type -path rpmbuild`" ]; \ + then \ + RPMBUILD=rpm; \ + else \ + RPMBUILD=rpmbuild; \ + fi; $$RPMBUILD -ta $(PACKAGE)-$(VERSION).tar.gz ; saved_status=$$?; \ rm lyx.xpm; exit $$saved_status bindist: