From 2d737ee50144e551cbe1693f6ed3c7e23ab0a85a Mon Sep 17 00:00:00 2001 From: neox Date: Wed, 28 Feb 2024 10:27:03 +0100 Subject: [PATCH] Automated version number in deb package --- Makefile | 7 +++++-- debian/{control => control_template} | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) rename debian/{control => control_template} (96%) diff --git a/Makefile b/Makefile index 2482287..919c071 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ default: debian/tyto.deb ### MAKE DEB -.INTERMEDIATE: debian/debian-binary debian/control.tar.gz debian/data.tar.gz +.INTERMEDIATE: debian/control debian/debian-binary debian/control.tar.gz debian/data.tar.gz .PHONY: clean @@ -20,7 +20,10 @@ debian/tyto.deb: debian/debian-binary debian/control.tar.gz debian/data.tar.gz debian/data.tar.gz: cd src && tar czvf ../debian/data.tar.gz usr var -debian/control.tar.gz: +debian/control: debian/control_template + cat $< | sed "s/VERSION/`git describe --tags`/g" > $@ + +debian/control.tar.gz: debian/control tar czvf debian/control.tar.gz debian/control #preinst postinst prerm postrm debian/debian-binary: diff --git a/debian/control b/debian/control_template similarity index 96% rename from debian/control rename to debian/control_template index bbce87f..1bb3ec9 100644 --- a/debian/control +++ b/debian/control_template @@ -1,5 +1,5 @@ Package: tyto -Version: 1.11.5 +Version: VERSION Section: custom Priority: optional Architecture: all