This repository has been archived by the owner on Oct 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release for 9th April 2016 (9/5/16) -brings forward a release creation tool, and removal of debug tool.
- Loading branch information
1 parent
9ec811a
commit e5c1515
Showing
5 changed files
with
75 additions
and
36 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/sh | ||
_DIR="$(dirname $(readlink -f $0))" | ||
|
||
_ELECTRON="https://github.com/electron/electron/releases/download/v0.37.0/electron-v0.37.0-linux-ia32.zip" | ||
_APP="spotifywebplayer" | ||
_NAME="Spotify Web Player" | ||
_EXEC="/usr/bin/$_APP/lib/electron/electron ." | ||
_PATH="/usr/bin/$_APP" | ||
_ICON="spotify-web-player" | ||
_VERSION="0.5.9" | ||
_AUTHOR="Matthew James" | ||
_EMAIL="[email protected]" | ||
_DESCRIPTION="Music for every moment. Spotify is a digital music service that gives you access to millions of songs." | ||
_DEPS="libappindicator, wget, unzip" | ||
_DESKTOP_EXTRAS=" | ||
Actions=Play;Pause;Next;Previous; | ||
[Desktop Action Play] | ||
Name=Play/Pause | ||
Exec=dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotifywebplayer /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause | ||
[Desktop Action Next] | ||
Name=Next | ||
Exec=dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotifywebplayer /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next | ||
[Desktop Action Previous] | ||
Name=Previous | ||
Exec=dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotifywebplayer /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous | ||
" | ||
|
||
_RELEASE_DIR="$_DIR/release/$_APP" | ||
_BIN="$_RELEASE_DIR/usr/bin/$_APP" | ||
_SHARE="$_RELEASE_DIR/usr/share" | ||
_PIXMAPS="$_SHARE/pixmaps" | ||
_APPLICATIONS="$_SHARE/applications" | ||
|
||
#Make all directories for release | ||
mkdir -p $_RELEASE_DIR $_PIXMAPS $_BIN $_APPLICATIONS $_RELEASE_DIR/DEBIAN | ||
|
||
#Copy spotify icon to pixbufs | ||
cp "$_DIR/spotify-large-transparent.png" "$_PIXMAPS/$_ICON.png" | ||
|
||
#Copy all code to /usr/bin/spotifywebplayer | ||
cp -R $(ls $DIR | grep -v '^release$') $_BIN/ | ||
|
||
#Remove the lib folder | ||
rm -rf $_BIN/lib | ||
|
||
#Make a new .desktop file into applications | ||
echo "[Desktop Entry]\nVersion=$_VERSION\nName=$_NAME\nComment=$_DESCRIPTION\nExec=$_EXEC\nPath=$_PATH\nIcon=$_ICON\nTerminal=false\nType=Application\nCategories=GNOME;GTK;AudioVideo;Audio;Player;\n$_DESKTOP_EXTRAS" > $_APPLICATIONS/$_APP.desktop | ||
|
||
#Make .desktop file executable | ||
chmod +x $_APPLICATIONS/$_APP.desktop | ||
|
||
#Make the Debian package control file | ||
_INSTALL_SIZE=$(du -s $_BIN | grep -o "^[0-9]\+") | ||
echo "Package: $_APP\nVersion: $_VERSION\nSection: base\nPriority: optional\nArchitecture: i386\nInstalled-Size: $_INSTALL_SIZE\nMaintainer: $_AUTHOR <$_EMAIL>\nDescription: $_DESCRIPTION\n" > $_RELEASE_DIR/DEBIAN/control | ||
|
||
#Make the Debian post installation script | ||
echo "#!/bin/bash\nDIR=$_PATH/lib/electron/\nmkdir -p \$DIR\nTMPFILE='mktemp'\nPWD='pwd'\nwget '$_ELECTRON' -O \$TMPFILE\nunzip \$TMPFILE -d \$DIR\nrm \$TMPFILE" > $_RELEASE_DIR/DEBIAN/postinst | ||
|
||
#Make the Debian post installation script | ||
echo "#!/bin/bash\nkillall spotifywebplayer\nrm -rf /usr/bin/spotifywebplayer/lib" > $_RELEASE_DIR/DEBIAN/prerm | ||
|
||
|
||
#Set permissions for the release | ||
chmod 0755 $_RELEASE_DIR/DEBIAN/postinst | ||
chmod 0755 $_RELEASE_DIR/DEBIAN/prerm | ||
chmod 0644 $_RELEASE_DIR/DEBIAN/control | ||
|
||
#Build the debian package | ||
fakeroot dpkg-deb --build $_RELEASE_DIR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.