diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-11-29 15:25:38 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-11-29 15:25:38 -0500 |
commit | 2ea1da41e818da39339360ca6ea67cc47839b22f (patch) | |
tree | 04d7779c73cd7523e8f624fa60363e359617174c | |
parent | b62a23efaff3332caf5b2fa51f63d256ee154a94 (diff) |
Use a Makefile to generate '.png's
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | Makefile | 39 | ||||
-rw-r--r-- | dir.png | bin | 652 -> 0 bytes | |||
-rw-r--r-- | file.png | bin | 622 -> 0 bytes | |||
-rw-r--r-- | iso.png | bin | 1066 -> 0 bytes | |||
-rw-r--r-- | parent.png | bin | 672 -> 0 bytes | |||
-rw-r--r-- | pkg.png | bin | 831 -> 0 bytes | |||
-rw-r--r-- | repo.png | bin | 768 -> 0 bytes | |||
-rw-r--r-- | tar.png | bin | 679 -> 0 bytes | |||
-rw-r--r-- | torrent.png | bin | 890 -> 0 bytes | |||
-rw-r--r-- | txt.png | bin | 683 -> 0 bytes |
11 files changed, 49 insertions, 0 deletions
@@ -1 +1,11 @@ +*.svg.png *~ +dir.png +file.png +iso.png +parent.png +pkg.png +repo.png +tar.png +torrent.png +txt.png diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ce74c24 --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +# 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 = rsvg-convert $1 -o $2 $(if $3,-w $3) $(if $4,-h $4) $(if $5,--background-color=$5) +# 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 +parent.png = /usr/share/icons/oxygen/16x16/actions/go-up.png +pkg.png = pkg.svg.png +repo.png = /usr/share/icons/oxygen/16x16/places/folder-tar.png +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 + +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 +.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: diff --git a/dir.png b/dir.png Binary files differdeleted file mode 100644 index 3da2ca9..0000000 --- a/dir.png +++ /dev/null diff --git a/file.png b/file.png Binary files differdeleted file mode 100644 index 222832a..0000000 --- a/file.png +++ /dev/null diff --git a/iso.png b/iso.png Binary files differdeleted file mode 100644 index 612fc81..0000000 --- a/iso.png +++ /dev/null diff --git a/parent.png b/parent.png Binary files differdeleted file mode 100644 index b3d9cef..0000000 --- a/parent.png +++ /dev/null diff --git a/pkg.png b/pkg.png Binary files differdeleted file mode 100644 index ef02804..0000000 --- a/pkg.png +++ /dev/null diff --git a/repo.png b/repo.png Binary files differdeleted file mode 100644 index 5d0412f..0000000 --- a/repo.png +++ /dev/null diff --git a/tar.png b/tar.png Binary files differdeleted file mode 100644 index e1634bd..0000000 --- a/tar.png +++ /dev/null diff --git a/torrent.png b/torrent.png Binary files differdeleted file mode 100644 index 7165d1b..0000000 --- a/torrent.png +++ /dev/null diff --git a/txt.png b/txt.png Binary files differdeleted file mode 100644 index 01b07e8..0000000 --- a/txt.png +++ /dev/null |