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
31 version=${version##*_}
36 function check_version {
37 vline=$(head -1 debian/$paket.changelog)
40 if [ $version = "0.0" ]
45 if [ "$clversion" != $version ]
47 echo "version mismatch: git: $version, changelog: $clversion"
51 # to build a package you need ...
52 # <package>.cp (optional): copy step for package production
53 # <package>.cpp.sh (optional): commands to setup the C++ compile environment
63 echo "run mconfigure in the project base directory with a debian directory in it!"
72 while getopts ":ap" opt; do
85 \?) echo "Invalid option: -$OPTARG"
89 :) echo "Option -$OPTARG requires an argument."
96 if [ $configure -eq 1 ]
98 echo "export paket=$1" > debian/setenv.sh
105 echo "export version=$version" >> debian/setenv.sh
106 echo "export build=$build" >> debian/setenv.sh
108 # get repository name
112 echo "export pwd=$pwd" >> debian/setenv.sh
114 echo "building $paket with build $version-$build"
116 pushd debian >/dev/null
118 ln -sf /usr/share/mbuild/rules .
124 #rm *.stamp 2>/dev/null || true
125 #rm make.pre 2>/dev/null || true
129 # load util functions for C/C++ - build
130 if [ -f $paket.cpp.sh ]
133 . projects/tools/make/c_configure.sh
139 # copy package control
140 if [ ! -f debian/control ]
142 control=$(find etc -name $paket.control)
145 echo "warning: control file not found"
146 echo " this file is necessary for any package production."
151 Maintainer: WagnerTech UG <mail@wagnertech.de>
153 grep -v "Version:" $control |grep -v "Maintainer:" >> debian/control
158 # check for copy file
159 #if [ ! -f debian/$paket.cp ]
161 # # search for copy file
162 # copy=$(find . -name $paket.cp)
165 # echo "ln -sf ../$copy debian/"
166 # ln -sf ../$copy debian/
168 # echo "warning: file $paket.cp missing or not executable:"
169 # echo " this file is necessary for any package production."
173 if [ $compile -eq 1 ]