Installation

Debian/Ubuntu packages

Note

For the latest installation information, please visit the README.md file on GitHub.

Debian/Ubuntu packages are available from Bintray for the following distro/arch combinations:

Note

Elementary OS and Linux Mint are supported on releases based on Ubuntu ‘Trusty’ or Ubuntu ‘Xenial’.

Installing the latest release

To conveniently install the latest release of the Debian packages, and all their dependencies, use the install.sh script:

$ curl -kL https://github.com/tizonia/tizonia-openmax-il/raw/master/tools/install.sh | bash
# or it's shortened version
$ curl -L -O https://goo.gl/Vu8qGR && chmod +x Vu8qGR && ./Vu8qGR

Note

The install.sh script is hosted on GitHub, and displayed here for clarity:

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/bin/bash
#
# Copyright (C) 2011-2017 Aratelia Limited - Juan A. Rubio
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

#
# Script that installs Tizonia's debian packages and their dependencies.
#

# Run the install actions in a subshell
(
RELIDS=$(cat /etc/*-release)
if echo "$RELIDS" | grep raspbian; then
    DISTRO="raspbian"
    if echo "$RELIDS" | grep stretch; then
        RELEASE="stretch"
    elif echo "$RELIDS" | grep jessie; then
        RELEASE="jessie"
    else
        echo "Can't find a supported Raspbian distribution."
        exit 1
    fi
elif echo "$RELIDS" | grep jessie; then
  DISTRO="debian" ; RELEASE="jessie"
elif echo "$RELIDS" | grep stretch; then
  DISTRO="debian" ; RELEASE="stretch"
elif echo "$RELIDS" | grep -E 'trusty|freya|qiana|rebecca|rafaela|rosa|sarah'; then
  # NOTE: Elementary OS 'freya' is based on trusty
  # NOTE: LinuxMint 'qiana' 'rebecca' 'rafaela' 'rosa' 'sarah' are all based on trusty
  DISTRO="ubuntu" ; RELEASE="trusty"
elif echo "$RELIDS" | grep vivid; then
  DISTRO="ubuntu" ; RELEASE="vivid"
elif echo "$RELIDS" | grep -E 'xenial|loki|sarah|serena'; then
  # NOTE: Elementary OS 'loki' is based on xenial
  # Linux Mint 'sarah' and 'serena' are based on xenial
  DISTRO="ubuntu" ; RELEASE="xenial"
else
  echo "Can't find a supported Debian or Ubuntu-based distribution."
  exit 1
fi

# Let's make sure these packages are already installed before trying to install anything else.
sudo apt-get -y --force-yes install python-dev curl apt-transport-https libffi-dev libssl-dev

# Add Mopidy's archive to APT's sources.list (required to install 'libspotify')
grep -q "apt.mopidy.com" /etc/apt/sources.list
if [[ "$?" -eq 1 ]]; then
    curl 'http://apt.mopidy.com/mopidy.gpg' | sudo apt-key add -
    echo "deb http://apt.mopidy.com/ stable main contrib non-free" | sudo tee -a /etc/apt/sources.list
fi

# Add Tizonia's archive to APT's sources.list
grep -q "dl.bintray.com/tizonia" /etc/apt/sources.list
if [[ "$?" -eq 1 ]]; then
    curl -k 'https://bintray.com/user/downloadSubjectPublicKey?username=tizonia' | sudo apt-key add -
    echo "deb https://dl.bintray.com/tizonia/$DISTRO $RELEASE main" | sudo tee -a /etc/apt/sources.list
fi

# Resynchronize APT's package index files
sudo apt-get update

# Python dependencies.
sudo apt-get -y install python-pip \
    && sudo -H pip install --upgrade \
            gmusicapi \
            soundcloud \
            youtube-dl \
            pafy

# Install 'libspotify'
if [[ "$?" -eq 0 ]]; then
    sudo apt-get -y install libspotify12
fi

# Install Tizonia
if [[ "$?" -eq 0 ]]; then
    sudo apt-get -y install tizonia-all
fi

# Copy Tizonia's config file to the user's config directory
if [[ "$?" -eq 0 ]]; then
    TIZ_CONFIG_DIR="$HOME/.config/tizonia"
    TIZ_CONFIG_FILE="$TIZ_CONFIG_DIR/tizonia.conf"
    if [[ ! -e "$TIZ_CONFIG_FILE" ]]; then
        mkdir -p "$TIZ_CONFIG_DIR"
        cp /etc/tizonia/tizonia.conf "$TIZ_CONFIG_FILE"
    fi
fi

# Simple test to verify that everything went well
which tizonia > /dev/null
if [[ "$?" -eq 0 ]]; then
    echo ; tizonia ; echo
    printf "Tizonia is now installed.\n\n"
    printf "Please add Spotify, Google Music, Soundcloud, and Dirble credentials to : $TIZ_CONFIG_FILE\n"
else
    echo "Oops. Something went wrong!"
    exit 1
fi

) # end running in a subshell

Arch User Repository (AUR) packages

$ yaourt -S tizonia-all # for the latest released version
# or
$ yaourt -S tizonia-all-git # for the bleeding edge