#!/usr/bin/make -f VERSION_UPSTREAM := $(word 1, $(subst -, ,$(shell dpkg-parsechangelog -SVersion))) VERSION_MAJOR := $(word 1, $(subst ., ,$(VERSION_UPSTREAM))) VERSION_MINOR := $(word 2, $(subst ., ,$(VERSION_UPSTREAM))) VERSION_PATCH := $(word 3, $(subst ., ,$(VERSION_UPSTREAM))) %: dh ${@} --buildsystem=cmake execute_after_dh_auto_install: patchelf --set-soname libtelemetry.so.$(VERSION_MAJOR) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libtelemetry.so mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libtelemetry.so debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libtelemetry.so.$(VERSION_UPSTREAM) ln -s libtelemetry.so.$(VERSION_UPSTREAM) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libtelemetry.so ln -s libtelemetry.so.$(VERSION_UPSTREAM) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libtelemetry.so.$(VERSION_MAJOR) ln -s libtelemetry.so.$(VERSION_UPSTREAM) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libtelemetry.so.$(VERSION_MAJOR).$(VERSION_MINOR) patchelf --set-soname libappFs.so.$(VERSION_MAJOR) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libappFs.so mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libappFs.so debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libappFs.so.$(VERSION_UPSTREAM) ln -s libappFs.so.$(VERSION_UPSTREAM) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libappFs.so ln -s libappFs.so.$(VERSION_UPSTREAM) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libappFs.so.$(VERSION_MAJOR) ln -s libappFs.so.$(VERSION_UPSTREAM) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libappFs.so.$(VERSION_MAJOR).$(VERSION_MINOR)