Commit 2fcaaebb authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov

ioping: rework version control

Signed-off-by: default avatarKonstantin Khlebnikov <koct9i@gmail.com>
parent e24ba533
......@@ -11,11 +11,14 @@ MANS=ioping.1
SPEC=ioping.spec
PACKAGE=ioping
VERSION=$(shell test -d .git && git describe --tags --dirty=+ || awk '/^Version:/{print $$2}' $(SPEC))
VERSION=$(shell cat version)
DISTDIR=$(PACKAGE)-$(VERSION)
DISTFILES=$(SRCS) $(MANS) $(SPEC) Makefile
all: $(BINS)
all: version $(BINS)
version: $(DISTFILES)
test ! -d .git || git describe --tags --dirty=+ | sed 's/^v//;s/-/./g' > $@
clean:
$(RM) -f $(OBJS) $(BINS)
......@@ -32,9 +35,7 @@ install: $(BINS) $(MANS)
ioping: $(OBJS)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
dist: $(DISTDIR).tar.gz
$(DISTDIR).tar.gz: $(DISTFILES)
tar -cz --transform='s,^,$(DISTDIR)/,S' $(DISTFILES) -f $(DISTDIR).tar.gz
dist: version $(DISTFILES)
tar -cz --transform='s,^,$(DISTDIR)/,S' $^ -f $(DISTDIR).tar.gz
.PHONY: all clean install dist
Name: ioping
Version: 0.6
Version: %(cat version)
Release: 1%{?dist}
Summary: simple disk I/O latency monitoring tool
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment