0f16e2e252
Some downstreams want the ability to separate the compose tooling from the client, for e.g. support reasons. This approach supports generating a tarball without the source for the compose command, and requires specifying a config option to disable it.
33 lines
1004 B
Makefile
33 lines
1004 B
Makefile
# -*- mode: Makefile -*-
|
|
|
|
GITREV = $$(git describe --always --tags)
|
|
GITREV_FOR_PKG = $(shell echo "$(GITREV)" | sed -e 's,-,\.,g' -e 's,^v,,')
|
|
|
|
srcdir=$(shell 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 $(PKG_VER).tar
|
|
|
|
dist-snapshot-without-compose-tooling:
|
|
./make-git-snapshot.sh "$(srcdir)" "$(PKG_CLIENT_VER)" "$(GITREV)"; \
|
|
rm tmp -rf; \
|
|
mkdir tmp; \
|
|
tar -C tmp -x "--exclude=$(PKG_CLIENT_VER)/src/*compose*" -f $(PKG_CLIENT_VER).tar; \
|
|
(cd tmp && tar -cf ../$(PKG_CLIENT_VER).tar.filtered *); \
|
|
mv $(PKG_CLIENT_VER).tar{.filtered,}; \
|
|
rm -f $(PKG_CLIENT_VER).tar.xz; \
|
|
xz $(PKG_CLIENT_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
|
|
$(srcdir)/rpmbuild-cwd --rebuild $(PKG_VER)*.src.rpm
|