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."
39 # clean dirs and check out
42 echo "Shall I delete src dir? [y]/n"
65 # load util functions for C/C++ - build
66 if [ -f $paket.cpp.sh ]
69 . projects/tools/make/c_configure.sh
73 # copy package control
74 control=$(find src -name $paket.control)
77 echo "warning: control file not found"
78 echo " this file is necessary for any package production."
80 sed "s/%BUILD%/$build/" $control |sed "s/%ARCH%/$ARCH/" >$paket.control
81 echo "$paket.control written."
84 version=$(grep Version $paket.control |sed "s/Version: //")
88 copy=$(find src -name $paket.cp)
93 echo "warning: file $paket.cp missing or not executable:"
94 echo " this file is necessary for any package production."
98 postinst=$(find src -name $paket.postinst)
104 # create generic make.pre, if not existing
107 cat >>make.pre <<MAKE_PRE
108 # mBuild make.pre script (auto generated)
112 echo "make.pre written."
115 # append version to make.pre
116 echo "version = $version" >> make.pre