[Ovirt-devel] [PATCH] autobuild fixes / improvements
Mohammed Morsi
mmorsi at redhat.com
Fri Sep 12 15:47:36 UTC 2008
* remove static version
* use extra_release in spec
* define ovirt_local_repo so as not to rely on .rpmmacros
---
autobuild.sh | 8 ++++++--
ovirt-server.spec | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/autobuild.sh b/autobuild.sh
index eaaf5f4..f5ebd54 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -27,6 +27,8 @@ test -f Makefile && make -k distclean || :
make tar
+version=`sed s/\ .*$// version`
+
if [ -f /usr/bin/rpmbuild ]; then
if [ -n "$AUTOBUILD_COUNTER" ]; then
EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
@@ -37,7 +39,9 @@ if [ -f /usr/bin/rpmbuild ]; then
# manually copy files over until we have an autotools
# generated tarball to base rpmbuild on
cp version $AUTOBUILD_PACKAGE_ROOT/rpm/SOURCES/
- cp rpm-build/ovirt-server-0.92.tar.gz $AUTOBUILD_PACKAGE_ROOT/rpm/SOURCES/
+ cp rpm-build/ovirt-server-$version.tar.gz $AUTOBUILD_PACKAGE_ROOT/rpm/SOURCES/
- rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ba --clean ovirt-server.spec
+ rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" \
+ --define "ovirt_local_repo $AUTOBUILD_PACKAGE_ROOT/rpm/RPMS" \
+ -ba --clean ovirt-server.spec
fi
diff --git a/ovirt-server.spec b/ovirt-server.spec
index 79cfffb..2f6ae48 100644
--- a/ovirt-server.spec
+++ b/ovirt-server.spec
@@ -5,7 +5,7 @@ Summary: oVirt Server Suite
Name: ovirt-server
Source1: version
Version: %(echo `awk '{ print $1 }' %{SOURCE1}`)
-Release: %(echo `awk '{ print $2 }' %{SOURCE1}`)%{?dist}
+Release: %(echo `awk '{ print $2 }' %{SOURCE1}`)%{?dist}%{?extra_release}
Source0: %{name}-%{version}.tar.gz
#Entire source code is GPL except for vendor/plugins/will_paginate and
#vendor/plugins/betternestedset, which are MIT, and
--
1.5.4.1
More information about the ovirt-devel
mailing list