]> wagnertech.de Git - projects.git/blobdiff - tools/make/mconfigure
phpide-d10
[projects.git] / tools / make / mconfigure
index f37f6a3d5ccd772e8bba050b2cea5bf1cfaeee32..ed4085595cf8b570489c2147b6c92225550a353a 100755 (executable)
@@ -14,6 +14,7 @@ function check_unversioned {
        # has to be called in the projects base directory
        # result: "M" in stdout or nothing
        
        # has to be called in the projects base directory
        # result: "M" in stdout or nothing
        
+       set -e
        project=$(pwd)
        project=${project##*/}
        pushd .. >/dev/null
        project=$(pwd)
        project=${project##*/}
        pushd .. >/dev/null
@@ -28,6 +29,7 @@ function check_unversioned {
 }
 
 function set_build {
 }
 
 function set_build {
+       set -e
        if [ -e .svn ]
        then
                version="0.0"
        if [ -e .svn ]
        then
                version="0.0"
@@ -53,6 +55,7 @@ function set_build {
 }
 
 function check_version {
 }
 
 function check_version {
+       set -e
        
        vline=$(head -1 debian/$paket.changelog)
        vline=${vline%-*}
        
        vline=$(head -1 debian/$paket.changelog)
        vline=${vline%-*}
@@ -75,9 +78,6 @@ function check_version {
                exit 1
        fi
 }
                exit 1
        fi
 }
-# to build a package you need ...
-# <package>.cp (optional): copy step for package production
-# <package>.cpp.sh (optional): commands to setup the C++ compile environment
 
 if [ ! -d debian ]
 then
 
 if [ ! -d debian ]
 then
@@ -144,7 +144,6 @@ then
        
        echo "paket=$paket" >> debian/setenv.sh
        echo "oldpack=\"$oldpack\"" >> debian/setenv.sh
        
        echo "paket=$paket" >> debian/setenv.sh
        echo "oldpack=\"$oldpack\"" >> debian/setenv.sh
-       cpp_build=0
 
        set_build
        check_version
 
        set_build
        check_version
@@ -187,18 +186,8 @@ then
                    echo "add_inst_tgt += debian/tmp/DEBIAN/postrm" >> rules.pre
        fi
        
                    echo "add_inst_tgt += debian/tmp/DEBIAN/postrm" >> rules.pre
        fi
        
-       #cat setenv.sh >> rules.pre
-
        mkdir -p tmp/DEBIAN
 
        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
-       
        # add export to setenv.sh
        sed -i "s/^/export /" setenv.sh
 
        # add export to setenv.sh
        sed -i "s/^/export /" setenv.sh
 
@@ -211,23 +200,15 @@ then
                # proceed
                echo
        else
                # proceed
                echo
        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: $paket
-Section: main
-Priority: optional
-Maintainer: WagnerTech UG <mail@wagnertech.de>
-" > debian/$paket.control
-                       grep -v "Version:" $control |grep -v "Maintainer:" >> debian/$paket.control 
-               fi
+               echo "warning: control file not found"
+               echo "  this file is necessary for any package production."
        fi
        
        # build prepare
        fi
        
        # build prepare
+       if [ -x debian/$paket.prepare ]
+       then
+               debian/$paket.prepare
+       fi
        if [ -e debian/$paket.build ]
        then
                if [ -e ../build ]
        if [ -e debian/$paket.build ]
        then
                if [ -e ../build ]
@@ -240,6 +221,17 @@ Maintainer: WagnerTech UG <mail@wagnertech.de>
                        debian/rules sync
                        debian/$paket.build -prepare
                fi
                        debian/rules sync
                        debian/$paket.build -prepare
                fi
+               # sync build dir
+               . debian/setenv.sh
+               debian/rules sync
+               
+               # executing prebuild
+               if [ -x debian/$paket.prebuild ]
+               then
+                       pushd ~/build >/dev/null
+                       debian/$paket.prebuild
+                       popd >/dev/null
+               fi
        fi
        
        # pack prepare
        fi
        
        # pack prepare
@@ -264,7 +256,7 @@ fi
 
 if [ $compile -eq 1 -a ! -e debian/$paket.build ]
 then
 
 if [ $compile -eq 1 -a ! -e debian/$paket.build ]
 then
-       echo "no debian/build.sh: skipping build step"
+       echo "no debian/$paket.build: skipping build step"
        compile=0
 fi
 if [ $compile -eq 1 ]
        compile=0
 fi
 if [ $compile -eq 1 ]