Skip to content

Commit

Permalink
scripts/package/Makefile: rpmbuild add support of RPMOPTS
Browse files Browse the repository at this point in the history
After commit 21a5999 ("scripts/package/Makefile: rpmbuild is needed
for rpm targets"), it is no longer possible to specify RPMOPTS.
For example, we can no longer able to control _topdir using the following
make command.
make RPMOPTS="--define '_topdir /home/xyz/workspace/'" binrpm-pkg

Fixes: 21a5999 ("scripts/package/Makefile: rpmbuild is needed for rpm targets")
Cc: <[email protected]> # 4.3+
Signed-off-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
spandruvada authored and Michal Marek committed May 16, 2016
1 parent 962475a commit 65a9f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ rpm-pkg rpm: FORCE
$(call cmd,src_tar,$(KERNELPATH),kernel.spec)
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
mv -f $(objtree)/.tmp_version $(objtree)/.version
rpmbuild --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
rm $(KERNELPATH).tar.gz kernel.spec

# binrpm-pkg
Expand All @@ -63,7 +63,7 @@ binrpm-pkg: FORCE
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
mv -f $(objtree)/.tmp_version $(objtree)/.version

rpmbuild --define "_builddir $(objtree)" --target \
rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
$(UTS_MACHINE) -bb $(objtree)/binkernel.spec
rm binkernel.spec

Expand Down

0 comments on commit 65a9f31

Please sign in to comment.