aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Daniel Ruiz de Alegría <daniruizdealegria@gmail.com>2018-02-19 04:03:42 +0100
committerLibravatar Daniel Ruiz de Alegría <daniruizdealegria@gmail.com>2018-02-19 04:03:42 +0100
commit3722ae4023e137529fa0e6e6a56d69f6c78e8473 (patch)
treeb074a4d6e8d2b32f1de40eb8d095572970adac09
parent7340e6dd4e2e59cf54f689b78279e0c0ca79bc73 (diff)
downloadflat-remix-3722ae4023e137529fa0e6e6a56d69f6c78e8473.tar.gz
flat-remix-3722ae4023e137529fa0e6e6a56d69f6c78e8473.zip
Add Makefile20180219
-rwxr-xr-xMakefile48
1 files changed, 48 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100755
index 000000000..be042e0ce
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,48 @@
+# GNU make is required to run this file. To install on *BSD, run:
+# gmake PREFIX=/usr/local install
+
+PREFIX ?= /usr
+IGNORE ?=
+THEMES ?= Flat-Remix Flat-Remix-Dark Flat-Remix-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 icon caches when packaging
+ $(if $(DESTDIR),,$(MAKE) $(THEMES))
+
+$(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)
+
+
+.PHONY: $(THEMES) all install uninstall _get_version dist release undo_release
+
+# .BEGIN is ignored by GNU make so we can use it as a guard
+.BEGIN:
+ @head -3 Makefile
+ @false