This is a rebase of all the prior patches off of the current github repo (12/22 at about 2:00 pm EST). -- bk
Bryan Kearney
2008-Dec-22 20:10 UTC
[Ovirt-devel] [PATCH PuppetInstaller] Add a rake file to build the rpms
--- .gitignore | 1 + rakefile.rb | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 0 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/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
sent to wrong thread earlier, ack'd all, tested and applied Bryan Kearney wrote:> This is a rebase of all the prior patches off of the current github repo (12/22 at about 2:00 pm EST). > > -- bk > > > _______________________________________________ > Ovirt-devel mailing list > Ovirt-devel at redhat.com > https://www.redhat.com/mailman/listinfo/ovirt-devel >