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
i f n d e f V L C _ S U P P O R T
2014-02-21 19:22:43 +00:00
VLC_SUPPORT = true
2013-01-27 19:49:13 +00:00
e n d i f
2012-10-12 20:36:48 +00:00
i f e q ( $( SINGLE_USER ) , f a l s e )
2014-03-27 18:55:59 +00:00
BASE_PATH = /usr
2014-04-24 02:09:45 +00:00
VLC_LIB_PATH = ${ PREFIX } /usr/lib
2014-03-27 18:55:59 +00:00
e l s e
BASE_PATH = ${ HOME } /.local
VLC_LIB_PATH = ${ HOME } /.local/share
e n d i f
2013-12-18 06:33:39 +00:00
BIN_PATH = ${ PREFIX } $( BASE_PATH) /bin
LIB_PATH = ${ PREFIX } $( BASE_PATH) /lib
APP_SHORTCUT_PATH = ${ PREFIX } $( BASE_PATH) /share/applications
SHARE_PATH = ${ PREFIX } $( BASE_PATH) /share
2012-10-12 20:36:48 +00:00
common :
2013-06-01 19:17:16 +00:00
-mkdir -p $( LIB_PATH) /syncplay/resources/
2013-07-19 15:52:31 +00:00
-mkdir -p $( LIB_PATH) /syncplay/resources/lua
-mkdir -p $( LIB_PATH) /syncplay/resources/lua/intf
2013-12-18 06:33:39 +00:00
-mkdir -p $( APP_SHORTCUT_PATH)
-mkdir -p $( SHARE_PATH) /app-install/icons
-mkdir -p $( SHARE_PATH) /pixmaps/
2012-10-12 20:36:48 +00:00
cp -r syncplay $( LIB_PATH) /syncplay/
2013-11-07 21:35:11 +00:00
chmod 755 $( 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-07-19 10:41:24 +00:00
cp -r resources/lua/intf/*.lua $( LIB_PATH) /syncplay/resources/lua/intf/
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)
2013-12-18 06:33:39 +00:00
cp syncplayClient.py $( BIN_PATH) /syncplay
sed -i -e 's%# libpath%site.addsitedir\("$(BASE_PATH)/lib/syncplay"\)%' $( BIN_PATH) /syncplay
2013-11-07 21:35:11 +00:00
chmod 755 $( BIN_PATH) /syncplay
2012-10-12 20:36:48 +00:00
cp syncplayClient.py $( LIB_PATH) /syncplay/
cp resources/syncplay.desktop $( APP_SHORTCUT_PATH) /
2014-03-27 18:55:59 +00:00
i f e q ( $( SINGLE_USER ) , f a l s e )
chmod 755 $( APP_SHORTCUT_PATH) /syncplay.desktop
e n d i f
2013-01-27 19:49:13 +00:00
i f e q ( $( VLC_SUPPORT ) , t r u e )
2014-03-27 18:55:59 +00:00
-mkdir -p $( VLC_LIB_PATH) /vlc/lua/intf/
cp resources/lua/intf/syncplay.lua $( VLC_LIB_PATH) /vlc/lua/intf/
2013-01-27 19:49:13 +00:00
e n d i f
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
2014-03-27 18:55:59 +00:00
-rm $( VLC_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)
2013-12-18 06:33:39 +00:00
cp syncplayServer.py $( BIN_PATH) /syncplay-server
sed -i -e 's%# libpath%site.addsitedir\("$(BASE_PATH)/lib/syncplay"\)%' $( BIN_PATH) /syncplay-server
2013-11-07 21:35:11 +00:00
chmod 755 $( BIN_PATH) /syncplay-server
2012-10-12 16:37:12 +00:00
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
2014-03-27 18:55:59 +00:00
i f e q ( $( SINGLE_USER ) , f a l s e )
chmod 755 $( APP_SHORTCUT_PATH) /syncplay-server.desktop
e n d i f
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
2014-03-27 18:55:59 +00:00
warnings :
i f e q ( $( SINGLE_USER ) , t r u e )
@echo -e " \n**********\n**********\n \nRemeber to add ${ HOME } /.local/bin to your \$ $PATH with 'echo \"export PATH=\$ $PATH : ${ HOME } /.local/bin\" >> ${ HOME } /.profile' \nThis will take effect after you logoff.\n \n**********\n**********\n "
e n d i f
2012-10-12 20:36:48 +00:00
2014-03-27 18:55:59 +00:00
install-client : common client warnings
2012-10-12 20:36:48 +00:00
2014-03-27 18:55:59 +00:00
uninstall-client : u -client u -common
2012-10-12 20:36:48 +00:00
2014-03-27 18:55:59 +00:00
install-server : common server warnings
2012-10-12 20:36:48 +00:00
uninstall-server : u -server u -common
2014-03-27 18:55:59 +00:00
install : common client server warnings
2012-10-12 20:36:48 +00:00
2013-01-27 18:20:37 +00:00
uninstall : u -client u -server u -common