]>
Commit | Line | Data |
---|---|---|
3ae5efe3 MT |
1 | ############################################################################### |
2 | # IPFire.org - An Open Source Firewall Solution # | |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
4 | ############################################################################### | |
5 | ||
6 | include ../Makeconf | |
7 | include ../Makerules | |
8 | ||
9 | ICON_NAME = $(DISTRO_SNAME)-logo | |
10 | ||
11 | RESOLUTIONS = 16x16 32x32 48x48 64x64 96x96 128x128 256x256 512x512 | |
12 | ICONS = $(foreach res,$(RESOLUTIONS),$(ICON_NAME)-$(res).png) | |
13 | ||
00bb11d7 | 14 | ICON_KERNEL = kernel-logo.ppm |
3ae5efe3 | 15 | ICON_EPS = ../objects/ipfire-icon.eps |
00bb11d7 | 16 | ICON_PNM = $(patsubst %.eps,%.pnm,$(ICON_EPS)) |
3ae5efe3 MT |
17 | ICON_SVG = $(patsubst %.eps,%.svg,$(ICON_EPS)) |
18 | ||
00bb11d7 | 19 | all: $(ICON_KERNEL) $(ICON_SVG) $(ICONS) |
3ae5efe3 | 20 | |
00bb11d7 | 21 | $(ICON_SVG): $(ICON_EPS) |
3ae5efe3 MT |
22 | convert $< $@ |
23 | ||
24 | # Create a PNG icon file for each resolution. | |
00bb11d7 | 25 | $(ICONS): $(ICON_EPS) |
3ae5efe3 MT |
26 | convert -resize $(patsubst $(ICON_NAME)-%.png,%,$@) \ |
27 | -transparent white \ | |
28 | $< $@ | |
29 | ||
00bb11d7 MT |
30 | $(ICON_PNM): $(ICON_EPS) |
31 | convert \ | |
32 | -resize 80x80 \ | |
33 | -compress none \ | |
34 | $< $@ | |
35 | ||
36 | $(ICON_KERNEL): $(ICON_PNM) | |
37 | pnmquant --plain 224 $< > $@ | |
38 | ||
39 | install: $(ICON_KERNEL) $(ICONS) | |
3ae5efe3 MT |
40 | -mkdir -pv $(DESTDIR)$(PREFIX)/share/pixmaps |
41 | -mkdir -pv $(DESTDIR)$(PREFIX)/share/icons/$(DISTRO_NAME) | |
42 | ||
43 | for res in $(RESOLUTIONS); do \ | |
44 | mkdir -pv $(DESTDIR)$(PREFIX)/share/icons/$(DISTRO_NAME)/$${res}/; \ | |
45 | cp -vfl $(ICON_NAME)-$${res}.png \ | |
46 | $(DESTDIR)$(PREFIX)/share/icons/$(DISTRO_NAME)/$${res}/$(ICON_NAME).png; \ | |
47 | \ | |
48 | case "$${res}" in \ | |
49 | 512x512) \ | |
50 | cp -vfl $(ICON_NAME)-$${res}.png \ | |
51 | $(DESTDIR)$(PREFIX)/share/pixmaps/$(DISTRO_SNAME)-logo.png; \ | |
52 | ;; \ | |
53 | 256x256) \ | |
54 | cp -vfl $(ICON_NAME)-$${res}.png \ | |
55 | $(DESTDIR)$(PREFIX)/share/pixmaps/system-logo-white.png; \ | |
56 | ;; \ | |
57 | esac; \ | |
58 | done | |
59 | ||
60 | # Install favicon. | |
61 | -mkdir -pv $(DESTDIR)/etc | |
62 | ln -svf ..$(PREFIX)/share/icons/$(DISTRO_NAME)/16x16/$(ICON_NAME).png \ | |
63 | $(DESTDIR)/etc/favicon.png | |
64 | ||
00bb11d7 MT |
65 | # Install kernel logo. |
66 | cp -vfl $(ICON_KERNEL) $(DESTDIR)$(PREFIX)/share/pixmaps/kernel-logo.ppm | |
67 | ||
3ae5efe3 | 68 | clean: |
00bb11d7 | 69 | rm -vf $(ICONS) $(ICON_KERNEL) $(ICON_PNM) $(ICON_SVG) |