Icon Makefile
authorStefano Rivera <stefano@rivera.za.net>
Sat, 17 May 2014 13:48:14 +0000 (15:48 +0200)
committerStefano Rivera <stefano@rivera.za.net>
Sat, 17 May 2014 13:48:14 +0000 (15:48 +0200)
data/icons/Makefile [new file with mode: 0644]

diff --git a/data/icons/Makefile b/data/icons/Makefile
new file mode 100644 (file)
index 0000000..fa114b6
--- /dev/null
@@ -0,0 +1,27 @@
+TARGETS=robolock.icns robolock.ico
+
+PNGS=$(wildcard *.png)
+RGBA_PNGS=$(patsubst %,rgba/%,$(PNGS))
+
+.PHONY: all
+all: $(TARGETS)
+       rm -rf rgba
+
+.PHONY: clean
+clean:
+       rm -rf rgba
+       rm -f $(TARGETS)
+
+.PHONY: install-tools
+install-tools:
+       echo apt-get install icnsutils icoutils
+
+rgba/%.png: %.png
+       mkdir -p rgba
+       convert $^ PNG32:$@
+
+robolock.icns: $(filter-out %_24.png,$(RGBA_PNGS))
+       png2icns $@ $^
+
+robolock.ico: $(RGBA_PNGS)
+       icotool --create --output $@ $^