+ pushd debian >/dev/null
+
+ ln -sf /usr/share/mbuild/rules .
+
+ #if [ -e tmp ]
+ #then
+ # rm -rf tmp
+ #fi
+ #rm *.stamp 2>/dev/null || true
+ #rm make.pre 2>/dev/null || true
+
+ mkdir -p tmp/DEBIAN
+
+ # load util functions for C/C++ - build
+ if [ -f $paket.cpp.sh ]
+ then
+ cpp_build=1
+ . projects/tools/make/c_configure.sh
+ . $paket.cpp.sh
+ fi
+
+ popd >/dev/null
+
+ # copy package control
+ if [ ! -f debian/control ]
+ then
+ control=$(find etc -name $paket.control)
+ if [ -z "$control" ]
+ then
+ echo "warning: control file not found"
+ echo " this file is necessary for any package production."
+ else
+ echo "Source: $pwd
+ Section: main
+ Priority: optional
+ Maintainer: WagnerTech UG <mail@wagnertech.de>
+ " > debian/control
+ grep -v "Version:" $control |grep -v "Maintainer:" >> debian/control
+ fi
+ fi
+fi
+
+# check for copy file
+#if [ ! -f debian/$paket.cp ]