THis is a cleaned up patch series based on installing .96 rpms onto an F-10 machine. It adds a rakefile for rpmbuilding, cleans up the dns setup, and removes references to the ovirt-host-status script. -- bk
Bryan Kearney
2008-Dec-19 15:49 UTC
[Ovirt-devel] [PATCH PuppetInstaller] Add a rake file to build the rpms
--- .gitignore | 1 + ace-ovirt.spec | 4 ++-- rakefile.rb | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 rakefile.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5fff1d9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +pkg diff --git a/ace-ovirt.spec b/ace-ovirt.spec index 7c72962..25fa36f 100755 --- a/ace-ovirt.spec +++ b/ace-ovirt.spec @@ -8,7 +8,7 @@ Summary: ACE oVirt Module Name: ace-ovirt Version: 0.0.94 -Release: 14%{?dist} +Release: 15%{?dist} Group: Applications/Internet License: LGPLv2+ BuildArch: noarch @@ -44,7 +44,7 @@ install -d %{buildroot}/%{acehome} install -d %{buildroot}/%{ruby_sitelibdir} install -d %{buildroot}/%{_bindir} install -d %{buildroot}/%{_initrddir} -cp -pr %{pbuild}/modules %{buildroot}/%{acehome} +cp -pr %{pbuild}/ace-ovirt/modules %{buildroot}/%{acehome} diff --git a/rakefile.rb b/rakefile.rb new file mode 100644 index 0000000..a2fae18 --- /dev/null +++ b/rakefile.rb @@ -0,0 +1,53 @@ +# -*- ruby -*- +# Rakefile: build appliance configuration engine rpms +# +# Copyright (C) 2007 Red Hat, Inc. +# +# Distributed under the GNU Lesser General Public License v2.1 or later. +# See COPYING for details +# +# Bryan Kearney <bkearney at redhat.com> + +require 'rake/clean' +require 'rake/rdoctask' +require 'rake/testtask' +require 'rake/packagetask' + +ROOT_DIR = File::expand_path(".") +PKG_VERSION="0.0.94" +PACKAGE_DIR = ROOT_DIR + "/pkg" + +# +# Files to clean up +# + +CLEAN.include("**/*~","pkg") + + +# Packaging Tasks +# +Rake::PackageTask.new("ace-ovirt", PKG_VERSION) do |pkg| + pkg.need_tar_gz = true + pkg.package_files.include(Dir["ace-ovirt/**/*"]) +end + + +# +# Tasks to build the rpms +# + +# Set up the directories +task :rpm => [ :package ] do |t| + Dir["*.spec"].each do |specfile| + spec = File.basename(specfile) + cp(specfile, "pkg") + puts("Building with spec file #{spec}") + Dir::chdir("pkg") do |dir| + dir = File::expand_path(".") + system("rpmbuild --define '_topdir #{dir}' --define '_sourcedir #{dir}' --define '_srcrpmdir #{dir}' --define '_rpmdir #{dir}' --define '_builddir #{dir}' -ba #{spec} > #{spec}.rpmbuild.log 2>&1") + if $? != 0 + raise "rpmbuild failed" + end + end + end +end -- 1.6.0.4