summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-03-14 01:20:37 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-03-14 01:20:37 +0000
commit6af21e5f25aadc48a5c7a759588ea80bdbe4a808 (patch)
tree6b80b99f26e19eb68b560c91572a25da20ad9c3f
parentc74fd81b0f8f8efe363389e2af2be9c07625dd16 (diff)
downloadpuppet-6af21e5f25aadc48a5c7a759588ea80bdbe4a808.tar.gz
puppet-6af21e5f25aadc48a5c7a759588ea80bdbe4a808.tar.xz
puppet-6af21e5f25aadc48a5c7a759588ea80bdbe4a808.zip
adding sbin directory
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1026 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--Rakefile69
1 files changed, 33 insertions, 36 deletions
diff --git a/Rakefile b/Rakefile
index 82fc79269..9192417f4 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,15 +1,22 @@
# -*- ruby -*- (Make emacs happy)
# Rakefile for Puppet
-PKG = "puppet"
-RPMHOST = "fedora1"
-PKGHOST = "culain"
+#begin
+# require 'rake/reductive'
+#rescue LoadError
+# puts $:
+# $stderr.puts "You must have the Reductive build library in your RUBYLIB."
+# exit(14)
+#end
begin
- require 'rake/reductive'
-rescue Exception
- $stderr.puts "You must have the Reductive build library in your RUBYLIB."
- exit(14)
+ require 'rake/epm'
+ $haveepm = true
+rescue Exception => detail
+ puts detail.backtrace
+ puts detail
+ $stderr.puts "No EPM; skipping those packages"
+ $haveepm = false
end
@@ -446,37 +453,27 @@ task :fedorarpm => [:package] do
sh %{ssh fedora1 'cd puppet; rake rpm'}
end
-def epmlist(match, prefix = "/usr")
- dest = "../epmtmp/#{OS}-#{match}"
-
- list = %x{mkepmlist --prefix #{prefix} ../puppet-#{PKG_VERSION}}.gsub(/luke/, "0")
-
- list = list.split(/\n/).find_all do |line|
- line =~ /#{prefix}\/#{match}/
- end.join("\n")
-
- File.open(dest, "w") { |f| f.puts list }
-
- return dest
-end
-
-directory "pkg/epm"
-directory "pkg/epmtmp"
-
-desc "Create packages using EPM"
-task :epmpkg => ["pkg/epm", "pkg/epmtmp", :package] do
- $epmdir = "pkg/epm"
- $epmtmpdir = "pkg/epmtmp"
-
- Dir.chdir($epmdir) do
- type = nil
+if $haveepm
+ begin
+ Rake::EPMPackageTask.new("puppet", PKG_VERSION) do |t|
+ t.copyright = "2004-2005 by Reductive Labs, All Rights Reserved"
+ t.vendor = "Reductive Labs"
+ t.description = "System Automation and Configuration Management Software"
+
+ t.bins = FileList.new("bin", "bin/*") do |list|
+ list.exclude("cf2puppet")
+ list.exclude("puppetdoc")
+ list.exclude("puppetmasterd")
+ end
- binfile = epmlist("bin", "/usr")
- libfile = epmlist("lib", $sitedir)
+ t.sbins = FileList.new("sbin", "bin/puppetmasterd")
- listfile = "../epmtmp/#{OS}.list"
- sh %{cat ../../conf/epm.list #{binfile} #{libfile} > #{listfile}}
- sh %{epm -f native puppet #{listfile}}
+ t.libs = FileList.new('lib/**/*')
+ end
+ rescue => detail
+ puts detail.backtrace
+ puts detail
+ exit(13)
end
end