5 echo "usage: mconfigure <package> [options]"
15 build=$(git describe --tags 2>/dev/null) || true
20 changes=$(git status -s |grep "^ *M") || true
28 # to build a package you need ...
29 # <package>.cp (optional): copy step for package production
30 # <package>.cpp.sh (optional): commands to setup the C++ compile environment
40 echo "run mconfigure in the project base directory!"
56 echo "building $paket with build $build"
58 #while getopts ":a" opt; do
62 # \?) echo "Invalid option: -$OPTARG"
66 # :) echo "Option -$OPTARG requires an argument."
73 ## clean dirs and check out
74 #if [ -d build -a $delete_src -eq 1 ]
80 pushd debian >/dev/null
82 ln -sf /usr/share/mbuild/rules .
88 #rm *.stamp 2>/dev/null || true
89 #rm make.pre 2>/dev/null || true
93 # load util functions for C/C++ - build
94 if [ -f $paket.cpp.sh ]
97 . projects/tools/make/c_configure.sh
101 # copy package control
102 #control=$(find .. -name $paket.control)
103 #build_number=${build#*_}
104 #if [ -z "$control" ]
106 # echo "warning: control file not found"
107 # echo " this file is necessary for any package production."
109 # sed "s/%BUILD%/$build_number/" $control |sed "s/%ARCH%/$ARCH/" >$paket.control
110 # echo "$paket.control written."
113 # version=$(grep Version $paket.control |sed "s/Version: //")
121 ## check for copy file
122 #if [ ! -f $paket.cp ]
124 # # search for copy file
125 # copy=$(find .. -name $paket.cp)
130 # echo "warning: file $paket.cp missing or not executable:"
131 # echo " this file is necessary for any package production."
135 ## check for installation scripts
136 #files=$(find .. -name $paket.preinst)
137 #files="$files $(find .. -name $paket.postinst)"
138 #files="$files $(find .. -name $paket.prerm)"
139 #files="$files $(find .. -name $paket.postrm)"
145 # create generic make.pre, if not existing
146 #if [ ! -f make.pre ]
148 # cat >>make.pre <<MAKE_PRE
149 ## mBuild make.pre script (auto generated)
155 # echo "arch = $ARCH" >>make.pre
156 # echo "_arch = _${ARCH}" >>make.pre
158 # echo "make.pre written."
161 ## append version to make.pre
162 #echo "version = $version" >> make.pre
163 #echo "build = $build" >> make.pre