2 # Cookbook Name:: planet
5 # Copyright 2014, OpenStreetMap Foundation
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 include_recipe "tools"
26 package "libboost-filesystem-dev"
27 package "libboost-system-dev"
28 package "libboost-program-options-dev"
30 tilelog_source_directory = node[:planet][:tilelog_source_directory]
31 tilelog_input_directory = node[:planet][:tilelog_input_directory]
32 tilelog_output_directory = node[:planet][:tilelog_output_directory]
34 execute "tilelog-build" do
37 cwd tilelog_source_directory
42 execute "tilelog-configure" do
44 command "./configure --with-boost-libdir=/usr/lib"
45 cwd tilelog_source_directory
48 notifies :run, "execute[tilelog-build]", :immediate
51 execute "tilelog-autogen" do
53 command "./autogen.sh"
54 cwd tilelog_source_directory
57 notifies :run, "execute[tilelog-configure]", :immediate
60 git tilelog_source_directory do
62 repository "https://github.com/zerebubuth/openstreetmap-tile-analyze.git"
66 notifies :run, "execute[tilelog-autogen]", :immediate
69 template "/usr/local/bin/tilelog" do
75 :analyze_bin => "#{tilelog_source_directory}/openstreetmap-tile-analyze",
76 :input_dir => tilelog_input_directory,
77 :output_dir => tilelog_output_directory
81 template "/etc/cron.d/tilelog" do
82 source "tileog.cron.erb"