1
0
mirror of https://github.com/pgrondek/config.git synced 2024-11-27 06:04:23 +00:00
config/i3/playerctl.mk

23 lines
609 B
Makefile
Raw Permalink Normal View History

PACKAGE_PLAYERCTL=playerctl
2019-11-19 08:53:28 +00:00
GITHUB_VERSION=2.0.2
GITHUB_URL=https://github.com/altdesktop/playerctl/releases/download/v$(GITHUB_VERSION)/playerctl-$(GITHUB_VERSION)_amd64.deb
BIN=/usr/bin/playerctl
ROOT_APT=sudo aptitude
install_playerctl: $(BIN)
$(BIN):
ifeq ($(shell aptitude search $(PACKAGE_PLAYERCTL) 2&> /dev/null; echo $?), 0)
$(ROOT_APT) install $(PACKAGE_PLAYERCTL)
2019-11-19 08:53:28 +00:00
else
$(eval TMP = $(shell mktemp -d))
curl -fsSL $(GITHUB_URL) -o $(TMP)/playerctl.deb
chmod -R a+rx $(TMP)
sudo apt install $(TMP)/playerctl.deb
rm -rf $(TMP)
endif
clean_playerctl:
$(ROOT_APT) remove $(PACKAGE_PLAYERCTL)