Skip to content

Commit

Permalink
Simplify make rpm
Browse files Browse the repository at this point in the history
Our tarball includes the spec file, so it can be built much more easily
with `rpmbuild -tb`.
  • Loading branch information
martinpitt committed Jun 21, 2022
1 parent e1f3924 commit 0bf432f
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,10 @@ $(TARFILE): $(WEBPACK_TEST) $(SPEC) packaging/arch/PKGBUILD packaging/debian/cha
$$(git ls-files) $(COCKPIT_REPO_FILES) package-lock.json $(SPEC) packaging/arch/PKGBUILD packaging/debian/changelog dist/

# convenience target for developers
rpm: $(TARFILE) $(SPEC)
mkdir -p "`pwd`/output"
mkdir -p "`pwd`/rpmbuild"
rpmbuild -bb \
--define "_sourcedir `pwd`" \
--define "_specdir `pwd`" \
--define "_builddir `pwd`/rpmbuild" \
--define "_srcrpmdir `pwd`" \
--define "_rpmdir `pwd`/output" \
--define "_buildrootdir `pwd`/build" \
$(SPEC)
find `pwd`/output -name '*.rpm' -printf '%f\n' -exec mv {} . \;
rm -r "`pwd`/rpmbuild"
rm -r "`pwd`/output" "`pwd`/build"
rpm: $(TARFILE)
rpmbuild -tb --define "_topdir $(CURDIR)/tmp/rpmbuild" $(TARFILE)
find tmp/rpmbuild -name '*.rpm' -printf '%f\n' -exec mv {} . \;
rm -r tmp/rpmbuild

# build a VM with locally built distro pkgs installed
# HACK for fedora-coreos: skip the rpm build/install
Expand Down

0 comments on commit 0bf432f

Please sign in to comment.