ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #10335
[Merge] lp:~ahayzen/music-app/snap-devmode into lp:music-app
Andrew Hayzen has proposed merging lp:~ahayzen/music-app/snap-devmode into lp:music-app.
Commit message:
* Add snap packaging for the music-app to run in devmode (it assumes mediascanner is running on the host)
Requested reviews:
Music App Developers (music-app-dev)
For more details, see:
https://code.launchpad.net/~ahayzen/music-app/snap-devmode/+merge/321855
* Add snap packaging for the music-app to run in devmode (it assumes mediascanner is running on the host)
--
Your team Music App Developers is requested to review the proposed merge of lp:~ahayzen/music-app/snap-devmode into lp:music-app.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2015-12-03 19:38:49 +0000
+++ CMakeLists.txt 2017-04-04 13:11:56 +0000
@@ -40,6 +40,7 @@
music-app-content.json DESTINATION ${CMAKE_INSTALL_PREFIX})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}
DESTINATION ${DESKTOP_DIR})
+ install(FILES ${URLS_FILE} DESTINATION ${URLS_DIR})
else(CLICK_MODE)
set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})
set(EXEC ${APP_HARDCODE})
@@ -53,6 +54,7 @@
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}
DESTINATION ${DESKTOP_DIR} RENAME music-app.desktop)
install(FILES music-app-content.json DESTINATION ${CMAKE_INSTALL_DATADIR}/content-hub/peers/ RENAME music-app)
+ install(FILES ${URLS_FILE} DESTINATION ${URLS_DIR} RENAME music-app.url-dispatcher)
endif(CLICK_MODE)
file(GLOB_RECURSE I18N_SRC_FILES
@@ -76,8 +78,6 @@
COMMAND LC_ALL=C ${INTLTOOL_MERGE} -d -u ${CMAKE_SOURCE_DIR}/po ${DESKTOP_FILE}.in ${DESKTOP_FILE}
)
-install(FILES ${URLS_FILE} DESTINATION ${URLS_DIR})
-
# Tests
enable_testing()
=== added directory 'snap'
=== added directory 'snap/mir-libs'
=== added file 'snap/music-app.wrapper'
--- snap/music-app.wrapper 1970-01-01 00:00:00 +0000
+++ snap/music-app.wrapper 2017-04-04 13:11:56 +0000
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+SNAP_MEDIASCANNER_DIR=$SNAP_USER_DATA/.cache/mediascanner-2.0
+
+if [ ! -L $SNAP_MEDIASCANNER_DIR ]; then
+ rm -f $SNAP_MEDIASCANNER_DIR
+ ln -s /home/$USER/.cache/mediascanner-2.0 $SNAP_MEDIASCANNER_DIR
+fi
+
+export APP_ID=music-app
+
+exec qmlscene $SNAP/usr/share/music-app/app/music-app.qml --desktop_file_hint=unity8
=== added file 'snap/snapcraft.yaml'
--- snap/snapcraft.yaml 1970-01-01 00:00:00 +0000
+++ snap/snapcraft.yaml 2017-04-04 13:11:56 +0000
@@ -0,0 +1,76 @@
+name: music-app
+version: '2.5'
+summary: A music application for ubuntu
+description: |
+ A music application for ubuntu
+
+grade: devel # must be 'stable' to release into candidate/stable channels
+confinement: devmode
+
+apps:
+ music-app:
+ command: desktop-launch $SNAP/bin/music-app
+ desktop: usr/share/applications/music-app.desktop
+ plugs:
+ - home
+ - mir
+ - mir-libs
+ - mpris
+ - opengl
+ - pulseaudio
+ - unity7
+ - unity8
+
+plugs:
+ mir-libs:
+ interface: content
+ content: mir0
+ target: mir-libs
+ default-provider: mir-libs
+
+ platform:
+ interface: content
+ content: ubuntu-app-platform1
+ target: ubuntu-app-platform
+ default-provider: ubuntu-app-platform
+
+parts:
+ music-app:
+ plugin: cmake
+ source: .
+ configflags: [-DCMAKE_INSTALL_PREFIX=/usr, -DCLICK_MODE=off]
+ build-packages:
+ - cmake
+ - intltool
+ stage-packages:
+ - libgpm2 # otherwise we get errors in the console
+ # explicitly include the codecs for now
+ - gstreamer1.0-fluendo-mp3 # to play mp3's
+ - gstreamer1.0-plugins-bad-faad
+ - gstreamer1.0-pulseaudio # not in UAP, otherwise we try to use jack-server
+ prime:
+ - usr/bin/music-app
+ # allow the paths for the codecs
+ - usr/lib/*/libfaad*
+ - usr/lib/*/libgpm*
+ - usr/lib/*/libgst*
+ - usr/lib/*/gstreamer-1.0
+ - usr/share/applications/music-app.desktop
+ - usr/share/content-hub/peers/music-app
+ # - usr/share/locale # for now don't include locale as this doesn't work anyway?
+ - usr/share/music-app
+ - usr/share/url-dispatcher/urls/music-app.url-dispatcher
+
+ after: [desktop-ubuntu-app-platform]
+
+ environment:
+ source: snap/
+ plugin: dump
+ prime:
+ - bin
+ - mir-libs
+ - ubuntu-app-platform
+ organize:
+ music-app.wrapper: bin/music-app
+ after: [music-app]
+
=== added directory 'snap/ubuntu-app-platform'
Follow ups