-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
69 lines (55 loc) · 1.8 KB
/
Makefile
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
69
PKGNAME = skeuos-gtk
MAINTAINER = Daniel Ruiz de Alegría <[email protected]>
PREFIX ?= /usr
THEMES ?= $(patsubst themes/%/,%,$(wildcard themes/*/))
include src/Makefile.inc
all:
build:
$(MAKE) -C src build
install:
mkdir -p $(DESTDIR)$(PREFIX)/share/themes
cp -a $(foreach theme,$(THEMES),themes/$(theme)) $(DESTDIR)$(PREFIX)/share/themes
uninstall:
-rm -rf $(foreach theme,$(THEMES),$(DESTDIR)$(PREFIX)/share/themes/$(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
count=1; \
for color_variant in $(COLOR_VARIANTS); \
do \
count_pretty=$$(echo "0$${count}" | tail -c 3); \
(cd themes && tar -c "Skeuos-$${color_variant}"*) | \
xz -z - > "$${count_pretty}-Skeuos-$${color_variant}_$(VERSION).tar.xz"; \
count=$$((count+1)); \
done; \
release: _get_version
$(MAKE) generate_changelog VERSION=$(VERSION)
$(MAKE) aur_release VERSION=$(VERSION)
git tag -f $(VERSION)
git push origin --tags
$(MAKE) dist
aur_release: _get_version
cd aur; \
sed "s/pkgver=.*/pkgver=$(VERSION)/" -i PKGBUILD; \
sed "s/pkgver =.*/pkgver = $(VERSION)/" -i .SRCINFO; \
git commit -a -m "$(VERSION)"; \
git push origin master;
git commit aur -m "Update aur version $(VERSION)"
git push origin master
generate_changelog: _get_version _get_tag
git checkout $(TAG) CHANGELOG
mv CHANGELOG CHANGELOG.old
echo [$(VERSION)] > CHANGELOG
printf "%s\n\n" "$$(git log --pretty=format:' * %s' $(TAG)..HEAD)" >> CHANGELOG
cat CHANGELOG.old >> CHANGELOG
rm CHANGELOG.old
$$EDITOR CHANGELOG
git commit CHANGELOG -m "Update CHANGELOG version $(VERSION)"
git push origin HEAD
clean:
-make -C src clean
.PHONY: all build install uninstall _get_version _get_tag clean