JJB jobs for the OpFlex project
[releng/builder.git] / jjb / opflex / include-raw-ovs_rpm-build.sh
1 #!/bin/bash
2 # Build OVS RPMs
3
4 set -e
5 set -x
6
7 TARGET=epel-7-x86_64
8 BASEKERNEL=3.10.0-229.14.1.el7.x86_64
9 BVDEFINE=--define="buildversion $BUILD_NUMBER"
10 KMDEFINE=--define="kversion $BASEKERNEL"
11
12 ./boot.sh
13 ./configure
14 make dist
15
16 SOURCE_FILE=$(ls *.tar.gz)
17
18 mock -r $TARGET --resultdir target/srpm --buildsrpm --spec rhel/openvswitch-gbp-rhel.spec --sources $SOURCE_FILE "$BVDEFINE" "$KMDEFINE"
19 mock -r $TARGET --resultdir target/srpm --buildsrpm --spec rhel/openvswitch-gbp-kmod-rhel.spec --sources $SOURCE_FILE "$BVDEFINE" "$KMDEFINE"
20 mockchain -r $TARGET -l target/rpm -m --nocheck -m "$BVDEFINE" -m "$KMDEFINE" target/srpm/*.src.rpm
21
22 find target/rpm/results -name "*.rpm" -exec mv {} . \;