rpm-ostree/packaging/Makefile.dist-packaging
Jonathan Lebon 4824410cc2 packaging: Drop support for dist-snapshot w/o compose
The build system doesn't support this anymore. Also add `-T0` for
multi-threading.

Closes: #1900
Approved by: cgwalters
2019-09-09 23:50:32 +00:00

25 lines
664 B
Makefile

# -*- mode: Makefile -*-
GITREV = $$(git describe --always --tags)
GITREV_FOR_PKG = $(shell echo "$(GITREV)" | sed -e 's,-,\.,g' -e 's,^v,,')
srcdir=$(shell dirname `pwd`)
PACKAGE=rpm-ostree
PKG_VER = $(PACKAGE)-$(GITREV_FOR_PKG)
PKG_CLIENT_VER = $(PACKAGE)-client-$(GITREV_FOR_PKG)
dist-snapshot:
./make-git-snapshot.sh "$(srcdir)" "$(PKG_VER)" "$(GITREV)"
rm -f $(PKG_VER).tar.xz
xz -T0 $(PKG_VER).tar
srpm: dist-snapshot
sed -e "s,^Version:.*,Version: $(GITREV_FOR_PKG)," $(PACKAGE).spec.in > $(PACKAGE).spec; \
./rpmbuild-cwd -bs $(PACKAGE).spec
rpm: srpm
./rpmbuild-cwd --rebuild $(PKG_VER)*.src.rpm
repomanage -o | xargs -r rm
createrepo_c .