2014-01-16 05:05:54 +04:00
# -*- mode: Makefile -*-
GITREV = $$ ( git describe --always --tags)
GITREV_FOR_PKG = $( shell echo " $( GITREV) " | sed -e 's,-,\.,g' -e 's,^v,,' )
2014-01-16 02:41:21 +04:00
2015-03-02 14:35:18 +03:00
srcdir = $( shell dirname ` pwd ` )
2014-05-18 17:26:13 +04:00
PACKAGE = rpm-ostree
2014-01-16 02:41:21 +04:00
2014-01-16 05:05:54 +04:00
PKG_VER = $( PACKAGE) -$( GITREV_FOR_PKG)
2014-09-17 05:45:30 +04:00
PKG_CLIENT_VER = $( PACKAGE) -client-$( GITREV_FOR_PKG)
2014-01-16 05:05:54 +04:00
2014-01-16 02:41:21 +04:00
dist-snapshot :
2014-09-17 05:45:30 +04:00
./make-git-snapshot.sh " $( srcdir) " " $( PKG_VER) " " $( GITREV) "
rm -f $( PKG_VER) .tar.xz
2014-01-16 05:05:54 +04:00
xz $( PKG_VER) .tar
2014-01-16 02:41:21 +04:00
2014-09-17 05:45:30 +04:00
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
2014-01-16 02:41:21 +04:00
srpm : dist -snapshot
2014-03-22 18:27:16 +04:00
sed -e " s,^Version:.*,Version: $( GITREV_FOR_PKG) , " $( PACKAGE) .spec.in > $( PACKAGE) .spec; \
2014-05-18 17:26:13 +04:00
./rpmbuild-cwd -bs $( PACKAGE) .spec
2014-01-16 02:41:21 +04:00
2014-03-22 18:27:16 +04:00
rpm : srpm
2015-03-02 14:35:18 +03:00
./rpmbuild-cwd --rebuild $( PKG_VER) *.src.rpm
2016-03-10 17:22:39 +03:00
repomanage -o | xargs -r rm
createrepo_c .