1name: sayonara
2version: enter-version-here
3grade: stable
4summary: Small and lightweight music player.
5description: |
6  Sayonara is as a lightweight and fast library manager and music player.
7  It holds a lot of features like
8  Many supported music and playlist formats
9  Media library with search function
10  Directory view
11  External device support
12  Genre organization
13  Playlist view organized by tabs
14  (Dynamic) playback
15  Equalizer
16  Metadata editor (including tags from path)
17  Lyrics
18  Shutdown function
19  MP3 Converter
20  Customizable spectrum analyzer and level meter
21  Last.FM radio and scrobbling
22  Soundcloud support
23  Internet streams
24  Stream recorder
25  Podcasts
26  Radio Broadcasting
27  Multimedia key support
28  Desktop integration (DBus Mpris2 compatible)
29  2 skins
30confinement: strict
31base: core18
32
33apps:
34  sayonara:
35    adapter: full
36    command: usr/bin/sayonara
37    desktop: usr/share/applications/com.sayonara-player.Sayonara.desktop
38    extensions:
39      - kde-neon
40    plugs:
41      - audio-playback
42      - home
43      - network
44      - network-bind
45      - network-manager-observe
46      - opengl
47      - optical-drive
48      - removable-media
49      - unity7
50    slots:
51      - mpris
52    environment:
53      # Use XDG-PORTALS, icon theme and open/save file dialogs.
54      QT_QPA_PLATFORMTHEME: xdgdesktopportal
55
56layout:
57  /usr/share/sayonara:
58    bind: $SNAP/usr/share/sayonara
59
60parts:
61  sayonara:
62    source: https://gitlab.com/luciocarreras/sayonara-player.git
63    source-type: git
64    source-commit: enter-source-commit-here
65    plugin: cmake
66    configflags:
67      - -DCMAKE_BUILD_TYPE=Release
68      - -DCMAKE_INSTALL_PREFIX=/usr
69    override-build: |
70      snapcraftctl build
71      sed -i 's|Icon=sayonara|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/sayonara.png|g' $SNAPCRAFT_PART_INSTALL/usr/share/applications/com.sayonara-player.Sayonara.desktop
72    build-packages:
73      - cmake
74      - git
75      - libgstreamer-plugins-bad1.0-dev
76      - libgstreamer-plugins-base1.0-dev
77      - libgstreamer1.0-dev
78      - libtag1-dev
79      - pkg-config
80      - qtbase5-dev
81      - qttools5-dev
82      - qttools5-dev-tools
83      - libqt5svg5-dev
84      - zlib1g-dev
85    stage-packages:
86      - libgpm2 # requred by gstreamer autoaudiosink
87      - freeglut3
88      - gstreamer1.0-plugins-bad
89      - gstreamer1.0-plugins-good
90      - libgstreamer-plugins-bad1.0-0
91      - libgstreamer-plugins-good1.0-0
92      - libqt5sql5-sqlite
93      - libgcc1
94      - libglib2.0-0
95      - libgstreamer-plugins-base1.0-0
96      - libgstreamer1.0-0
97      - libqt5core5a
98      - libqt5dbus5
99      - libqt5network5
100      - libqt5sql5
101      - libqt5widgets5
102      - libqt5xml5
103      - libstdc++6
104      - zlib1g
105      - libslang2
106    plugin: cmake
107
108# This part removes all the files in this snap which already exist in
109# connected content and base snaps. Since these files will be available
110# at runtime from the content and base snaps, they do not need to be
111# included in this snap itself.
112#
113# More info: https://forum.snapcraft.io/t/reducing-the-size-of-desktop-snaps/17280#heading--cleanup-part
114#
115  cleanup:
116    after:  # Make this part run last; list all your other parts here
117      - sayonara
118    plugin: nil
119    build-snaps:  # List all content-snaps and base snaps you're using here
120      - core18
121      - gtk-common-themes
122      - kde-frameworks-5-core18
123    override-prime: |
124      set -eux
125      for snap in "core18" "gtk-common-themes" "kde-frameworks-5-core18"; do  # List all content-snaps and base snaps you're using here
126          cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" \;
127      done
128