]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/taginfo/recipes/default.rb
Taginfo: Make directory in its own rule.
[chef.git] / cookbooks / taginfo / recipes / default.rb
index a33c97b1cf73dd1df8ebd38c87c9521334600506..f2c22fc73a165f2bde47a07087a774b3a8189316 100644 (file)
@@ -100,7 +100,7 @@ node[:taginfo][:sites].each do |site|
   git "#{directory}/libosmium" do
     action :sync
     repository "git://github.com/osmcode/libosmium.git"
-    revision "v2.5.2"
+    revision "v2.5.3"
     user "taginfo"
     group "taginfo"
   end
@@ -165,14 +165,24 @@ node[:taginfo][:sites].each do |site|
     notifies :restart, "service[apache2]"
   end
 
+  directory "#{directory}/osmium-tool/build" do
+    owner 'taginfo'
+    group 'taginfo'
+    mode '0755'
+    action :create
+    subscribes :run, "git[#{directory}/libosmium]"
+    subscribes :run, "git[#{directory}/osmium-tool]"
+  end
+
   execute "compile-osmium" do
     action :nothing
-    command "mkdir build && cd build && cmake .. && make"
-    cwd "#{directory}/osmium-tool"
+    command "cmake .. && make"
+    cwd "#{directory}/osmium-tool/build"
     user "taginfo"
     group "taginfo"
     subscribes :run, "git[#{directory}/libosmium]"
     subscribes :run, "git[#{directory}/osmium-tool]"
+    subscribes :run, "directory[#{directory}/osmium-tool/build]"
   end
 
   %w(taginfo/web/tmp bin data data/old download sources planet planet/log planet/replication).each do |dir|