-# srcdir is the top level nmh source directory.
-# tarfile and version are as specified in this file. rpmbuild does
-# not allow Version to contain any dashes.
-rpm: all nmhdist
+rpm: nmhdist
+ @test -d $(rpmdir)/SOURCES || mkdir -p $(rpmdir)/SOURCES
+ @test -d $(rpmdir)/SPECS || mkdir -p $(rpmdir)/SPECS
+ @mv -f $(tarfile) $(rpmdir)/SOURCES
+ @cp -p VERSION $(rpmdir)/SOURCES
+ @cp -p nmh.spec $(rpmdir)/SPECS