diff --git a/debian/rules b/debian/rules index c215171..0751f93 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,13 @@ #!/usr/bin/make -f +DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') + %: - dh ${@} --with python2 + dh ${@} --with-python2 + +# Inject version number in the code +override_dh_installdeb: + dh_installdeb + for pkg in $$(dh_listpackages -i); do \ + find debian/$$pkg -type f -exec sed -i -e s/__DEB_VERSION__/$(DEB_VERSION)/g {} +; \ + done diff --git a/usr/lib/linuxmint/mintMenu/mintMenu.py b/usr/lib/linuxmint/mintMenu/mintMenu.py index 2bb9678..1635c9c 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenu.py +++ b/usr/lib/linuxmint/mintMenu/mintMenu.py @@ -679,9 +679,7 @@ class MenuWin( object ): about = Gtk.AboutDialog() about.set_name("mintMenu") - import commands - version = commands.getoutput("/usr/lib/linuxmint/common/version.py mintmenu") - about.set_version(version) + about.set_version("__DEB_VERSION__") try: h = open('/usr/share/common-licenses/GPL','r') s = h.readlines()