[OS-BUILD PATCHv3 2/17] redhat/Makefile: Use SPECFILE variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

redhat/Makefile: Use SPECFILE variable

Use the SPECFILE variable throughout the Makefiles.

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -548,7 +548,7 @@ dist-test-patch: generate-testpatch-tmp
 	@mv $(TESTPATCH).tmp $(TESTPATCH);
 
 do-rpmbuild: dist-sources
-	$(RPMBUILD) --define "_sourcedir $(SOURCES)" --define "_builddir $(RPM)/BUILD" --define "_srcrpmdir $(RPM)/SRPMS" --define "_rpmdir $(RPM)/RPMS" --define "_specdir $(RPM)/SPECS" --define "dist $(DIST)" $(RPMBUILDOPTS) $(RPM)/SOURCES/$(PACKAGE_NAME).spec
+	$(RPMBUILD) --define "_sourcedir $(SOURCES)" --define "_builddir $(RPM)/BUILD" --define "_srcrpmdir $(RPM)/SRPMS" --define "_rpmdir $(RPM)/RPMS" --define "_specdir $(RPM)/SPECS" --define "dist $(DIST)" $(RPMBUILDOPTS) $(RPM)/SOURCES/$(SPECFILE)
 
 dist-all-rpms: RPMBUILDOPTS=--target $(MACH) -ba
 dist-all-rpms: dist-sources do-rpmbuild
@@ -580,7 +580,7 @@ dist-release-finish: setup-source
 	@cp $(SOURCES)/$(SPECCHANGELOG) $(REDHAT)/$(SPECCHANGELOG)
 	@$(GIT) add $(REDHAT)/$(SPECCHANGELOG)
 	@$(GIT) add $(REDHAT)/marker
-	@$(GIT) commit -s ../Makefile.rhelver $(REDHAT)/marker $(REDHAT)/$(SPECCHANGELOG) $(PACKAGE_NAME).spec.template -m "[redhat] $(PACKAGE_NAME)-$(RPMVERSION)"
+	@$(GIT) commit -s ../Makefile.rhelver $(REDHAT)/marker $(REDHAT)/$(SPECCHANGELOG) $(SPECFILE).template -m "[redhat] $(PACKAGE_NAME)-$(RPMVERSION)"
 dist-release-changed: setup-source
 	@cp $(SOURCES)/$(SPECCHANGELOG) $(REDHAT)/$(SPECCHANGELOG)
 	@echo $(MARKER) > $(REDHAT)/marker
@@ -643,8 +643,8 @@ dist-brew dist-koji: dist-%: dist-vr-check dist-srpm
 distg-brew distg-koji: distg-%: dist-vr-check
 	$* $(BUILD_PROFILE) build $(BUILD_FLAGS) $(BUILD_TARGET) "$(RHGITURL)?redhat/koji#$(RHGITCOMMIT)"
 
-.PHONY: $(REDHAT)/rpm/SOURCES/$(PACKAGE_NAME).spec
-$(REDHAT)/rpm/SOURCES/$(PACKAGE_NAME).spec:
+.PHONY: $(REDHAT)/rpm/SOURCES/$(SPECFILE)
+$(REDHAT)/rpm/SOURCES/$(SPECFILE):
 	@echo "dist-sources"
 	@$(MAKE) dist-sources
 
diff --git a/redhat/Makefile.cross b/redhat/Makefile.cross
index blahblah..blahblah 100644
--- a/redhat/Makefile.cross
+++ b/redhat/Makefile.cross
@@ -26,46 +26,46 @@ dist-cross-download:
 
 dist-cross-aarch64-rpms: dist-cross-download dist-sources
 	$(REDHAT)/scripts/x86_rngd.sh
-	$(CROSS_RPMFLAGS) --target aarch64 --with cross -ba $(RPM)/SOURCES/$(PACKAGE_NAME).spec
+	$(CROSS_RPMFLAGS) --target aarch64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE)
 	$(REDHAT)/scripts/generate-cross-report.sh "aarch64"
 
 dist-cross-ppc64-rpms: dist-cross-download dist-sources
 	$(REDHAT)/scripts/x86_rngd.sh
-	$(CROSS_RPMFLAGS) --target ppc64 --with cross -ba $(RPM)/SOURCES/$(PACKAGE_NAME).spec
+	$(CROSS_RPMFLAGS) --target ppc64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE)
 	$(REDHAT)/scripts/generate-cross-report.sh "ppc64"
 
 dist-cross-s390x-rpms: dist-cross-download dist-sources
 	$(REDHAT)/scripts/x86_rngd.sh
-	$(CROSS_RPMFLAGS) --target s390x --with cross -ba $(RPM)/SOURCES/$(PACKAGE_NAME).spec
+	$(CROSS_RPMFLAGS) --target s390x --with cross -ba $(RPM)/SOURCES/$(SPECFILE)
 	$(REDHAT)/scripts/generate-cross-report.sh "s390x"
 
 dist-cross-all-rpms: dist-cross-download dist-sources
 	$(REDHAT)/scripts/x86_rngd.sh
-	$(CROSS_RPMFLAGS) --target aarch64 --with cross -ba $(RPM)/SOURCES/$(PACKAGE_NAME).spec
-	$(CROSS_RPMFLAGS) --target ppc64 --with cross -ba $(RPM)/SOURCES/$(PACKAGE_NAME).spec
-	$(CROSS_RPMFLAGS) --target s390x --with cross -ba $(RPM)/SOURCES/$(PACKAGE_NAME).spec
-	$(CROSS_RPMFLAGS) -ba $(RPM)/SOURCES/$(PACKAGE_NAME).spec
+	$(CROSS_RPMFLAGS) --target aarch64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE)
+	$(CROSS_RPMFLAGS) --target ppc64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE)
+	$(CROSS_RPMFLAGS) --target s390x --with cross -ba $(RPM)/SOURCES/$(SPECFILE)
+	$(CROSS_RPMFLAGS) -ba $(RPM)/SOURCES/$(SPECFILE)
 	$(REDHAT)/scripts/generate-cross-report.sh "aarch64 ppc64 s390x x86_64"
 
 dist-cross-aarch64-build: dist-cross-download dist-sources
 	$(REDHAT)/scripts/x86_rngd.sh
-	$(CROSS_RPMFLAGS) --target aarch64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(PACKAGE_NAME).spec
+	$(CROSS_RPMFLAGS) --target aarch64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE)
 	$(REDHAT)/scripts/generate-cross-report.sh "aarch64"
 
 dist-cross-ppc64-build: dist-cross-download dist-sources
 	$(REDHAT)/scripts/x86_rngd.sh
-	$(CROSS_RPMFLAGS) --target ppc64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(PACKAGE_NAME).spec
+	$(CROSS_RPMFLAGS) --target ppc64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE)
 	$(REDHAT)/scripts/generate-cross-report.sh "ppc64"
 
 dist-cross-s390x-build: dist-cross-download dist-sources
 	$(REDHAT)/scripts/x86_rngd.sh
-	$(CROSS_RPMFLAGS) --target s390x --with cross --without debuginfo -bc $(RPM)/SOURCES/$(PACKAGE_NAME).spec
+	$(CROSS_RPMFLAGS) --target s390x --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE)
 	$(REDHAT)/scripts/generate-cross-report.sh "s390x"
 
 dist-cross-all-builds: dist-cross-download dist-sources
 	$(REDHAT)/scripts/x86_rngd.sh
-	$(CROSS_RPMFLAGS) --target aarch64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(PACKAGE_NAME).spec
-	$(CROSS_RPMFLAGS) --target ppc64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(PACKAGE_NAME).spec
-	$(CROSS_RPMFLAGS) --target s390x --with cross --without debuginfo -bc $(RPM)/SOURCES/$(PACKAGE_NAME).spec
-	$(CROSS_RPMFLAGS) --without debuginfo -bc $(RPM)/SOURCES/$(PACKAGE_NAME).spec
+	$(CROSS_RPMFLAGS) --target aarch64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE)
+	$(CROSS_RPMFLAGS) --target ppc64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE)
+	$(CROSS_RPMFLAGS) --target s390x --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE)
+	$(CROSS_RPMFLAGS) --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE)
 	$(REDHAT)/scripts/generate-cross-report.sh "aarch64 ppc64 s390x x86_64"

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1757
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux