1
0
Fork 0
mirror of https://github.com/NixOS/nixos-artwork synced 2024-10-18 00:06:24 -04:00

Generate scaled icons of various sizes

Assembled into a barebones icon theme following the freedesktop.org
icon theme spec:

https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-0.11.html
This commit is contained in:
Benjamin Staffin 2017-03-16 16:45:27 -04:00
parent fa93510fc8
commit 9695a12c8c
2 changed files with 47 additions and 0 deletions

14
Makefile Normal file
View file

@ -0,0 +1,14 @@
modules = icons
.PHONY: $(modules) install clean all
all: $(modules)
install:
$(MAKE) $(foreach module,$(modules),-C $(module)) install
clean:
$(MAKE) $(foreach module,$(modules),-C $(module)) clean
$(modules):
$(MAKE) -C $@

33
icons/Makefile Executable file
View file

@ -0,0 +1,33 @@
#!/usr/bin/env make
# Requirements: Imagemagick
prefix ?= /usr
sizes = 16 24 32 48 64 72 96 128 256 512 1024
theme = hicolor
category = apps
icons = $(foreach size,$(sizes),$(size)x$(size)/$(category)/nix-snowflake.png) \
scalable/$(category)/nix-snowflake.svg
install_dest = $(DESTDIR)$(prefix)/share/icons/$(theme)
all: $(icons)
%/$(category)/nix-snowflake.png: ../logo/nix-snowflake.svg
@mkdir -p $(@D)
convert -background none -resize $* $< $@
scalable/$(category)/nix-snowflake.svg: ../logo/nix-snowflake.svg
@mkdir -p $(@D)
cp $< $@
$(install_dest)/%: %
install -D $< $@
install: $(foreach icon,$(icons),$(install_dest)/$(icon))
clean:
rm -f $(icons)
.PHONY: all install clean