]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/taginfo/recipes/default.rb
Taginfo: get osmium-tool from git and compile it.
[chef.git] / cookbooks / taginfo / recipes / default.rb
index 43e45e2acf5a7f19dbaaf7c42442be81871e9422..a33c97b1cf73dd1df8ebd38c87c9521334600506 100644 (file)
@@ -31,6 +31,8 @@ package "libexpat1-dev"
 package "libsparsehash-dev"
 package "libgd2-xpm-dev"
 package "libicu-dev"
+package "libboost-program-options-dev"
+package "cmake"
 package "make"
 package "g++"
 
@@ -103,6 +105,14 @@ node[:taginfo][:sites].each do |site|
     group "taginfo"
   end
 
+  git "#{directory}/osmium-tool" do
+    action :sync
+    repository "git://github.com/osmcode/osmium-tool.git"
+    revision "v1.3.0"
+    user "taginfo"
+    group "taginfo"
+  end
+
   git "#{directory}/taginfo" do
     action :sync
     repository "git://github.com/joto/taginfo.git"
@@ -155,6 +165,16 @@ node[:taginfo][:sites].each do |site|
     notifies :restart, "service[apache2]"
   end
 
+  execute "compile-osmium" do
+    action :nothing
+    command "mkdir build && cd build && cmake .. && make"
+    cwd "#{directory}/osmium-tool"
+    user "taginfo"
+    group "taginfo"
+    subscribes :run, "git[#{directory}/libosmium]"
+    subscribes :run, "git[#{directory}/osmium-tool]"
+  end
+
   %w(taginfo/web/tmp bin data data/old download sources planet planet/log planet/replication).each do |dir|
     directory "#{directory}/#{dir}" do
       owner "taginfo"