build: change the fallback version suffix to `+git.{sha}`

Seems to be more commonly used than the current `-commit-{sha}`.
Also cleanup/simplify the version handling code and fix the list
of dependencies in the CI scripts.

Change-Id: I4d8826d1012d128883773b7517c44a6abf51fa06
diff --git a/.gitignore b/.gitignore
index 6ff803e..dc40a00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,22 +1,8 @@
-# Emacs
+# Backup files
 *~
-\#*\#
-/.emacs.desktop
-/.emacs.desktop.lock
-*.elc
-.\#*
-
-# Visual Studio Code
-.vscode/
-
-# KDevelop
-*.kdev*
-
-# macOS
-.DS_Store
-.AppleDouble
-.LSOverride
-._*
+*.bak
+*.orig
+*.rej
 
 # Waf build system
 /build/
@@ -28,5 +14,21 @@
 __pycache__/
 *.py[cod]
 
+# Emacs
+\#*\#
+/.emacs.desktop
+/.emacs.desktop.lock
+*.elc
+.\#*
+
+# Visual Studio Code
+.vscode/
+
+# macOS
+.DS_Store
+.AppleDouble
+.LSOverride
+._*
+
 # Other
 /VERSION.info