python_version "3"
end
-unifont = if node[:lsb][:release].to_f < 22.04
- "ttf-unifont"
- else
- "fonts-unifont"
- end
-
-package %W[
- fonts-noto-cjk
- fonts-noto-hinted
- fonts-noto-unhinted
- fonts-hanazono
- #{unifont}
-]
-
-["NotoSansArabicUI-Regular.ttf", "NotoSansArabicUI-Bold.ttf"].each do |font|
- remote_file "/usr/share/fonts/truetype/noto/#{font}" do
- action :create_if_missing
- source "https://github.com/googlei18n/noto-fonts/raw/master/hinted/#{font}"
- owner "root"
- group "root"
- mode "644"
- end
-end
-
directory "/srv/tile.openstreetmap.org/cgi-bin" do
owner "tile"
group "tile"
group "tile"
end
+ link "#{style_directory}/fonts" do
+ to "/srv/tile.openstreetmap.org/fonts"
+ owner "tile"
+ group "tile"
+ end
+
+ execute "#{style_directory}/fonts" do
+ action :nothing
+ command "scripts/get-fonts.sh"
+ cwd style_directory
+ user "tile"
+ group "tile"
+ subscribes :run, "git[#{style_directory}]"
+ end
+
execute "#{style_directory}/project.mml" do
action :nothing
command "carto -a 3.0.0 project.mml > project.xml"