1010
1111PACKAGE_NAME := isaac-ros-cli
1212
13- DISTRIBUTION ?= noble
14- COMPONENT ?= main
15- ARCHITECTURE ?= all
16-
1713# Convenience variable for the built .deb (lives one dir up when using dpkg-buildpackage)
1814DEB_GLOB := ../$(PACKAGE_NAME ) _*.deb
1915
@@ -22,20 +18,33 @@ DEB_GLOB := ../$(PACKAGE_NAME)_*.deb
2218help :
2319 @echo " Targets:"
2420 @echo " make build - Build Debian package (.deb)"
21+ @echo " make build-stamped - Build Debian package (.deb) with timestamped version"
22+ @echo " make timestamp - Append timestamp suffix to debian/changelog"
2523 @echo " make clean - Remove staged packaging artifacts inside debian/"
2624 @echo " make distclean - Clean and remove built files in parent dir"
2725 @echo " make print-deb - Print the path to the built .deb (expects exactly one)"
2826 @echo " "
29- @echo " Variables (override with VAR=value):"
30- @echo " DISTRIBUTION=$( DISTRIBUTION) COMPONENT=$( COMPONENT) ARCHITECTURE=$( ARCHITECTURE) "
3127
3228all : build
3329
30+ timestamp :
31+ @set -e; \
32+ timestamp=$$(date +%Y%m%d%H%M%S ) ; \
33+ sed -i " 1s/)/.$$ timestamp)/" debian/changelog; \
34+ echo " Updated debian version with timestamp suffix .$$ timestamp" ; \
35+ head -1 debian/changelog
36+
3437build :
3538 @echo " Building Debian package for $( PACKAGE_NAME) ..."
3639 DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -b
3740 @echo " Build complete. Use 'make print-deb' to locate the .deb file."
3841
42+ build-stamped :
43+ cp debian/changelog debian/changelog.original
44+ make timestamp
45+ make build
46+ mv debian/changelog.original debian/changelog
47+
3948print-deb :
4049 @set -e; \
4150 count=$$(ls -1 $(DEB_GLOB ) 2>/dev/null | wc -l | tr -d ' ' ) ; \
@@ -47,7 +56,7 @@ print-deb:
4756
4857clean :
4958 @echo " Removing staged packaging artifacts under debian/..."
50- rm -rf debian/$(PACKAGE_NAME ) debian/.debhelper debian/debhelper-build-stamp debian/files
59+ rm -rf debian/$(PACKAGE_NAME ) debian/* .debhelper debian/ * .substvars debian/debhelper-build-stamp debian/files
5160
5261distclean : clean
5362 @echo " Removing built artifacts in parent directory (if any)..."
0 commit comments