|
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 |
4 | 2 |
|
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 |
6 | 14 |
|
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 |
8 | 20 |
|
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)) |
13 | 25 |
|
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 |
16 | 28 |
|
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