5 Script to build a source package in one of the available cowbuilders.
10 nd_build <family> <codename> [arch] <dsc file> [cowbuilder options]
16 Build for a single specific arch:
18 nd_build nd+debian lenny i386 someting.dsc
21 Build for all archs (will just build once for arch 'all'):
23 nd_build ubuntu jaunty something.dsc
26 Build the same way but don't put results in current dir:
28 nd_build debian sid something.dsc --buildresult to-upload/
39 if [ -z "$family" ]; then
40 echo "You need to provide a distribution family ('debian', 'ubuntu'); prefix with 'nd+' to enable the NeuroDebian repository."
44 if [ -z "$dist" ]; then
45 echo "You need to provide a distribution codename (e.g. 'lenny', 'squeeze')."
49 . /etc/neurodebian/cmdsettings.sh
52 opts="--distribution $dist --aptcache $aptcache --buildplace $buildplace"
55 echo "You need to provide a .dsc file"
59 if [ ! "$3" = "${3%*.dsc}" ]; then
61 # must already be the dsc file, hence no arch info given
62 if [ "$(grep '^Architecture' $dscfile | awk '{ print $2 }')" = "all" ]; then
63 echo "Arch 'all' package detected -- using amd64 system to build it"
70 # must be arch given and dsc as 4th
73 if [ -z "$dscfile" ]; then
74 echo "You need to provide a .dsc file"
77 shift; shift; shift; shift
83 if [ "$a" = "amd64" ]; then
84 # only force source into the upload for NeuroDebian
85 if [ ! "$family" = "${family#nd+*}" ]; then
86 options="$opts --debbuildopts -sa"
89 options="$opts --debbuildopts -B"
91 echo "Building for $family $dist $a ..."
92 cowbuilder --build $dscfile \
93 --basepath ${cowbuilderroot}/cow/${family}-${dist}-${a}.cow \
95 --logfile ${dscfile%.dsc}_${a}.build \