--- /dev/null
+kivitendo-erp (0.1-%BUILD%) unstable; urgency=medium
+ * start of mebil mapping
+ -- Michael Wagner <info@wagnertech.de> Tue, 08 Feb 2022 20:03:04 +0100
+
--- /dev/null
+Source: kivitendo-erp
+Section: main
+Priority: optional
+Maintainer: Michael Wagner <michael@wagnertech.de>
+Build-Depends: git,mbuild
+
+Package: kivitendo-mebil
+Section: main
+Priority: optional
+Architecture: all
+Depends: kivitendo
+Description: kivitendo-ERP
+
--- /dev/null
+#!/bin/bash
+set -e
+
+# parameter: $1: base dir for copy (optional)
+
+. debian/setenv.sh
+mkdir -p $1/opt/kivitendo-mebil
+
+ov=$(head -1 VERSION)
+
+# test release tag for original version
+git diff --stat release-$ov >git.tmp
+cat git.tmp | grep -v debian |grep -v "files changed"| grep -v ".dummy" |sed "s/ //" | sed "s/ .*//" >git.diff
+
+while read line
+do
+ path=${line%.*}
+ mkdir -p $1/opt/kivitendo-mebil/$path
+ cp $line $1/opt/kivitendo-mebil/$path/
+done <git.diff
+
+echo "$version" > $1/opt/kivitendo-mebil/VERSION_mebil
+
--- /dev/null
+#!/bin/bash
+set -ex
+
+rsync -av /opt/kivitendo-mebil/ /opt/kivitendo-erp
+
+mv=$(head -1 /opt/kivitendo-mebil/VERSION_mebil)
+if grep ":" /opt/kivitendo-erp/VERSION >/dev/null
+then
+ # kivitendo-mebil ist bereits mal installiert worden
+ sed -i "s/-.*/-$mv/" /opt/kivitendo-erp/VERSION
+else
+ # erstmalige Installation
+ sed -i "s/\([0-9].*\)/\1-$mv/" /opt/kivitendo-erp/VERSION
+fi
+