]> wagnertech.de Git - projects.git/blobdiff - tools/make/mconfigure
posaune
[projects.git] / tools / make / mconfigure
index 7b6db959340b4567032035cff2416a373097d939..c164f10bb6b94a3976b59727a1cda6fcb3c7c257 100755 (executable)
@@ -164,8 +164,11 @@ then
        # ./. ---------------------------------------------
 
        # 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
@@ -180,24 +183,31 @@ 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
@@ -211,6 +221,6 @@ fi
 if [ $pack -eq 1 ]
 then
        # build package
-       debian/rules binary
+       debian/rules pack
 fi