# vim:ft=automake
RPM_BUILDDIR= ~/rpmbuild
+RPM_SOURCESDIR= $(RPM_BUILDDIR)/SOURCES
RPM_BUILD_TARGET= @PACKAGE@-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm
-RPM_SOURCE= $(RPM_BUILDDIR)/SOURCES/$(DIST_ARCHIVES)
+RPM_SOURCE= $(RPM_SOURCESDIR)/$(DIST_ARCHIVES)
RPMS=
RPMS+= $(RPM_BUILD_TARGET)
$(DIST_ARCHIVES): $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) dist-gzip
-$(RPM_SOURCE): | $(RPM_BUILDDIR) $(DIST_ARCHIVES)
- @cp $(DIST_ARCHIVES) $(RPM_SOURCE)
+$(RPM_SOURCE): $(DIST_ARCHIVES) $(RPM_BUILDDIR)
+ @cp $< $@
$(RPM_BUILD_TARGET): $(RPM_SOURCE) support/@PACKAGE@.spec
-@rm -f $(BUILD_RPMS) $(BUILD_SRPMS)