+
+src/static/favicon.ico: src/static/img/ipfire-tux.png Makefile
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(CONVERT) $< -background none -flatten -density 1200 \
+ -resize 50% -define icon:auto-resize=64,48,32,16 $@
+
+src/static/img/apple-touch-icon-%-precomposed.png: src/static/img/ipfire-tux.png Makefile
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(CONVERT) -background none -flatten -density 1200 -bordercolor none -border 5%x5% \
+ -resize $(patsubst src/static/img/apple-touch-icon-%-precomposed.png,%,$@) -gravity center \
+ -extent $(patsubst src/static/img/apple-touch-icon-%-precomposed.png,%,$@)x$(patsubst src/static/img/apple-touch-icon-%-precomposed.png,%,$@) \
+ $< $@
+
+# Resizes images for being used in messages which are 600px wide
+%@600.jpg: %.jpg
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(CONVERT) -units PixelsPerInch $< -resize 600x -strip -quality 85 $@
+
+# Fonts
+
+%.woff2: %.ttf
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(WOFF2_COMPRESS) $^ >/dev/null
+
+# Video Stuff
+
+# Multi-threading options for faster encoding
+FFMPEG_MT = \
+ -row-mt 1 \
+ -threads $(shell getconf _NPROCESSORS_ONLN) \
+ -tile-columns 2
+
+# Enable to log less
+#FFMPEG += \
+# -loglevel quiet
+
+# AV1
+src/static/videos/firewall@%.av1.mp4: src/static/videos/firewall.mp4
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(FFMPEG) -y \
+ -i $^ \
+ -map_metadata -1 \
+ -an \
+ -c:v libsvtav1 \
+ -b:v 0 \
+ -crf 31 \
+ -strict experimental \
+ -preset 3 \
+ -pix_fmt yuv420p \
+ -movflags +faststart \
+ -vf scale=$(patsubst src/static/videos/firewall@%.av1.mp4,%,$@):-2:flags=lanczos,fps=25 \
+ $(FFMPEG_MT) \
+ $@
+
+# H.256
+src/static/videos/firewall@%.h265.mp4: src/static/videos/firewall.mp4
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(FFMPEG) -y \
+ -i $^ \
+ -map_metadata -1 \
+ -an \
+ -c:v libx265 \
+ -b:v 0 \
+ -crf 27 \
+ -preset veryslow \
+ -pix_fmt yuv420p \
+ -movflags +faststart \
+ -tag:v hvc1 \
+ -vf scale=$(patsubst src/static/videos/firewall@%.h265.mp4,%,$@):-2:flags=lanczos,fps=25 \
+ $(FFMPEG_MT) \
+ $@
+
+# H.264
+src/static/videos/firewall@%.h264.mp4: src/static/videos/firewall.mp4
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(FFMPEG) -y \
+ -i $^ \
+ -map_metadata -1 \
+ -an \
+ -c:v libx264 \
+ -b:v 0 \
+ -crf 27 \
+ -preset veryslow \
+ -profile:v main \
+ -pix_fmt yuv420p \
+ -movflags +faststart \
+ -vf scale=$(patsubst src/static/videos/firewall@%.h264.mp4,%,$@):-2:flags=lanczos,fps=25 \
+ $(FFMPEG_MT) \
+ $@
+
+# VP9
+src/static/videos/firewall@%.vp9.mp4: src/static/videos/firewall.mp4
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(FFMPEG) -y \
+ -i $^ \
+ -map_metadata -1 \
+ -an \
+ -c:v libvpx-vp9 \
+ -b:v 0 \
+ -crf 31 \
+ -deadline best \
+ -preset veryslow \
+ -pix_fmt yuv420p \
+ -movflags +faststart \
+ -vf scale=$(patsubst src/static/videos/firewall@%.vp9.mp4,%,$@):-2:flags=lanczos,fps=25 \
+ $(FFMPEG_MT) \
+ $@
+
+# Cover image
+src/static/videos/firewall.jpg: src/static/videos/firewall.mp4
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(FFMPEG) -y \
+ -i $^ \
+ -map_metadata -1 \
+ -qscale:v 1 \
+ -frames:v 1 \
+ -vf scale=1920:-2 \
+ $@
+
+.PHONY: update
+update:
+ for i in src/systemd/ipfire.org-webapp-*.service; do systemctl restart $$(basename $${i}) && sleep 5; done