5 echo "usage: mconfigure [options] <package>"
9 ##############################################################################
11 ##############################################################################
15 echo "run mconfigure in the project base directory with a debian directory in it!"
20 configure_args="-i debian/tmp"
21 while [ $OPTIND -le "$#" ]
26 \?) $confirure_args="$configure_ars -$OPTARG"
27 if [ $OPTARG="a" -o $OPTARG="C" -o $OPTARG="i" -o $OPTARG="v" ]
30 $confirure_args="$configure_ars ${!OPTIND}"
33 :) echo "Option -$OPTARG requires an argument."
50 if [ ! -f debian/$paket.conf ]
52 echo "$paket.conf missing. We create it ..."
53 echo "to be implemented ..."
59 ln -s /usr/share/mbuild/configure .
62 # clean build directory
63 if [ "$compile_type" != "NONE" ]
74 if [ -n "$compile_dir" ]
76 configure_args="$configure_args -b $compile_dir"
78 if [ -z "$compile_type" ]
80 echo "compile_type required in $paket.conf"
83 if [ "$target_type" == "FILE" ]
86 configure_args="$configure_args -V"
88 configure_args="$configure_args $paket"
89 echo "Executing ./configure $configure_args ..."
90 ./configure $configure_args
92 if [ "$compile_type" != "NONE" ]
94 if grep -- "-prepare" debian/$paket.build >/dev/null
96 echo "prepare in <paket>.build no longer supported. Use <paket>.prebuild"
106 if [ "$target_type" == "DEB" ]
108 if [ ! -f debian/$paket.cp ]
110 echo "debian/$paket.cp missing for target type DEB"
113 if [ ! -f debian/$paket.control ]
115 echo "debian/$paket.control missing for target type DEB"
119 echo "PACK=binary" >> debian/rules.pre
120 if grep "^Architecture: *all" debian/$paket.control >/dev/null
122 echo "arch = all" >> debian/rules.pre
123 echo 'BINARY_INDEP = copy ../$(paket)_$(version)-$(build)_all.deb' >> debian/rules.pre
125 echo 'arch = ${DEB_HOST_ARCH}' >> debian/rules.pre
126 echo "BINARY_ARCH = copy ../${paket}_$version-${build}_"'$(arch).deb' >> debian/rules.pre
128 if ! [ -f debian/$paket.changelog ]
130 echo "changelog_source = debian/default.changelog" >> debian/rules.pre
131 if [ -f debian/default.changelog ]
133 rm debian/default.changelog
136 elif [ "$target_type" == "ZIP" ]
138 echo "PACK=zip" >> debian/rules.pre
139 if [ ! -f debian/$paket.cp ]
141 echo "debian/$paket.cp missing for target type ZIP"
144 elif [ "$target_type" == "FILE" ]
146 echo "PACK=version" >> debian/rules.pre
147 if [ -z "$compile_target" ]
149 echo "compile_target is needed for target_type FILE"
152 echo "TARGET = $compile_target" >> debian/rules.pre
155 echo "Unknown target type: $target_type"