]> git.openstreetmap.org Git - chef.git/commitdiff
Taginfo: Make directory in its own rule.
authorJochen Topf <jochen@topf.org>
Sun, 22 Nov 2015 17:07:14 +0000 (18:07 +0100)
committerJochen Topf <jochen@topf.org>
Sun, 22 Nov 2015 17:07:14 +0000 (18:07 +0100)
cookbooks/taginfo/recipes/default.rb

index 418bb604aaf3fc33cba10933d437728f2258a4e4..f2c22fc73a165f2bde47a07087a774b3a8189316 100644 (file)
@@ -165,14 +165,24 @@ node[:taginfo][:sites].each do |site|
     notifies :restart, "service[apache2]"
   end
 
     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
   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]"
     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|
   end
 
   %w(taginfo/web/tmp bin data data/old download sources planet planet/log planet/replication).each do |dir|