# # Makefile rules for building all kinds of icons. # This file should be included in all iconset-specific Makefiles. # # Version of the iconsets VERSION=0.6 # Image format we're using SUFFIX=png #################################### Misc. Rules ############################### TMP=icongen.tmp ICONS=$(STATUSES) ALL_ICONS=$(foreach icon,$(ICONS),$(addsuffix .$(SUFFIX),$(icon))) all: icondef.xml clean: -rm -rf $(ALL_ICONS) icondef.xml $(TMP) # Fallback rule for when *.in.* file doesn't exist %.in.$(SUFFIX): %.$(SUFFIX) cp $< $@ ################################### Status Icons ############################### ONLINE_OVERLAYED_STATUSES=away dnd invisible xa chatty OFFLINE_OVERLAYED_STATUSES=ask noauth OTHER_STATUSES=offline OVERLAY_DIR=../overlays STATUSES=$(ONLINE_OVERLAYED_STATUSES) $(OFFLINE_OVERLAYED_STATUSES) $(OTHER_STATUSES) ONLINE_OVERLAYED_STATUS_ICONS=$(foreach status,$(ONLINE_OVERLAYED_STATUSES), \ $(addsuffix .$(SUFFIX),$(status))) OFFLINE_OVERLAYED_STATUS_ICONS=$(foreach status,$(OFFLINE_OVERLAYED_STATUSES), \ $(addsuffix .$(SUFFIX),$(status))) $(ONLINE_OVERLAYED_STATUS_ICONS): % : $(OVERLAY_DIR)/% online.$(SUFFIX) composite $< online.$(SUFFIX) $@ $(OFFLINE_OVERLAYED_STATUS_ICONS): % : $(OVERLAY_DIR)/% offline.$(SUFFIX) composite $< offline.$(SUFFIX) $@ offline.$(SUFFIX): online.$(SUFFIX) convert -modulate 100,0 $< $@ ################################# Dimming icon ################################ # FIXME: Quick & Dirty implementation %.dimming.$(SUFFIX): %.in.$(SUFFIX) -mkdir $(TMP) all_files=$<; \ for i in 90 80 70 60 50 40 30 20 10; do \ target=$(TMP)/$*.$$i.$(SUFFIX); \ all_files="$$all_files $$target"; \ all_files_inv="$$target $$all_files_inv"; \ cp $< $$target; \ mogrify -modulate 100,$$i $$target; \ done; \ target=$(TMP)/$*.0.$(SUFFIX); \ all_files="$$all_files $$target"; \ cp $< $$target; \ mogrify -modulate 100,0 $$target; \ all_files="$$all_files $$all_files_inv"; \ montage -background none -geometry 16x16 -tile 21 $$all_files $@ -rm -rf $(TMP) ################################# Spinning icon ############################### # FIXME: Even quicker & dirtier implementation %.spinning.$(SUFFIX): %.in.$(SUFFIX) -mkdir $(TMP) cp $< $(TMP)/0.png convert -scale 15! $< $(TMP)/tmp.png composite -gravity Center $(TMP)/tmp.png $(OVERLAY_DIR)/empty.png $(TMP)/1.png convert -scale 12! $< $(TMP)/tmp.png composite -gravity Center $(TMP)/tmp.png $(OVERLAY_DIR)/empty.png $(TMP)/2.png convert -scale 8! $< $(TMP)/tmp.png composite -gravity Center $(TMP)/tmp.png $(OVERLAY_DIR)/empty.png $(TMP)/3.png convert -scale 3! $< $(TMP)/tmp.png composite -gravity Center $(TMP)/tmp.png $(OVERLAY_DIR)/empty.png $(TMP)/4.png convert -flop $(TMP)/4.png $(TMP)/5.png convert -flop $(TMP)/3.png $(TMP)/6.png convert -flop $(TMP)/2.png $(TMP)/7.png convert -flop $(TMP)/1.png $(TMP)/8.png cd $(TMP) ; montage -background none -geometry 16x16 -tile 16 0.png 1.png 2.png 3.png 4.png 5.png 6.png 7.png 8.png 7.png 6.png 5.png 4.png 3.png 2.png 1.png ../$@ -rm -rf $(TMP) #################################### Icondef ################################## CREATION=$(shell date +"%Y-%m-%d") ICONDEF_HEAD=\n\ $(VERSION)<\/version>\n\ \t\t$(CREATION)<\/creation>\n\ \t\tRemko Tronçon<\/author>\n\ \t\tEveraldo Coelho \(Base icons\)<\/author>\n\ \t\t\n\ \t\t\tThe icons in this iconset are copyright by Remko Tronçon, and\n\ \t\t\tare made available under the terms of Lesser General Public License.\n\ \t\t\tThey are based on the 'Crystal project icons', copyright 2006-2007\n\ \t\t\tEveraldo Coelho, under the same license.\n\ \t\t<\/copyright> icondef.xml: icondef.xml.in ../Makefile cat $< | perl -p -e "s/\*\*HEAD\*\*/$(ICONDEF_HEAD)/" > $@