[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08
James Turnbull
james at lovedthanlost.net
Fri Jan 15 09:08:43 UTC 2010
The following commit has been merged in the upstream branch:
commit dd22b71161b0ab943bc3f6edbf6f104e1c882a14
Author: James Turnbull <james at lovedthanlost.net>
Date: Wed Jan 6 18:18:46 2010 +1100
Replaced ugly gem creation task with slightly less ugly task
diff --git a/tasks/rake/gem.rake b/tasks/rake/gem.rake
index 7ef4472..e373952 100644
--- a/tasks/rake/gem.rake
+++ b/tasks/rake/gem.rake
@@ -1,3 +1,5 @@
+require 'ftools'
+
GEM_FILES = FileList[
'[A-Z]*',
'install.rb',
@@ -12,14 +14,22 @@ GEM_FILES = FileList[
'spec/**/*'
]
+EXECUTABLES = FileList[
+ 'bin/**/*',
+ 'sbin/**/*'
+]
+
+SBIN = Dir.glob("sbin/*")
+
spec = Gem::Specification.new do |spec|
spec.platform = Gem::Platform::RUBY
spec.name = 'puppet'
spec.files = GEM_FILES.to_a
- spec.executables = %w{puppetca puppetd puppetmasterd puppetqd puppetrun filebucket pi puppet puppetdoc ralsh}
+ spec.executables = EXECUTABLES.gsub(/sbin|bin/, '').to_a
spec.version = Puppet::PUPPETVERSION
spec.add_dependency('facter', '>= 1.5.1')
spec.summary = 'Puppet, an automated configuration management tool'
+ spec.description = 'Puppet, an automated configuration management tool'
spec.author = 'Reductive Labs'
spec.email = 'puppet at reductivelabs.com'
spec.homepage = 'http://reductivelabs.com'
@@ -33,14 +43,17 @@ end
desc "Prepare binaries for gem creation"
task :prepare_gem do
- sh "mv sbin/* bin"
+ SBIN.each do |f|
+ File.copy(f,"bin")
+ end
end
desc "Create the gem"
task :create_gem => :prepare_gem do
- sh "mkdir -p pkg"
+ Dir.mkdir("pkg") rescue nil
Gem::Builder.new(spec).build
- sh "mv *.gem pkg"
- sh "rm bin/*"
- sh "git reset --hard"
+ File.move("puppet-#{Puppet::PUPPETVERSION}.gem", "pkg")
+ SBIN.each do |f|
+ File.unlink("bin/" + f.gsub(/sbin\//, ''))
+ end
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list