diff options
author | louie <lshprung@yahoo.com> | 2021-07-25 19:40:59 -0700 |
---|---|---|
committer | louie <lshprung@yahoo.com> | 2021-07-25 19:40:59 -0700 |
commit | 2271ca8ff2d28203637f5801da48ea7478f4b43f (patch) | |
tree | 9f37ce9d72a2856e30a91ad0199dad76bcf232b5 | |
parent | 3f6f462ffbc06670e9f86bf57b22fadfc74736df (diff) |
Makefile can now install and uninstall linux desktop entry
-rw-r--r-- | Makefile | 23 | ||||
-rw-r--r-- | icon/tml.desktop | 9 |
2 files changed, 22 insertions, 10 deletions
@@ -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 diff --git a/icon/tml.desktop b/icon/tml.desktop deleted file mode 100644 index 0c3fb0c..0000000 --- a/icon/tml.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Type=Application -Name=tml -Comment=Terminal Media Launcher -Path=/usr/local/bin -Exec=tml -Icon=tml -Terminal=true -Categories=Utility |