# ./. ---------------------------------------------
# copy package control
- if [ ! -f debian/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
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
+ fi
fi
-# check for copy file
-#if [ ! -f debian/$paket.cp ]
-#then
-# # search for copy file
-# copy=$(find . -name $paket.cp)
-# if [ -n "$copy" ]
-# then
-# echo "ln -sf ../$copy debian/"
-# ln -sf ../$copy debian/
-# else
-# echo "warning: file $paket.cp missing or not executable:"
-# echo " this file is necessary for any package production."
-# fi
-#fi
-
-if [ ! -e debian/build.sh ]
+if [ $compile -eq 1 -a ! -e debian/build.sh ]
then
echo "no debian/build.sh: skipping build step"
compile=0
if [ $pack -eq 1 ]
then
# build package
- debian/rules binary
+ debian/rules pack
fi