Salut,
J'ai fait un patch pour le Makefile qui utilise rpm --eval %_topdir pour
trouver le repertoire pour la construction des rpms. De meme pour
l'architecture.
Pat
Index: Makefile
===================================================================
RCS file: /cvs/eagleusb/eagleusb/Makefile,v
retrieving revision 1.11
diff -u -3 -p -u -r1.11 Makefile
--- Makefile 11 May 2004 19:42:49 -0000 1.11
+++ Makefile 12 May 2004 18:37:36 -0000
@@ -91,29 +91,28 @@ dist: maintainer-clean
rm -f ../$(ARCHNAME).tar.bz2 && \
./makedist $(ARCHNAME) `pwd`
+RPMTOPDIR=$(shell rpm --eval %_topdir)
+RPMARCH=$(shell rpm --eval %_arch)
+
rpm: dist
- if [ `id -ur` == 0 ] ; then \
- rm -f /usr/src/RPM/SOURCES/$(ARCHNAME).tar.bz2 ; \
- cp ../eagle-usb.dist/$(ARCHNAME).tar.bz2 /usr/src/RPM/SOURCES ;
\
- rpm -ba eagle-usb.spec ; \
- mv -f /usr/src/RPM/RPMS/i586/eagle-usb-*.rpm ../eagle-usb.dist
; \
- mv -f /usr/src/RPM/SRPMS/eagle-usb-*.rpm ../eagle-usb.dist ; \
- else \
- if [ "`whereis -b rpmbuild`" = "rpmb:" ] ; then \
- echo "Error: rpm-build was not found on your system!" ;
\
- exit 1 ; \
- fi ; \
- if [ ! -d ~/rpm ] ; then \
- echo "Error: ~/rpm missing, you should consider reading
Mandrake's RpmHowTo..." ; \
- exit 1 ; \
- fi ; \
- rm -f ~/rpm/SOURCES/$(ARCHNAME).tar.bz2 ; \
- cp ../eagle-usb.dist/$(ARCHNAME).tar.bz2 ~/rpm/SOURCES ; \
- rpm -ba eagle-usb.spec ; \
- mv -f ~/rpm/RPMS/i586/eagle-usb-*.rpm ../eagle-usb.dist ; \
- mv -f ~/rpm/SRPMS/eagle-usb-*.rpm ../eagle-usb.dist ; \
+ if [ "`whereis -b rpmbuild`" = "rpmb:" ] ; then \
+ echo "Error: rpm-build was not found on your system!" ; \
+ exit 1 ; \
fi
- #rpmbuild -ta ../eagle-usb.dist/$(ARCHNAME).tar.bz2 ; \
+ if [ "z$(RPMTOPDIR)" = "z" ]; then \
+ echo "Error: no rpm top dir"; \
+ exit 1 ; \
+ fi
+ if [ ! -d "$(RPMTOPDIR)" ]; then \
+ echo "Error: rpm top dir not a directory"; \
+ exit 1 ; \
+ fi
+ rm -f "$(RPMTOPDIR)/SOURCES/$(ARCHNAME).tar.bz2 "
+ cp ../eagle-usb.dist/$(ARCHNAME).tar.bz2 $(RPMTOPDIR)/SOURCES
+ rpmbuild -ba eagle-usb.spec
+ mv -f $(RPMTOPDIR)/SRPMS/eagle-usb-*.rpm ../eagle-usb.dist
+ mv -f $(RPMTOPDIR)/RPMS/$(RPMARCH)/eagle-usb-*.rpm ../eagle-usb.dist
+ #rpmbuild -ta ../eagle-usb.dist/$(ARCHNAME).tar.bz2
.PHONY: all build install uninstall clean distclean maintainer-clean dist rpm