From 4fa080a6afe2044cf81a68484e50ff95f9fe9f56 Mon Sep 17 00:00:00 2001 From: Michael Wagner Date: Mon, 7 Mar 2016 16:46:17 +0100 Subject: [PATCH] posaune --- tools/make/configure | 81 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/tools/make/configure b/tools/make/configure index c981fd5..b44b5c8 100755 --- a/tools/make/configure +++ b/tools/make/configure @@ -18,3 +18,84 @@ then exit 1 fi +paket=$1 +build=$2 +ARCH="" +cpp_build=0 + +# checkout build utilities +if [ ! -d projects ]; then + git clone https://github.com/wagner-tech/projects/ +fi +ln -sf projects/tools/make/makefile . + +# check standard files +if [ ! -x $paket.co ] +then + echo "file $paket.co missing or not executable." + exit 1 +fi +if [ ! -x $paket.cp ] +then + echo "file $paket.cp missing or not executable." + exit 1 +fi + +# load util functions for C/C++ - build +if [ -f $paket.cpp ] +then + cpp_build=1 + . Make/c_configure.sh +fi + +# clean src tree and check out +#if [ -e src ] +#then +# rm -rf src +#fi +if [ -e $paket ] +then + rm -rf $paket +fi +rm *.stamp || true + +#mkdir -p src +cwd=$(pwd) + +# checkout +#pushd src +#../$paket.co $build +#popd + +# copy package control +control=$(find src -name $paket.control) +if [ -z "$control" ] +then + echo "control file not found" + exit 1 +fi +sed "s/%BUILD%/$build/" $control >$paket.control +echo "$paket.control written." + +# check for postinst +postinst=$(find src -name $paket.postinst) +if [ -n "$postinst" ] +then + ln -sf $postinst . +fi + +# extract version +version=$(grep Version $paket.control |sed "s/Version: //") + +# create generic make.pre, if not existing +if [ ! -f make.pre ] +then + cat >>make.pre <