From: Arran Cudbard-Bell Date: Thu, 17 Nov 2022 16:09:29 +0000 (-0600) Subject: Produce git versioned .deb files X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e1e3384bf48c545d0124a698725913e44850c17;p=thirdparty%2Ffreeradius-server.git Produce git versioned .deb files --- diff --git a/Makefile b/Makefile index 2a1b94b86a4..abf4bf465fd 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,13 @@ ifeq "$(RADIUS_VERSION_STRING)" "" RADIUSD_VERSION_STRING := $(shell cat VERSION) endif +ifeq "$(RADIUS_VERSION_RELEASE)" "" + RADIUSD_VERSION_RELEASE := $(shell git status > /dev/null 2>&1 && git describe | sed -e 's/^.*-\([[0-9]]*\)-g[[0-9a-f]]*/\1/') + RADIUSD_PACKAGE_VERSION := $(RADIUSD_VERSION_STRING)-$(RADIUSD_VERSION_RELEASE) +else + RADIUSD_PACKAGE_VERSION := $(RADIUSD_VERSION_STRING) +endif + MFLAGS += --no-print-directory export DESTDIR := $(R) @@ -445,7 +452,7 @@ deb: exit 1; \ fi fakeroot debian/rules debian/control #clean - fakeroot dpkg-buildpackage -b -uc + fakeroot dpkg-buildpackage -b -uc -v$(RADIUSD_PACKAGE_VERSION) .PHONY: rpm rpmbuild/SOURCES/freeradius-server-$(RADIUSD_VERSION_STRING).tar.bz2: freeradius-server-$(RADIUSD_VERSION_STRING).tar.bz2