From: Stefano Rivera <stefanor@debian.org>
Date: Sun, 17 Apr 2022 19:52:03 -0400
Subject: Use Debian package version

Upstream isn't making releases, and we can't trivially recreate the
upstream git describe output from our source package.
---
 dist/version.sh | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/dist/version.sh b/dist/version.sh
index e50000d..f97084a 100755
--- a/dist/version.sh
+++ b/dist/version.sh
@@ -1,21 +1,4 @@
 #!/bin/sh
 
-MPV_PATH="`dirname $0`/../src/include/mp_version.h"
-
-MAJ=`awk '/MP_VERSION_MAJOR/ {print $3}' $MPV_PATH`
-MIN=`awk '/MP_VERSION_MINOR/ {print $3}' $MPV_PATH`
-PCH=`awk '/MP_VERSION_PATCH/ {print $3}' $MPV_PATH`
-
-# if git exists in path
-if type git >/dev/null 2>&1; then
-    # and we are in a checkout
-    if git rev-parse 2>/dev/null; then
-        # but not on a tag (which means this is a release)
-        if test -z "`git log 'HEAD^!' --format=%d 2>/dev/null | grep 'tag: '`"; then
-            # append git revision hash to version
-            GIT="-`git describe --always`"
-        fi
-    fi
-fi
-
-echo $MAJ.$MIN.$PCH$GIT
+cd $(dirname $0)/..
+dpkg-parsechangelog -S Version | cut -d - -f 1
