-
- popd >/dev/null
-
- # this concept of being able to build a list of targets with a single
- # lbuild is a fine idea, but in reality I think it's (very) broken. I
- # don't even think the lustre.spec can handle being called with "--target
- # <multiple arches>". It certainly can't handle the issue where each
- # arch has it's own kernel location.
- # but we will do the best we can and put the plumbing in place so that
- # this could work when the other broken bits are fixed.
- # in reality, our current use of lbuild only ever has a single arch in
- # $BUILD_ARCHS
- local arch
- local targets=""
- for arch in $BUILD_ARCHS; do
- # XXX - ok. so here's a hack that needs to be fixed properly
- # ppc64 was merged to ppc some time ago pre 2.6.18
- if [ $arch = ppc64 ]; then
- arch=ppc
- fi
- targets="--target $arch $targets"
- # copy our .config into the RPM build tree
- (echo "# $(basearch $arch)"; cat $CONFIG_FILE) > \
- SOURCES/kernel-2.6.18-$arch.config
-
- # XXX - hackity hack -- until we get (or generate from the base
- # config) configs for xen and debug
- local f=""
- for f in SOURCES/kernel-${lnxmaj}-*.config; do
- grep -q "^CONFIG_SD_IOSTATS=y" $f || \
- echo "CONFIG_SD_IOSTATS=y" >> $f
- done
- done
-
- # do we need any special rpm build options
- local rpmbuildopt="-bb"
- if $DO_SRC; then
- rpmbuildopt="-ba"
- fi
- # stupid Ubuntu's rpm doesn't do debuginfo properly
- if [ ! -f /usr/lib/rpm/debugedit ]; then
- rpmbuildopt="$rpmbuildopt --without debuginfo"