summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2021-07-26 20:03:28 -0700
committerlouie <lshprung@yahoo.com>2021-07-26 20:03:28 -0700
commit9c83e979a825c8e469449f48531814fe8b2ef742 (patch)
tree8f183858bb77f1867b01bfa8bed2c2a4ad6466e6
parent53c848ccfcd99871b4c4544f9557c5f65dc24a0f (diff)
Safer desktop-entry install
-rw-r--r--.gitignore2
-rw-r--r--Makefile20
2 files changed, 11 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index ea6f7e5..e623a82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,7 @@
!docs
!docs/*
!icon
-!icon/*
+!icon/icon*
!include
!include/*.h
!unix
diff --git a/Makefile b/Makefile
index 6a47ac4..4441749 100644
--- a/Makefile
+++ b/Makefile
@@ -42,19 +42,19 @@ ifneq ($(OS),Windows_NT)
.PHONY: desktop-entry
desktop-entry:
+ echo "[Desktop Entry]" > icon/$(NAME).desktop
+ echo "Type=Application" >> icon/$(NAME).desktop
+ echo "Name=$(NAME)" >> icon/$(NAME).desktop
+ echo "Comment=Terminal Media Launcher" >> icon/$(NAME).desktop
+ echo "Path=$(DESTDIR)$(PREFIX)/bin" >> icon/$(NAME).desktop
+ echo "Exec=$(NAME)" >> icon/$(NAME).desktop
+ echo "Icon=$(NAME)" >> icon/$(NAME).desktop
+ echo "Terminal=true" >> icon/$(NAME).desktop
+ echo "Categories=Utility" >> icon/$(NAME).desktop
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
+ desktop-file-install --dir=$(DESTDIR)$(PREFIX)/share/applications icon/$(NAME).desktop
update-desktop-database $(DESTDIR)$(PREFIX)/share/applications
.PHONY: install