Skip to content
This repository was archived by the owner on Aug 10, 2020. It is now read-only.

Commit a5fd30b

Browse files
committed
Update Makefile
1 parent d61ae7c commit a5fd30b

File tree

1 file changed

+33
-12
lines changed

1 file changed

+33
-12
lines changed

Makefile

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,38 @@
1-
INSTALLDIR-ARCH = $(DESTDIR)/usr/lib/libreoffice/share/config/
2-
INSTALLDIR-AUR = $(DESTDIR)/opt/libreoffice5.2/share/config/
3-
RM = rm -rf
1+
all: install
42

5-
all:
3+
install:
4+
mkdir -p $(DESTDIR)/usr/share/libreoffice/share/config
5+
cp --no-preserve=mode,ownership -r \
6+
images_papirus.zip \
7+
images_papirus_dark.zip \
8+
$(DESTDIR)/usr/share/libreoffice/share/config
9+
mkdir -p $(DESTDIR)/usr/lib/libreoffice/share/config
10+
ln -s $(DESTDIR)/usr/share/libreoffice/share/config/images_papirus.zip \
11+
$(DESTDIR)/usr/lib/libreoffice/share/config/images_papirus.zip
12+
ln -s $(DESTDIR)/usr/share/libreoffice/share/config/images_papirus_dark.zip \
13+
$(DESTDIR)/usr/lib/libreoffice/share/config/images_papirus_dark.zip
614

7-
install: local
15+
uninstall:
16+
-rm -f $(DESTDIR)/usr/share/libreoffice/share/config/images_papirus.zip
17+
-rm -f $(DESTDIR)/usr/share/libreoffice/share/config/images_papirus_dark.zip
18+
-rm -f $(DESTDIR)/usr/lib/libreoffice/share/config/images_papirus.zip
19+
-rm -f $(DESTDIR)/usr/lib/libreoffice/share/config/images_papirus_dark.zip
820

9-
clear:
10-
$(RM) $(INSTALLDIR-ARCH)images_papirus{,_dark}.zip
11-
$(RM) $(INSTALLDIR-AUR)images_papirus{,_dark}.zip
12-
local:
21+
_get_version:
22+
$(eval DATE := $(shell git log -1 --format=%cd --date=format:%Y.%m.%d))
23+
$(eval COUNT := $(shell git rev-list --all --count))
24+
$(eval VERSION := $(DATE)-r$(COUNT))
1325

14-
find images_papirus{,_dark}.zip -type f -exec install -Dm644 '{}' "$(INSTALLDIR-ARCH){}" \;
15-
find images_papirus{,_dark}.zip -type f -exec install -Dm644 '{}' "$(INSTALLDIR-AUR){}" \;
26+
push:
27+
git push origin
1628

17-
uninstall: clear
29+
release: _get_version push
30+
git tag -f $(VERSION)
31+
git push origin --tags
32+
33+
undo_release: _get_version
34+
-git tag -d $(VERSION)
35+
-git push --delete origin $(VERSION)
36+
37+
38+
.PHONY: all install uninstall _get_version push release undo_release

0 commit comments

Comments
 (0)