blob: 4d10a2d14dd75aec7137adf75373ef517be61ef6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# GNU make is required to run this file. To install on *BSD, run:
# gmake PREFIX=/usr/local install
PREFIX ?= /usr
IGNORE ?=
THEMES ?= $(patsubst %/index.theme,%,$(wildcard ./*/index.theme))
# 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)
_get_tag:
$(eval TAG := $(shell git describe --abbrev=0 --tags))
@echo $(TAG)
dist: _get_version
git archive --format=tar.gz -o $(notdir $(CURDIR))-$(VERSION).tar.gz master -- $(THEMES)
release: _get_version
git tag -f $(VERSION)
$(MAKE) aur_release
$(MAKE) copr_release
git push origin --tags
aur_release: _get_tag
cd aur; \
sed "s/pkgver\s*=.*/pkgver=$(TAG)/" -i PKGBUILD .SRCINFO; \
makepkg --printsrcinfo > .SRCINFO; \
git commit -a -m "$(TAG)"; \
git push origin;
git commit aur -m "$(TAG)"
git push origin
copr_release: _get_tag
sed "s/Version:.*/Version: $(TAG)/" -i flat-remix.spec
git commit flat-remix.spec -m "Update flat-remix.spec version $(TAG)"
git push origin
undo_release: _get_tag
-git tag -d $(TAG)
-git push --delete origin $(TAG)
.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
|