set -e
function echo_usage {
- echo "usage: configure <package> [options]"
+ echo "usage: mconfigure <package> [options]"
echo " -a <arch>"
}
exit 1
fi
+#TODO: check, if running in debian-dir
+
paket=$1
shift
ARCH=""
set_build
echo "building $paket with build $build"
-while getopts ":a" opt; do
- case $opt in
- a) ARCH=$OPTARG
- ;;
- \?) echo "Invalid option: -$OPTARG"
- echo_usage
- exit 1
- ;;
- :) echo "Option -$OPTARG requires an argument."
- echo_usage
- exit 1
- ;;
- esac
-done
-
-# clean dirs and check out
-if [ -d build -a $delete_src -eq 1 ]
-then
- rm -rf build
-fi
-
-mkdir -p build
-pushd build >/dev/null
-
-ln -sf /usr/share/mbuild/makefile .
+#while getopts ":a" opt; do
+# case $opt in
+# a) ARCH=$OPTARG
+# ;;
+# \?) echo "Invalid option: -$OPTARG"
+# echo_usage
+# exit 1
+# ;;
+# :) echo "Option -$OPTARG requires an argument."
+# echo_usage
+# exit 1
+# ;;
+# esac
+#done
+#
+## clean dirs and check out
+#if [ -d build -a $delete_src -eq 1 ]
+#then
+# rm -rf build
+#fi
+#
+#mkdir -p build
+#pushd build >/dev/null
+#
+#ln -sf /usr/share/mbuild/makefile .
if [ -e $paket ]
then
fi
# copy package control
-control=$(find -L src -name $paket.control)
+control=$(find .. -name $paket.control)
build_number=${build#*_}
if [ -z "$control" ]
then
fi
# check for copy file
-copy=$(find -L src -name $paket.cp)
+copy=$(find .. -name $paket.cp)
if [ -n "$copy" ]
then
ln -sf $copy .
fi
# check for installation scripts
-files=$(find src -name $paket.preinst)
-files="$files $(find -L src -name $paket.postinst)"
-files="$files $(find -L src -name $paket.prerm)"
-files="$files $(find -L src -name $paket.postrm)"
+files=$(find .. -name $paket.preinst)
+files="$files $(find .. -name $paket.postinst)"
+files="$files $(find .. -name $paket.prerm)"
+files="$files $(find .. -name $paket.postrm)"
for file in $files
do
ln -sf $file .
done
# create generic make.pre, if not existing
-if [ ! -f make.pre ]
-then
- cat >>make.pre <<MAKE_PRE
-# mBuild make.pre script (auto generated)
-project = $paket
-COPY = ./$paket.cp
-MAKE_PRE
- if [ -n "$ARCH" ]
- then
- echo "arch = $ARCH" >>make.pre
- echo "_arch = _${ARCH}" >>make.pre
- fi
- echo "make.pre written."
-fi
-
-# append version to make.pre
-echo "version = $version" >> make.pre
-echo "build = $build" >> make.pre
+#if [ ! -f make.pre ]
+#then
+# cat >>make.pre <<MAKE_PRE
+## mBuild make.pre script (auto generated)
+#project = $paket
+#COPY = ./$paket.cp
+#MAKE_PRE
+# if [ -n "$ARCH" ]
+# then
+# echo "arch = $ARCH" >>make.pre
+# echo "_arch = _${ARCH}" >>make.pre
+# fi
+# echo "make.pre written."
+#fi
+#
+## append version to make.pre
+#echo "version = $version" >> make.pre
+#echo "build = $build" >> make.pre