-
Notifications
You must be signed in to change notification settings - Fork 118
/
Makefile
47 lines (39 loc) · 1.71 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
all:
install:
mkdir -p "$(DESTDIR)/usr/bin"
install -m 755 bin/eve-ng-integration $(DESTDIR)/usr/bin/
install -m 755 bin/eni-rdp-wrapper $(DESTDIR)/usr/bin/
mkdir -p "$(DESTDIR)/usr/share/applications"
install -m 644 data/eve-ng-integration.desktop $(DESTDIR)/usr/share/applications/
install -m 644 data/eni-rdp-wrapper.desktop $(DESTDIR)/usr/share/applications/
mkdir -p "$(DESTDIR)/usr/share/mime/packages"
install -m 644 data/eni-rdp-wrapper.xml $(DESTDIR)/usr/share/mime/packages/
# skip post-install goal when packaging
$(if $(DESTDIR),,$(MAKE) post-install)
post-install:
# build cache database of MIME types handled by desktop files
update-desktop-database -q || true
# build the Shared MIME-Info database cache
update-mime-database -n /usr/share/mime || true
uninstall:
-rm -f $(DESTDIR)/usr/bin/eve-ng-integration
-rm -f $(DESTDIR)/usr/bin/eni-rdp-wrapper
-rm -f $(DESTDIR)/usr/share/applications/eve-ng-integration.desktop
-rm -f $(DESTDIR)/usr/share/applications/eni-rdp-wrapper.desktop
-rm -f $(DESTDIR)/usr/share/mime/packages/eni-rdp-wrapper.xml
defaults:
# setup as default handler for the next URL schemes (don't run it as root)
mkdir -p $(HOME)/.local/share/applications/
xdg-mime default eve-ng-integration.desktop x-scheme-handler/capture
xdg-mime default eve-ng-integration.desktop x-scheme-handler/telnet
xdg-mime default eve-ng-integration.desktop x-scheme-handler/docker
xdg-mime default eni-rdp-wrapper.desktop application/x-rdp
check_release:
ifndef TAG
$(error TAG is not defined. Pass via "make release TAG=v0.1.2")
endif
release: check_release
git tag -f $(TAG)
git push origin master
git push origin --tags
.PHONY: all install post-install uninstall defaults check_release release