Skip to content

Commit edbb590

Browse files
committed
Update Makefile (see commit description)
* 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
1 parent 873ad7e commit edbb590

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# exclude the following dirs/files from archives:
2+
.* export-ignore
3+
tools export-ignore

Makefile

+20-24
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
PREFIX ?= /usr
2+
IGNORE ?=
3+
THEMES ?= ePapirus Papirus Papirus-Adapta Papirus-Adapta-Nokto Papirus-Dark Papirus-Light
4+
5+
# excludes IGNORE from THEMES list
6+
THEMES := $(filter-out $(IGNORE), $(THEMES))
27

38
all:
49

510
install:
611
mkdir -p $(DESTDIR)$(PREFIX)/share/icons
7-
cp -R ePapirus Papirus Papirus-Adapta Papirus-Adapta-Nokto Papirus-Light Papirus-Dark \
8-
$(DESTDIR)$(PREFIX)/share/icons
12+
cp -R $(THEMES) $(DESTDIR)$(PREFIX)/share/icons
13+
14+
# skip building an icon cache when packaging
15+
ifndef DESTDIR
16+
$(MAKE) $(THEMES)
17+
endif
918

10-
post-install:
11-
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/ePapirus
12-
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/Papirus
13-
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/Papirus-Adapta
14-
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/Papirus-Adapta-Nokto
15-
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/Papirus-Dark
16-
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/Papirus-Light
19+
$(THEMES):
20+
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/$@
1721

1822
uninstall:
19-
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/ePapirus
20-
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/Papirus
21-
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/Papirus-Adapta
22-
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/Papirus-Adapta-Nokto
23-
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/Papirus-Dark
24-
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/Papirus-Light
23+
-rm -rf $(foreach theme,$(THEMES),$(DESTDIR)$(PREFIX)/share/icons/$(theme))
2524

2625
_get_version:
2726
$(eval VERSION := $(shell git show -s --format=%cd --date=format:%Y%m%d HEAD))
2827
@echo $(VERSION)
2928

30-
push:
31-
git push origin
29+
dist: _get_version
30+
git archive --format=tar.gz -o $(notdir $(CURDIR))-$(VERSION).tar.gz master -- $(THEMES)
3231

33-
release: _get_version push
32+
release: _get_version
3433
git tag -f $(VERSION)
34+
git push origin
3535
git push origin --tags
3636

3737
undo_release: _get_version
@@ -56,11 +56,7 @@ tests:
5656

5757
update_authors:
5858
editor Papirus/AUTHORS
59-
cp -f Papirus/AUTHORS Papirus-Adapta/AUTHORS
60-
cp -f Papirus/AUTHORS Papirus-Adapta-Nokto/AUTHORS
61-
cp -f Papirus/AUTHORS ePapirus/AUTHORS
62-
cp -f Papirus/AUTHORS Papirus-Dark/AUTHORS
63-
cp -f Papirus/AUTHORS Papirus-Light/AUTHORS
59+
@echo $(THEMES) | xargs -n 1 cp -vu Papirus/AUTHORS || true
6460

6561

66-
.PHONY: all install uninstall _get_version push release undo_release tests update_authors
62+
.PHONY: $(THEMES) all install uninstall _get_version dist release undo_release tests update_authors

0 commit comments

Comments
 (0)