Install desktop file
parent
1f5454956d
commit
62f455baf8
6
Makefile
6
Makefile
|
@ -3,8 +3,10 @@ PREFIX = /usr/local
|
||||||
PROFILE ?= release
|
PROFILE ?= release
|
||||||
BINARY_PATH = target/$(PROFILE)/libspotifyadblock.so
|
BINARY_PATH = target/$(PROFILE)/libspotifyadblock.so
|
||||||
CONFIG_PATH = config.toml
|
CONFIG_PATH = config.toml
|
||||||
|
DESKTOP_PATH = spotify-adblock.desktop
|
||||||
BINARY_TARGET = $(DESTDIR)$(PREFIX)/lib/$(NAME).so
|
BINARY_TARGET = $(DESTDIR)$(PREFIX)/lib/$(NAME).so
|
||||||
CONFIG_TARGET = $(DESTDIR)/etc/$(NAME)/config.toml
|
CONFIG_TARGET = $(DESTDIR)/etc/$(NAME)/config.toml
|
||||||
|
DESKTOP_TARGET = $(DESTDIR)$(PREFIX)/share/applications/$(NAME).desktop
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: $(BINARY_PATH)
|
all: $(BINARY_PATH)
|
||||||
|
@ -22,11 +24,13 @@ clean:
|
||||||
rm -rf target
|
rm -rf target
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: $(BINARY_PATH) $(CONFIG_PATH)
|
install: $(BINARY_PATH) $(CONFIG_PATH) $(DESKTOP_PATH)
|
||||||
install -D --mode=644 --strip $(BINARY_PATH) $(BINARY_TARGET)
|
install -D --mode=644 --strip $(BINARY_PATH) $(BINARY_TARGET)
|
||||||
install -D --mode=644 $(CONFIG_PATH) $(CONFIG_TARGET)
|
install -D --mode=644 $(CONFIG_PATH) $(CONFIG_TARGET)
|
||||||
|
install -D --mode=644 $(DESKTOP_PATH) $(DESKTOP_TARGET)
|
||||||
|
|
||||||
.PHONY: uninstall
|
.PHONY: uninstall
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(BINARY_TARGET)
|
rm -f $(BINARY_TARGET)
|
||||||
rm -f $(CONFIG_TARGET)
|
rm -f $(CONFIG_TARGET)
|
||||||
|
rm -f $(DESKTOP_TARGET)
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Spotify Adblocked
|
||||||
|
GenericName=Music Player
|
||||||
|
Icon=spotify-client
|
||||||
|
TryExec=spotify
|
||||||
|
Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U
|
||||||
|
Terminal=false
|
||||||
|
MimeType=x-scheme-handler/spotify;
|
||||||
|
Categories=Audio;Music;Player;AudioVideo;
|
||||||
|
StartupWMClass=spotify
|
Loading…
Reference in New Issue