Skip to content
Permalink
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
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 ePapirus Papirus Papirus-Adapta Papirus-Adapta-Nokto Papirus-Light Papirus-Dark \
$(DESTDIR)$(PREFIX)/share/icons
cp -R $(THEMES) $(DESTDIR)$(PREFIX)/share/icons

# skip building an icon cache when packaging
ifndef DESTDIR
$(MAKE) $(THEMES)
endif

post-install:
-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
$(THEMES):
-gtk-update-icon-cache -q $(DESTDIR)$(PREFIX)/share/icons/$@

uninstall:
-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))

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

push:
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:

update_authors:
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

@SmartFinn

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.