Merge branch 'master' of ssh://git.fedorahosted.org/git/ovirt/node-image
[ovirt-node-image.git] / autobuild.sh
blobfb9de920b2fcb80f78e1d412dbffb74d82c776e1
1 #!/bin/sh
2 #oVirt node image autobuild script
4 # Copyright (C) 2008 Red Hat, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; version 2 of the License.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 # MA 02110-1301, USA. A copy of the GNU General Public License is
19 # also available at http://www.gnu.org/copyleft/gpl.html.
21 echo "Running oVirt node image Autobuild"
23 set -e
24 set -v
26 test -f Makefile && make -k distclean || :
28 ./autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT
29 make dist
31 export OVIRT_NODE_RECIPE="$AUTOBUILD_INSTALL_ROOT/share/ovirt-node-tools/ovirt-node-recipe.ks"
33 if [ -f /usr/bin/rpmbuild ]; then
34 if [ -n "$AUTOBUILD_COUNTER" ]; then
35 EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
36 else
37 NOW=`date +"%s"`
38 EXTRA_RELEASE=".$USER$NOW"
41 rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" \
42 --define "ovirt_local_repo file://$AUTOBUILD_PACKAGE_ROOT/rpm/RPMS" \
43 -ta --clean *.tar.gz