Skip to content
Browse files

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
  • Loading branch information...
SmartFinn committed Sep 24, 2017
1 parent 873ad7e commit edbb590addd77173f4e650e3c11f48fc7ad1c7a9
Showing with 23 additions and 24 deletions.
  1. +3 −0 .gitattributes
  2. +20 −24 Makefile
@@ -0,0 +1,3 @@
# exclude the following dirs/files from archives:
.* export-ignore
tools export-ignore
@@ -1,37 +1,37 @@
PREFIX ?= /usr
THEMES ?= ePapirus Papirus Papirus-Adapta Papirus-Adapta-Nokto Papirus-Dark Papirus-Light

# excludes IGNORE from THEMES list
THEMES := $(filter-out $(IGNORE), $(THEMES))


mkdir -p $(DESTDIR)$(PREFIX)/share/icons
cp -R ePapirus Papirus Papirus-Adapta Papirus-Adapta-Nokto Papirus-Light Papirus-Dark \
cp -R $(THEMES) $(DESTDIR)$(PREFIX)/share/icons

# skip building an icon cache when packaging
ifndef DESTDIR

-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/ePapirus
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/Papirus
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/Papirus-Adapta
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/Papirus-Adapta-Nokto
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/Papirus-Dark
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/Papirus-Light
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/$@

-rm -rf $(DESTDIR)$(PREFIX)/share/icons/ePapirus
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/Papirus
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/Papirus-Adapta
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/Papirus-Adapta-Nokto
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/Papirus-Dark
-rm -rf $(DESTDIR)$(PREFIX)/share/icons/Papirus-Light
-rm -rf $(foreach theme,$(THEMES),$(DESTDIR)$(PREFIX)/share/icons/$(theme))

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

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

release: _get_version push
release: _get_version
git tag -f $(VERSION)
git push origin
git push origin --tags

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

editor Papirus/AUTHORS
cp -f Papirus/AUTHORS Papirus-Adapta/AUTHORS
cp -f Papirus/AUTHORS Papirus-Adapta-Nokto/AUTHORS
cp -f Papirus/AUTHORS ePapirus/AUTHORS
cp -f Papirus/AUTHORS Papirus-Dark/AUTHORS
cp -f Papirus/AUTHORS Papirus-Light/AUTHORS
@echo $(THEMES) | xargs -n 1 cp -vu Papirus/AUTHORS || true

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

1 comment on commit edbb590


This comment has been minimized.

Copy link
Member Author

commented on edbb590 Sep 24, 2017

@varlesh добавил make dist для создания архивов.

Please sign in to comment.
You can’t perform that action at this time.