]> git.ipfire.org Git - artwork.git/commitdiff
Makefile: Use rsvg-convert to generate output files
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Mar 2026 16:44:01 +0000 (16:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Mar 2026 16:44:01 +0000 (16:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile

index 2ab4dd166c51033f291328d8794f7427b2b91e4e..efde0639c2f6b4cd73b3f2bc349c08f7dfcc2874 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,9 @@ PRIMARY = ff2e52
 DARK    = 363636
 WHITE   = ffffff
 
+# rsvg-convert command line
+RSVG_CONVERT = rsvg-convert --keep-aspect-ratio
+
 # Inkscape command line
 INKSCAPE = inkscape $< --export-filename=$@
 
@@ -89,67 +92,67 @@ standard/favicon.svg: favicon.svg
 # Converts the logo to PDF
 %.pdf: %.svg
        mkdir -p $(dir $@)
-       $(INKSCAPE)
+       rsvg-convert --format=pdf1.7 $< > $@
 
 # Converts the logo to PNG
 %/logo-512.png: %/logo.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=512
+       $(RSVG_CONVERT) --format=png --width=512 $< > $@
 
 %/logo-1024.png: %/logo.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=1024
+       $(RSVG_CONVERT) --format=png --width=1024 $< > $@
 
 %/logo-2048.png: %/logo.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=2048
+       $(RSVG_CONVERT) --format=png --width=2048 $< > $@
 
 %/logo-4096.png: %/logo.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=4096
+       $(RSVG_CONVERT) --format=png --width=4096 $< > $@
 
 # Converts the square logo to PNG
 %/logo-square-512x512.png: %/logo-square.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=512
+       $(RSVG_CONVERT) --format=png --width=512 $< > $@
 
 %/logo-square-1024x1024.png: %/logo-square.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=1024
+       $(RSVG_CONVERT) --format=png --width=1024 $< > $@
 
 %/logo-square-2048x2048.png: %/logo-square.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=2048
+       $(RSVG_CONVERT) --format=png --width=2048 $< > $@
 
 %/logo-square-4096x4096.png: %/logo-square.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=4096
+       $(RSVG_CONVERT) --format=png --width=4096 $< > $@
 
 # Converts the favicon to PNG
 %/favicon-16x16.png: %/favicon.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=16
+       $(RSVG_CONVERT) --format=png --width=16 $< > $@
 
 %/favicon-32x32.png: %/favicon.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=32
+       $(RSVG_CONVERT) --format=png --width=32 $< > $@
 
 %/favicon-64x64.png: %/favicon.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=64
+       $(RSVG_CONVERT) --format=png --width=64 $< > $@
 
 %/favicon-128x128.png: %/favicon.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=128
+       $(RSVG_CONVERT) --format=png --width=128 $< > $@
 
 %/favicon-256x256.png: %/favicon.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=256
+       $(RSVG_CONVERT) --format=png --width=256 $< > $@
 
 # This is like the favicon but in 180x180px
 %/apple-touch-icon.png: %/favicon.svg
        mkdir -p $(dir $@) && \
-       $(INKSCAPE) --export-width=180
+       $(RSVG_CONVERT) --format=png --width=180 $< > $@
 
 # Convert the logo to monochome only
 %-monochrome.svg: %.svg