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:
parent
fa93510fc8
commit
9695a12c8c
14
Makefile
Normal file
14
Makefile
Normal 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
33
icons/Makefile
Executable 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
|
Loading…
Reference in a new issue