5 echo "usage: configure <package> <revision> [options]"
6 echo " -b <branch-rev>"
10 # to build a package you need ...
11 # <package>.co: checkout commands
12 # <package>.cp (optional): copy step for package production
13 # <package>.cpp.sh (optional): commands to setup the C++ compile environment
26 # checkout build utilities
27 if [ ! -d projects ]; then
28 git clone https://github.com/wagner-tech/projects/
30 ln -sf projects/tools/make/makefile .
32 # check standard files
35 echo "file $paket.co missing or not executable."
40 echo "warning: file $paket.cp missing or not executable:"
41 echo " this file is necessary for any package production."
44 # clean dirs and check out
60 # load util functions for C/C++ - build
61 if [ -f $paket.cpp.sh ]
64 . projects/tools/make/c_configure.sh
68 # copy package control
69 control=$(find src -name $paket.control)
72 echo "warning: control file not found"
73 echo " this file is necessary for any package production."
75 sed "s/%BUILD%/$build/" $control |sed "s/%ARCH%/$ARCH/" >$paket.control
76 echo "$paket.control written."
79 version=$(grep Version $paket.control |sed "s/Version: //")
84 postinst=$(find src -name $paket.postinst)
90 # create generic make.pre, if not existing
93 cat >>make.pre <<MAKE_PRE
94 # mBuild make.pre script (auto generated)
98 echo "make.pre written."
101 # append version to make.pre
102 echo "version = $version" >> make.pre