]> git.openstreetmap.org Git - chef.git/commitdiff
Check out and compile tools for taginfo
authorJochen Topf <jochen@topf.org>
Sun, 23 Aug 2020 19:19:19 +0000 (21:19 +0200)
committerJochen Topf <jochen@topf.org>
Sun, 23 Aug 2020 19:19:19 +0000 (21:19 +0200)
This commit doesn't use the new versions of those tools yet, it just
checks them out and compiles and them.

cookbooks/taginfo/recipes/default.rb

index 7972f380fe851b7464f13ebb4d5afecec6bfe108..7c31b3d3328551963bc8c32b3156fd15639aca7e 100644 (file)
@@ -98,6 +98,33 @@ node[:taginfo][:sites].each do |site|
     mode "755"
   end
 
+  git "#{directory}/taginfo-tools" do
+    action :sync
+    repository "https://github.com/taginfo/taginfo-tools.git"
+    revision "osmorg-taginfo-live"
+    depth 1
+    enable_submodules true
+    user "taginfo"
+    group "taginfo"
+  end
+
+  directory "#{directory}/build" do
+    owner "taginfo"
+    group "taginfo"
+    mode "755"
+  end
+
+  execute "compile_taginfo_tools" do
+    action :nothing
+    owner "taginfo"
+    group "taginfo"
+    cwd "#{directory}/build"
+    command "cmake #{directory}/taginfo-tools && make"
+    subscribes :run, "apt_package[libprotozero-dev]"
+    subscribes :run, "apt_package[libosmium2-dev]"
+    subscribes :run, "git[#{directory}/taginfo-tools]"
+  end
+
   git "#{directory}/taginfo" do
     action :sync
     repository "https://github.com/taginfo/taginfo.git"