# Any architecture listed in BuildArchitectures in the spec file needs to # be here as well. BuildArchitectures = i386 RPMROOT = rpmroot SPECFILE = rpm.spec TARBALL = $(PACKAGE)-$(VERSION).tar.gz rpm: $(SPECFILE) @if test ! -e $(top_srcdir)/$(TARBALL); then \ echo 'You need to "make dist" in the top-level directory first!'; \ exit 1; \ fi; @for d in SOURCES SPECS SRPMS BUILD tmp; do \ test -d "$(RPMROOT)/$$d" || mkdir -p $(RPMROOT)/$$d; \ done; \ for d in $(BuildArchitectures); do \ test -d "$(RPMROOT)/RPMS/$$d" || mkdir -p $(RPMROOT)/RPMS/$$d; \ done; \ rm -f $(RPMROOT)/SOURCES/$(TARBALL) ln -s $(top_srcdir)/../../$(TARBALL) $(RPMROOT)/SOURCES rpm --define "_topdir $$PWD/$(RPMROOT)" -ba $(SPECFILE) mv $(RPMROOT)/RPMS/*/*.rpm $(RPMROOT)/SRPMS/*.rpm . rm -rf $(RPMROOT) @echo " * "; \ echo " * "; \ echo " * RPMs in $$PWD:"; \ echo " * "; \ echo " * "; \ ls -1 *.rpm clean-local: test ! -e $(RPMROOT) || rm -rf $(RPMROOT) EXTRA_DIST = rpm.spec.in