Generate a kernel logo.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Jan 2013 00:35:48 +0000 (01:35 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 13 Jan 2013 01:51:50 +0000 (02:51 +0100)
icons/Makefile

index fc6bfea..76ec5ff 100644 (file)
@@ -11,23 +11,32 @@ ICON_NAME = $(DISTRO_SNAME)-logo
 RESOLUTIONS = 16x16 32x32 48x48 64x64 96x96 128x128 256x256 512x512
 ICONS = $(foreach res,$(RESOLUTIONS),$(ICON_NAME)-$(res).png)
 
+ICON_KERNEL = kernel-logo.ppm
 ICON_EPS = ../objects/ipfire-icon.eps
+ICON_PNM = $(patsubst %.eps,%.pnm,$(ICON_EPS))
 ICON_SVG = $(patsubst %.eps,%.svg,$(ICON_EPS))
 
-all: $(ICON_SVG) $(ICONS)
+all: $(ICON_KERNEL) $(ICON_SVG) $(ICONS)
 
-$(ICON_EPS): Makefile
-
-$(ICON_SVG): $(ICON_EPS) Makefile
+$(ICON_SVG): $(ICON_EPS)
        convert $< $@
 
 # Create a PNG icon file for each resolution.
-$(ICONS): $(ICON_EPS) Makefile
+$(ICONS): $(ICON_EPS)
        convert -resize $(patsubst $(ICON_NAME)-%.png,%,$@) \
                -transparent white \
                $< $@
 
-install: $(ICONS)
+$(ICON_PNM): $(ICON_EPS)
+       convert \
+               -resize 80x80 \
+               -compress none \
+               $< $@
+
+$(ICON_KERNEL): $(ICON_PNM)
+       pnmquant --plain 224 $< > $@
+
+install: $(ICON_KERNEL) $(ICONS)
        -mkdir -pv $(DESTDIR)$(PREFIX)/share/pixmaps
        -mkdir -pv $(DESTDIR)$(PREFIX)/share/icons/$(DISTRO_NAME)
 
@@ -53,5 +62,8 @@ install: $(ICONS)
        ln -svf ..$(PREFIX)/share/icons/$(DISTRO_NAME)/16x16/$(ICON_NAME).png \
                $(DESTDIR)/etc/favicon.png
 
+       # Install kernel logo.
+       cp -vfl $(ICON_KERNEL) $(DESTDIR)$(PREFIX)/share/pixmaps/kernel-logo.ppm
+
 clean:
-       rm -vf $(ICONS) $(ICON_SVG)
+       rm -vf $(ICONS) $(ICON_KERNEL) $(ICON_PNM) $(ICON_SVG)