You mean you want to use the target directory of the project. How about _(:target, :rpm)
and then: _(:target, :rpm, :top_dir) _(:target, :rpm, :build_root) See also: http://github.com/intalio/package_as_deb/blob/master/lib/buildrdeb/package.rb which implements a different strategy, using the name of the task so that you can have more than one deb packaging per project: root = File.join("target", "_#{File.basename(name)}") mkpath File.join(root, "DEBIAN") Thanks, Antoine On Wed, Jan 27, 2010 at 03:31, Danny O'Connor <[email protected]>wrote: > Hi There, > > I'm doing an rpm packaging extension, > > I'm running into a problem defining the 'top dir' and 'build dir' for the > rpm, at the moment I have: > > module Buildr > > class PackageRPMTask < ArchiveTask > > def initialize(root, path) > @temp_working_dir = File.join(Dir.tmpdir(), "buildr.#{$$}") > @rpm_top_dir = "#...@temp_working_dir}/buildr/rpm_top_dir" > @rpm_build_root = "#...@temp_working_dir}/buildr/rpm_build_root" > @target = "noarch" > super > end > > Instead of using a temporary directory though, it might be nicer to use a > folder in the 'bin' directory of the local build workspace. > > Does anybody know the best way to get access to it in the task definition ? > > I've attached the source of what I have so far, it works at the moment, you > can use it like any other archive packaging format: > > package(:rpm).with(:spec => RPM_SPEC_STRING) > package(:rpm).include("etc/myserviceinitd", :as => > "/etc/init.d/myservicectl") .. etc. > > > Thanks, > Danny. > >
