- 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
+ rm -rf tmp
+ fi
+
+ # check for pre/post installation scripts
+ if [ -f $paket.preinst ]
+ then
+ echo "add_inst_tgt += debian/tmp/DEBIAN/preinst" >> rules.pre
+ fi
+ if [ -f $paket.postinst ]
+ then
+ echo "add_inst_tgt += debian/tmp/DEBIAN/postinst" >> rules.pre
+ fi
+ if [ -f $paket.prerm ]
+ then
+ echo "add_inst_tgt += debian/tmp/DEBIAN/prerm" >> rules.pre
+ fi
+ if [ -f $paket.postrm ]
+ then
+ echo "add_inst_tgt += debian/tmp/DEBIAN/postrm" >> rules.pre
+ fi
+
+ 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/$paket.control ]
+ then
+ cp debian/$paket.control debian/control
+ else
+ # try old fashoned way
+ control=$(find etc -name $paket.control) || true
+ 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
+
+ # build prepare
+ if [ -e debian/$paket.build ]
+ then
+ if [ -e ../build ]
+ then
+ rm -rf ../build
+ mkdir ../build
+ fi
+ debian/$paket.build -prepare
+ fi
+
+ # pack prepare
+ if [ -f debian/$paket.cp -a -f $paket.control ]
+ then
+ echo "PACK=binary" >> debian/rules.pre
+ elif [ -f debian/$paket.cp ]
+ then
+ echo "PACK=zip" >> debian/rules.pre
+ else
+ echo "PACK=version" >> debian/rules.pre