5 # Copyright:: 2013, 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.
20 node.default[:incron][:planetdump] = {
22 :path => "/store/backup",
23 :events => %w[IN_CREATE IN_MOVED_TO],
24 :command => "/usr/local/bin/planetdump $#"
28 include_recipe "incron"
37 libboost-program-options-dev
38 libboost-date-time-dev
39 libboost-filesystem-dev
41 libboost-iostreams-dev
50 directory "/opt/planet-dump-ng" do
56 git "/opt/planet-dump-ng" do
58 repository "git://github.com/zerebubuth/planet-dump-ng.git"
64 execute "/opt/planet-dump-ng/autogen.sh" do
66 command "./autogen.sh"
67 cwd "/opt/planet-dump-ng"
70 subscribes :run, "git[/opt/planet-dump-ng]"
73 execute "/opt/planet-dump-ng/configure" do
76 cwd "/opt/planet-dump-ng"
79 subscribes :run, "execute[/opt/planet-dump-ng/autogen.sh]"
82 execute "/opt/planet-dump-ng/Makefile" do
85 cwd "/opt/planet-dump-ng"
88 subscribes :run, "execute[/opt/planet-dump-ng/configure]"
91 directory "/store/planetdump" do
97 %w[planetdump planet-mirror-redirect-update].each do |program|
98 template "/usr/local/bin/#{program}" do
99 source "#{program}.erb"
106 template "/etc/cron.d/planet-dump-mirror" do
107 source "planet-dump-mirror-cron.erb"