diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-11-29 15:52:59 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-11-29 15:52:59 -0500 |
commit | fc184eff38295193a37e2564ec1e385512109b7b (patch) | |
tree | c96768d6d04f1ea0b97756a3c737e698422b3800 | |
parent | 2ea1da41e818da39339360ca6ea67cc47839b22f (diff) |
tidy up
-rw-r--r-- | Makefile | 32 | ||||
-rw-r--r-- | pkg.svg | 4 | ||||
-rw-r--r-- | tar.svg | 4 |
3 files changed, 28 insertions, 12 deletions
@@ -1,17 +1,20 @@ -# SVG2PNG: Each is buggy in their own way -# ImageMagick: doesn't support transparency -#SVG2PNG = convert $1 -format png $(if $3,-resize $3x)$(if $4,$4) $(if $5,-bacground $5) $2 -# librsvg: doesn't support <style> element +## SVG2PNG: Each is buggy in their own way +## Usage: $(call SVG2PNG,infile,outfile[,width,height,background-color]) +## +## ImageMagick: doesn't support transparency +#SVG2PNG = convert $1 -format png $(if $3,-resize $3x)$(if $4,$4) $(if $5,-background $5) $2 +## librsvg: doesn't support <style> element #SVG2PNG = rsvg-convert $1 -o $2 $(if $3,-w $3) $(if $4,-h $4) $(if $5,--background-color=$5) -# Inkscape: messes up gradients +## Inkscape: messes up gradients SVG2PNG = inkscape $1 --export-png $2 $(if $3,-w $3) $(if $4,-h $4) $(if $5,-b '$5') -# pngcrush is available from [pcr] #PNGCRUSH = cp $1 $2 PNGCRUSH = pngcrush $1 $2 default: PHONY all + + dir.png = /usr/share/icons/oxygen/16x16/mimetypes/inode-directory.png file.png = /usr/share/icons/oxygen/16x16/mimetypes/unknown.png iso.png = /usr/share/icons/oxygen/16x16/devices/media-optical.png @@ -22,18 +25,31 @@ tar.png = tar.svg.png torrent.png = /usr/share/icons/oxygen/16x16/actions/download.png txt.png = /usr/share/icons/oxygen/16x16/mimetypes/text-plain.png +# TODO: get the Arch and Parabola icons + +# 'tar.svg' is derived from +# '/usr/share/icons/oxygen/scalable/places/small/16x16/folder-tar.svgz' + +# 'pkg.svg' is derived from 'tar.svg' + + + pngs := $(shell sed -n 's/\.png\s*=.*/.png/p' $(MAKEFILE_LIST)) $(foreach png,$(pngs),$(eval $(png): $($(png)); $$(call PNGCRUSH,$$<,$$@))) all: PHONY $(pngs) .gitignore - clean: PHONY - rm -f -- $(pngs) *.svg.png + rm -f -- *.svg.png +distclean: PHONY clean + rm -f -- $(pngs) + .gitignore: $(MAKEFILE_LIST) printf '%s\n' '*~' '*.svg.png' $(pngs) | LC_COLLATE=C sort > .gitignore %.svg.png: %.svg $(call SVG2PNG,$<,$@,16) + + .PHONY: PHONY .DELETE_ON_ERROR: @@ -16,9 +16,9 @@ sodipodi:version="0.32" inkscape:version="0.48.5 r10040" version="1.0" - sodipodi:docname="folder-tar.svg" + sodipodi:docname="pkg.svg" inkscape:output_extension="org.inkscape.output.svgz.inkscape" - inkscape:export-filename="/home/luke/icons/folder-tar.png" + inkscape:export-filename="pkg.svg.png" inkscape:export-xdpi="11.25" inkscape:export-ydpi="11.25"> <defs @@ -16,9 +16,9 @@ sodipodi:version="0.32" inkscape:version="0.48.5 r10040" version="1.0" - sodipodi:docname="pkg.svg" + sodipodi:docname="tar.svg" inkscape:output_extension="org.inkscape.output.svgz.inkscape" - inkscape:export-filename="/home/luke/icons/folder-tar.png" + inkscape:export-filename="tar.svg.png" inkscape:export-xdpi="11.25" inkscape:export-ydpi="11.25"> <defs |