summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 22 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7518cd4..823f8fc 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,23 @@ clean:
ifneq ($(OS),Windows_NT)
+.PHONY: desktop-entry
+desktop-entry:
+ mkdir -p $(DESTDIR)$(PREFIX)/share/applications
+ echo "[Desktop Entry]" > $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ echo "Type=Application" >> $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ echo "Name=$(NAME)" >> $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ echo "Comment=Terminal Media Launcher" >> $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ echo "Path=$(DESTDIR)$(PREFIX)/bin" >> $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ echo "Exec=$(NAME)" >> $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ echo "Icon=$(NAME)" >> $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ echo "Terminal=true" >> $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ echo "Categories=Utility" >> $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps
+ cp -i icon/icon.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/tml.svg
+ desktop-file-install --dir=$(DESTDIR)$(PREFIX)/share/applications $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ update-desktop-database $(DESTDIR)$(PREFIX)/share/applications
+
.PHONY: install
install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
@@ -49,10 +66,14 @@ install:
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man5
cp -i docs/$(NAME)-config.5.gz $(DESTDIR)$(PREFIX)/share/man/man5/$(NAME)-config.5.gz
-.PHONY: install
+.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(NAME)
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/$(NAME).1.gz
rm -f $(DESTDIR)$(PREFIX)/share/man/man5/$(NAME)-config.5.gz
+ rm -f $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ rm -f $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
+ rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/$(NAME).svg
+ update-desktop-database $(DESTDIR)$(PREFIX)/share/applications
endif