1 # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
3 DEVEL_KERNEL_TYPE="source"
5 prepare_and_build_srpm() {
7 pushd $TOPDIR >/dev/null
8 # seems there is a bug (on Ubuntu at least) where all of the .specs
9 # are not put into SPECS
10 mv SOURCES/*.spec SPECS/
12 # generate our buildid
13 local buildid="lustre${EXTRA_VERSION##*_lustre}"
15 # do release specific spec editing
18 # XXX - need to flesh this out per the rhel5 method
20 for arch in $BUILD_ARCHS; do
21 targets="--target $arch $targets"
22 mkdir -p config/$(basearch $arch)
23 cp $CONFIG_FILE config/$(basearch $arch)/$RPMSMPTYPE
26 tar cjf SOURCES/config.tar.bz2 config
29 # do we need any special rpm build options
30 local rpmbuildopt="-bb"
35 # XXX - ignore the kabi changes. need to figure out what this is really
37 touch SOURCES/IGNORE-KABI-BADNESS
40 # XXX testing speedup hack - never let an inspection pass without this
41 # commented out! in fact it should be removed completely before a
45 if ! $RPMBUILD $rpmbuildopt $targets \
46 --define "_topdir $TOPDIR" \
47 $TOPDIR/SPECS/kernel-$RPMSMPTYPE.spec >&2; then
48 fatal 1 "Failed to build kernel RPM"
52 # for SLES, we also need to build the kernel-source rpm
53 if ! $RPMBUILD $rpmbuildopt $targets \
54 --define "_topdir $TOPDIR" \
55 $TOPDIR/SPECS/kernel-source.spec >&2; then
56 fatal 1 "Failed to build kernel source RPM"
62 local lustre=${1:-false}
65 echo "kernel-lustre-$DEVEL_KERNEL_TYPE"
67 echo "kernel-$DEVEL_KERNEL_TYPE"
72 rpm_BUILD_kernel_dirname() {
78 echo kernel-lustre-${rpmsmptype}-${lnxmaj}${lnxmin}/linux-${lnxmaj}