Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


snapcraft.yaml at [d9a4e95fc9]

File dev/snapcraft.yaml artifact 131ff637c3 part of check-in d9a4e95fc9


# Terrible idea. Snap isn't very fit to harbour python desktop apps.
# Bloats up the whole package to 65MB (from 450K). The pyz→zip roundtrip
# is also fairly redundant.

name: streamtuner2
version: 2.2.1+2020-05
summary: Directory browser for internet radio, audio and video streams
description: |
 Streamtuner2 is a GUI for browsing internet radio directories,
 music collections, and video services - grouped by genres or
 categories. It runs your preferred audio player or streamripper
 for recording.
 |
 This SNAP package is just for testing. The DEB or PYZ are significantly
 smaller and faster to install.
icon: ./icon.png
grade: stable
base: core18
confinement: strict

parts:

  # pull in python2 + libs
  python:
    plugin: python
    python-version: python2
    python-packages: [requests,pyquery,lxml,six,urllib3,pillow]
    after: [desktop-gtk2]
    stage-packages:
      - python-gtk2

  # use prepared pyz in zip
  st2:
    plugin: dump
    source: snapcraft.zip
    source-type: zip

  # https://forum.snapcraft.io/t/gtk2-applications/13508
  #
  # This part installs the `desktop-launch` script which initialises desktop
  # features such as fonts, themes and the XDG environment. It also installs
  # the GTK2 runtime libraries.
  #
  # It is copied straight from the snapcraft desktop helpers project. Please
  # periodically check the source for updates and copy the changes.
  #    https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/snapcraft.yaml
  #
  desktop-gtk2:
    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
    source-subdir: gtk
    plugin: make
    make-parameters: ["FLAVOR=gtk2"]
    build-packages:
      - build-essential
      - libgtk2.0-dev
    stage-packages:
      - libxkbcommon0  # XKB_CONFIG_ROOT
      - ttf-ubuntu-font-family
      - dmz-cursor-theme
      - light-themes
      - adwaita-icon-theme
      - gnome-themes-standard
      - shared-mime-info
      - libgtk2.0-0
      - libgdk-pixbuf2.0-0
      - libglib2.0-bin
      - libgtk2.0-bin
      - unity-gtk2-module
      - locales-all
      - libappindicator1
      - xdg-user-dirs
      - ibus-gtk
      - libibus-1.0-5

apps:
  pyz:
    command: desktop-launch $SNAP/streamtuner2.pyz
    plugs:
    - x11
    - home
    - network
    - desktop # needed for a lot of gtk3 and glib interaction with the host system
    - desktop-legacy # needed for accessibility tools IIRC

plugs:
  gtk-2-engines:
    interface: content
    target: $SNAP/lib/gtk-2.0
    default-provider: gtk2-common-themes
  gtk-2-themes:
    interface: content
    target: $SNAP/data-dir/themes
    default-provider: gtk-common-themes
  icon-themes:
    interface: content
    target: $SNAP/data-dir/icons
    default-provider: gtk-common-themes
  sound-themes:
    interface: content
    target: $SNAP/data-dir/sounds
    default-provider: gtk-common-themes