mirror of
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git
synced 2024-10-18 09:10:34 -04:00
edbb590add
* Now can change the list of themes that will be installed: Install only Papirus and Papirus-Dark: `make THEMES="Papirus Papirus-Dark" install` Install all except ePapirus and Papirus-Light `make IGNORE="ePapirus Papirus-Light" install` * Deleted `make post-install`. Icon caches now building with `make install` if DESTDIR is not set * Added `make dist` * Added .gitattributes. It excludes tools from releases
62 lines
1.6 KiB
Makefile
62 lines
1.6 KiB
Makefile
PREFIX ?= /usr
|
|
IGNORE ?=
|
|
THEMES ?= ePapirus Papirus Papirus-Adapta Papirus-Adapta-Nokto Papirus-Dark Papirus-Light
|
|
|
|
# excludes IGNORE from THEMES list
|
|
THEMES := $(filter-out $(IGNORE), $(THEMES))
|
|
|
|
all:
|
|
|
|
install:
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/icons
|
|
cp -R $(THEMES) $(DESTDIR)$(PREFIX)/share/icons
|
|
|
|
# skip building an icon cache when packaging
|
|
ifndef DESTDIR
|
|
$(MAKE) $(THEMES)
|
|
endif
|
|
|
|
$(THEMES):
|
|
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/$@
|
|
|
|
uninstall:
|
|
-rm -rf $(foreach theme,$(THEMES),$(DESTDIR)$(PREFIX)/share/icons/$(theme))
|
|
|
|
_get_version:
|
|
$(eval VERSION := $(shell git show -s --format=%cd --date=format:%Y%m%d HEAD))
|
|
@echo $(VERSION)
|
|
|
|
dist: _get_version
|
|
git archive --format=tar.gz -o $(notdir $(CURDIR))-$(VERSION).tar.gz master -- $(THEMES)
|
|
|
|
release: _get_version
|
|
git tag -f $(VERSION)
|
|
git push origin
|
|
git push origin --tags
|
|
|
|
undo_release: _get_version
|
|
-git tag -d $(VERSION)
|
|
-git push --delete origin $(VERSION)
|
|
|
|
tests:
|
|
# <<< TEST 1: Searching for icons with renderer issues
|
|
-@LC_ALL=C egrep -rl --include='*.svg' \
|
|
-e 'd="[a-zA-Z0-9 -.]+-\.[a-zA-Z0-9 -.]+"' \
|
|
-e 'd="[a-zA-Z0-9 -.]+\s\.[a-zA-Z0-9 -.]+"' \
|
|
|| true
|
|
# >>> TEST 1: END
|
|
# <<< TEST 2: Searching for icons with bitmap images
|
|
-@LC_ALL=C egrep -rl --include='*.svg' \
|
|
-e '<image[ ]' \
|
|
|| true
|
|
# >>> TEST 2: END
|
|
# <<< TEST 3: Searching for broken symlinks
|
|
-@find . -xtype l -not -path './tools/*' -print
|
|
# >>> TEST 3: END
|
|
|
|
update_authors:
|
|
editor Papirus/AUTHORS
|
|
@echo $(THEMES) | xargs -n 1 cp -vu Papirus/AUTHORS || true
|
|
|
|
|
|
.PHONY: $(THEMES) all install uninstall _get_version dist release undo_release tests update_authors
|