5 echo "usage: mconfigure <package> [options]"
7 echo " -c : configure only, no compile, pack"
8 echo " -d : compile only"
20 tag=$(git describe --tags 2>/dev/null) || true
25 changes=$(git status -s |grep "^ *M") || true
35 function check_version {
36 vline=$(head -1 debian/$paket.changelog)
39 if [ $version = "0.0" ]
44 if [ "$clversion" != $version ]
46 echo "version mismatch: git: $version, changelog: $clversion"
50 # to build a package you need ...
51 # <package>.cp (optional): copy step for package production
52 # <package>.cpp.sh (optional): commands to setup the C++ compile environment
62 echo "run mconfigure in the project base directory with a debian directory in it!"
71 while getopts ":ap" opt; do
84 \?) echo "Invalid option: -$OPTARG"
88 :) echo "Option -$OPTARG requires an argument."
95 if [ $configure -eq 1 ]
97 echo "export paket=$1" > debian/setenv.sh
104 echo "export version=$version" >> debian/setenv.sh
105 echo "export build=$build" >> debian/setenv.sh
107 # get repository name
111 echo "export pwd=$pwd" >> debian/setenv.sh
113 echo "building $paket with build $version-$build"
115 pushd debian >/dev/null
117 ln -sf /usr/share/mbuild/rules .
123 #rm *.stamp 2>/dev/null || true
124 #rm make.pre 2>/dev/null || true
128 # load util functions for C/C++ - build
129 if [ -f $paket.cpp.sh ]
132 . projects/tools/make/c_configure.sh
138 # copy package control
139 if [ ! -f debian/control ]
141 control=$(find etc -name $paket.control)
144 echo "warning: control file not found"
145 echo " this file is necessary for any package production."
150 Maintainer: WagnerTech UG <mail@wagnertech.de>
152 grep -v "Version:" $control |grep -v "Maintainer:" >> debian/control
157 # check for copy file
158 #if [ ! -f debian/$paket.cp ]
160 # # search for copy file
161 # copy=$(find . -name $paket.cp)
164 # echo "ln -sf ../$copy debian/"
165 # ln -sf ../$copy debian/
167 # echo "warning: file $paket.cp missing or not executable:"
168 # echo " this file is necessary for any package production."
172 if [ $compile -eq 1 ]