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 #     https://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.
 
  21 include_recipe "tools"
 
  29   libboost-filesystem-dev
 
  30   libboost-program-options-dev
 
  34 tilelog_source_directory = node[:tilelog][:source_directory]
 
  35 tilelog_input_directory = node[:tilelog][:input_directory]
 
  36 tilelog_output_directory = node[:tilelog][:output_directory]
 
  38 # resources for building the tile analysis binary
 
  39 git tilelog_source_directory do
 
  41   repository "https://github.com/zerebubuth/openstreetmap-tile-analyze.git"
 
  45   notifies :run, "execute[tilelog-autogen]", :immediately
 
  48 execute "tilelog-autogen" do
 
  50   command "autoreconf -i"
 
  51   cwd tilelog_source_directory
 
  54   notifies :run, "execute[tilelog-configure]", :immediately
 
  57 execute "tilelog-configure" do
 
  59   command "./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu"
 
  60   cwd tilelog_source_directory
 
  63   notifies :run, "execute[tilelog-build]", :immediately
 
  66 execute "tilelog-build" do
 
  69   cwd tilelog_source_directory
 
  74 # resources for running the tile analysis
 
  75 template "/usr/local/bin/tilelog" do
 
  80   variables :analyze_bin => "#{tilelog_source_directory}/openstreetmap-tile-analyze",
 
  81             :input_dir => tilelog_input_directory,
 
  82             :output_dir => tilelog_output_directory
 
  89   command "/usr/local/bin/tilelog"
 
  90   mailto "zerebubuth@gmail.com"
 
  93 # resources related to the output of the analysis and where it
 
  94 # can be publicly downloaded.
 
  95 directory tilelog_output_directory do