./configure -I
}
+function create_conf {
+ if [ -f "debian/$paket.cmake" ]
+ then
+ echo "compile_type=CMAKE" > debian/$paket.conf
+ elif [ -f "debian/$paket.build" ]
+ then
+ if [ -f "debian/$paket.cpp" ]
+ then
+ echo "compile_type=CPP" > debian/$paket.conf
+ else
+ echo "compile_type=OLD" > debian/$paket.conf
+ fi
+ else
+ echo "compile_type=NONE" > debian/$paket.conf
+ fi
+
+ if [ -f "$paket.control" -a -f "$paket.cp" ]
+ then
+ echo "target_type=DEB" >> debian/$paket.conf
+ else
+ echo "target_type=FILE" >> debian/$paket.conf
+ fi
+ echo "$paket.conf created."
+}
+
##############################################################################
# Main program
##############################################################################
if [ ! -f debian/$paket.conf ]
then
+ # check if any files for $paket are present
+ if ! ls debian/$paket.* 2>/dev/null
+ then
+ echo "$paket is no build target in this repository."
+ exit 5
+ fi
+
+ # build conf file
echo "$paket.conf missing. We create it ..."
- echo "to be implemented ..."
- exit 5
+ create_conf
fi
if [ ! -e configure ]
rm -rf ~/build
mkdir ~/build
fi
+ configure_args="$configure_args -b"
fi
# perform configure
elif [ "$target_type" == "FILE" ]
then
echo "PACK=version" >> debian/rules.pre
- if [ -z "$compile_target" ]
+ if [ "$compile_type" != "OLD" ]
then
- echo "compile_target is needed for target_type FILE"
- exit 12
+ if [ -z "$compile_target" ]
+ then
+ echo "compile_target is needed for target_type FILE"
+ exit 12
+ fi
+ echo "TARGET = $compile_target" >> debian/rules.pre
fi
- echo "TARGET = $compile_target" >> debian/rules.pre
-
else
echo "Unknown target type: $target_type"
exit 13