2012-10-15 18:14:23 +00:00
|
|
|
SINGLE_USER = false
|
2012-10-12 16:37:12 +00:00
|
|
|
|
2013-01-27 19:49:13 +00:00
|
|
|
ifndef VLC_SUPPORT
|
|
|
|
VLC_SUPPORT = false
|
|
|
|
endif
|
|
|
|
|
2012-10-12 20:36:48 +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
|
2013-01-27 18:20:04 +00:00
|
|
|
SHARE_PATH = $(BASE_PATH)/share
|
2012-10-12 20:36:48 +00:00
|
|
|
else
|
|
|
|
BIN_PATH = $(LOCAL_PATH)/syncplay
|
|
|
|
LIB_PATH = $(LOCAL_PATH)/syncplay
|
|
|
|
APP_SHORTCUT_PATH = $(LOCAL_PATH)/share/applications
|
2013-01-27 18:20:04 +00:00
|
|
|
SHARE_PATH = $(LOCAL_PATH)/share
|
2012-10-12 20:36:48 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
common:
|
2013-06-01 19:17:16 +00:00
|
|
|
-mkdir -p $(LIB_PATH)/syncplay/resources/
|
2012-10-12 20:36:48 +00:00
|
|
|
cp -r syncplay $(LIB_PATH)/syncplay/
|
2013-01-27 18:02:43 +00:00
|
|
|
cp -r resources/hicolor $(SHARE_PATH)/icons/
|
2013-06-01 19:17:16 +00:00
|
|
|
cp -r resources/*.png $(LIB_PATH)/syncplay/resources/
|
2013-01-27 18:02:43 +00:00
|
|
|
cp resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/app-install/icons/
|
|
|
|
cp resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/pixmaps/
|
2012-10-12 20:36:48 +00:00
|
|
|
|
|
|
|
u-common:
|
2012-12-31 21:24:43 +00:00
|
|
|
-rm -rf $(LIB_PATH)/syncplay
|
2013-01-27 18:02:43 +00:00
|
|
|
-rm $(SHARE_PATH)/icons/hicolor/*/apps/syncplay.png
|
|
|
|
-rm $(SHARE_PATH)/app-install/icons/syncplay.png
|
|
|
|
-rm $(SHARE_PATH)/pixmaps/syncplay.png
|
2012-10-12 20:36:48 +00:00
|
|
|
|
|
|
|
client:
|
2012-12-31 21:24:43 +00:00
|
|
|
-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
|
2012-10-12 20:36:48 +00:00
|
|
|
cp syncplayClient.py $(LIB_PATH)/syncplay/
|
|
|
|
cp resources/syncplay.desktop $(APP_SHORTCUT_PATH)/
|
2013-01-27 19:49:13 +00:00
|
|
|
|
|
|
|
ifeq ($(VLC_SUPPORT),true)
|
|
|
|
-mkdir -p $(LIB_PATH)/vlc/lua/intf/
|
|
|
|
cp resources/syncplay.lua $(LIB_PATH)/vlc/lua/intf/
|
|
|
|
endif
|
2012-10-12 20:36:48 +00:00
|
|
|
|
|
|
|
u-client:
|
2012-12-31 21:24:43 +00:00
|
|
|
-rm $(BIN_PATH)/syncplay
|
|
|
|
-rm $(LIB_PATH)/syncplay/syncplayClient.py
|
2013-01-27 19:49:13 +00:00
|
|
|
-rm $(LIB_PATH)/vlc/lua/intf/syncplay.lua
|
2012-12-31 21:24:43 +00:00
|
|
|
-rm $(APP_SHORTCUT_PATH)/syncplay.desktop
|
2012-10-12 20:36:48 +00:00
|
|
|
|
|
|
|
server:
|
2012-12-31 21:24:43 +00:00
|
|
|
-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/
|
2012-10-12 20:36:48 +00:00
|
|
|
cp resources/syncplay-server.desktop $(APP_SHORTCUT_PATH)/
|
2012-10-12 16:37:12 +00:00
|
|
|
|
2012-10-12 20:36:48 +00:00
|
|
|
u-server:
|
2012-12-31 21:24:43 +00:00
|
|
|
-rm $(BIN_PATH)/syncplay-server
|
|
|
|
-rm $(LIB_PATH)/syncplay/syncplayServer.py
|
|
|
|
-rm $(APP_SHORTCUT_PATH)/syncplay-server.desktop
|
2012-10-12 20:36:48 +00:00
|
|
|
|
|
|
|
install-client: common client
|
|
|
|
|
|
|
|
uninstall-client: u-client u-common
|
|
|
|
|
|
|
|
install-server: common server
|
|
|
|
|
|
|
|
uninstall-server: u-server u-common
|
|
|
|
|
2013-01-27 18:20:37 +00:00
|
|
|
install: common client server
|
2012-10-12 20:36:48 +00:00
|
|
|
|
2013-01-27 18:20:37 +00:00
|
|
|
uninstall: u-client u-server u-common
|