diff options
author | gustavo panizzo <gfa@zumbi.com.ar> | 2018-07-31 10:28:52 +0800 |
---|---|---|
committer | gustavo panizzo <gfa@zumbi.com.ar> | 2018-07-31 10:28:53 +0800 |
commit | 682ca592dbb14cb380d782be642634fea5a0e978 (patch) | |
tree | 1cc7793c0735e0147a9f62abfca70b7e96c3e876 | |
parent | c087772cfea3fe5494bb2984e6cba7b192b6dc98 (diff) |
debian-ways
Gbp-Pq: Name debian-ways
-rw-r--r-- | Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -15,7 +15,14 @@ CC ?= gcc CFLAGS ?= -g -O0 CFLAGS += -Wall -Wextra -std=c99 -pedantic GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) -CFLAGS += -DPROGRAM_VERSION=\"$(GIT_VERSION)\" + +# Gets the full version of the source package including debian version +DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-) +# # Gets only the upstream version of the package +DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//') + +CFLAGS += -DPROGRAM_VERSION=\"$(DEB_UPSTREAM_VERSION)\" ifeq ($(UNAME_S),Linux) LDFLAGS += -Wl,-z,relro -lusb-1.0 |