syncplay/Makefile

71 lines
2.1 KiB
Makefile
Raw Normal View History

SINGLE_USER = false
2012-10-12 16:37:12 +00:00
BASE_PATH = /usr
LOCAL_PATH = ~/.local
ifeq ($(SINGLE_USER),false)
BIN_PATH = $(BASE_PATH)/bin
LIB_PATH = $(BASE_PATH)/lib
APP_SHORTCUT_PATH = $(BASE_PATH)/share/applications
ICON_PATH = $(BASE_PATH)/share
else
BIN_PATH = $(LOCAL_PATH)/syncplay
LIB_PATH = $(LOCAL_PATH)/syncplay
APP_SHORTCUT_PATH = $(LOCAL_PATH)/share/applications
ICON_PATH = $(LOCAL_PATH)/share
endif
common:
-mkdir -p $(LIB_PATH)/syncplay/
cp -r syncplay $(LIB_PATH)/syncplay/
cp -r resources/hicolor $(ICON_PATH)/icons/
cp resources/hicolor/48x48/apps/syncplay.png $(ICON_PATH)/app-install/icons/
cp resources/hicolor/48x48/apps/syncplay.png $(ICON_PATH)/pixmaps/
u-common:
-rm -rf $(LIB_PATH)/syncplay
-rm $(ICON_PATH)/icons/hicolor/*/apps/syncplay.png
-rm $(ICON_PATH)/app-install/icons/syncplay.png
-rm $(ICON_PATH)/pixmaps/syncplay.png
client:
-mkdir -p $(BIN_PATH)
2012-10-12 16:37:12 +00:00
touch $(BIN_PATH)/syncplay
2013-01-01 14:00:30 +00:00
echo '#!/bin/sh\npython -OO $(LIB_PATH)/syncplay/syncplayClient.py "$$@"' > $(BIN_PATH)/syncplay
2012-10-12 16:37:12 +00:00
chmod a+x $(BIN_PATH)/syncplay
cp syncplayClient.py $(LIB_PATH)/syncplay/
2013-01-07 20:26:18 +00:00
-mkdir -p $(LIB_PATH)/syncplay/resources
cp resources/buzzer.wav $(LIB_PATH)/syncplay/resources/
cp resources/syncplay.desktop $(APP_SHORTCUT_PATH)/
u-client:
-rm $(BIN_PATH)/syncplay
-rm $(LIB_PATH)/syncplay/syncplayClient.py
2013-01-07 20:26:18 +00:00
-rm -rf $(LIB_PATH)/syncplay/resources
-rm $(APP_SHORTCUT_PATH)/syncplay.desktop
server:
-mkdir -p $(BIN_PATH)
2012-10-12 16:37:12 +00:00
touch $(BIN_PATH)/syncplay-server
2013-01-01 14:00:30 +00:00
echo '#!/bin/sh\npython -OO $(LIB_PATH)/syncplay/syncplayServer.py "$$@"' > $(BIN_PATH)/syncplay-server
2012-10-12 16:37:12 +00:00
chmod a+x $(BIN_PATH)/syncplay-server
cp syncplayServer.py $(LIB_PATH)/syncplay/
cp resources/syncplay-server.desktop $(APP_SHORTCUT_PATH)/
2012-10-12 16:37:12 +00:00
u-server:
-rm $(BIN_PATH)/syncplay-server
-rm $(LIB_PATH)/syncplay/syncplayServer.py
-rm $(APP_SHORTCUT_PATH)/syncplay-server.desktop
install-client: common client
uninstall-client: u-client u-common
install-server: common server
uninstall-server: u-server u-common
install-all: common client server
uninstall-all: u-client u-server u-common