title: How to build SNAP package from Qt project
body: <p>It's my first time then I build a program into the SNAP package. I want to make my program more accessible.
  The build is going without problems.
  But libqtnetwor5 not see a couple needed libraries. Right here below you can see description of all logs and configurations.</p>
  
  <p>The project tree:</p>
  
  <pre><code>tree
  .
  ├── bin
  │   └── ProjectTimer
  ├── setup
  │   └── gui
  │       └── icon.png
  ├── snapcraft.yaml
  └── timerproject_1.0_amd64.snap
  
  3 directories, 4 files
  </code></pre>
  
  <p>snapcraft.yaml</p>
  
  <pre><code>name: timerproject
  version: "1.0"
  summary: timer
  description: |
      Application for time-management
  confinement: strict
  architectures: [amd64]
  
  apps:
      timerproject:
          command: desktop-launch ProjectTimer
          plugs: ['home', 'unity7', 'x11', 'network']
  
  parts:
      timerproject:
          plugin: copy
          files:
              bin/ProjectTimer : usr/bin/ProjectTimer
              setup/gui/icon.png : usr/share/icons/timer.ico
  
      integration:
          plugin: nil
          stage-packages:
              - libc-bin
              - libqt5network5
          after: [desktop/qt5]
  </code></pre>
  
  <p>ldd ProjectTimer shows all libreries that the program need:</p>
  
  <pre><code>ldd bin/ProjectTimer
      linux-vdso.so.1 =&gt;  (0x00007fff1f1fc000)
      libQt5QuickControls2.so.5 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5QuickControls2.so.5 (0x00007f5d2ad62000)
      libQt5Quick.so.5 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Quick.so.5 (0x00007f5d2a772000)
      libQt5Widgets.so.5 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Widgets.so.5 (0x00007f5d29f22000)
      libQt5Gui.so.5 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Gui.so.5 (0x00007f5d2977a000)
      libQt5Qml.so.5 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Qml.so.5 (0x00007f5d2917a000)
      libQt5Core.so.5 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Core.so.5 (0x00007f5d28a5a000)
      libstdc++.so.6 =&gt; /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5d286b2000)
      libgcc_s.so.1 =&gt; /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5d2849a000)
      libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5d280ca000)
      libQt5Network.so.5 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Network.so.5 (0x00007f5d27d6a000)
      libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5d27b4a000)
      libQt5QuickTemplates2.so.5 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5QuickTemplates2.so.5 (0x00007f5d27882000)
      libGL.so.1 =&gt; /usr/lib/nvidia-361/libGL.so.1 (0x00007f5d275f2000)
      libm.so.6 =&gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5d272e2000)
      libz.so.1 =&gt; /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5d270c2000)
      librt.so.1 =&gt; /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5d26eba000)
      /lib64/ld-linux-x86-64.so.2 (0x0000562df3108000)
      libicui18n.so.56 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libicui18n.so.56 (0x00007f5d26a1a000)
      libicuuc.so.56 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libicuuc.so.56 (0x00007f5d26662000)
      libicudata.so.56 =&gt; /media/free/Qt5.7.0/5.7/gcc_64/lib/libicudata.so.56 (0x00007f5d24c7a000)
      libdl.so.2 =&gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5d24a72000)
      libgthread-2.0.so.0 =&gt; /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f5d2486a000)
      libglib-2.0.so.0 =&gt; /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f5d24552000)
      libGLX.so.0 =&gt; /usr/lib/nvidia-361/libGLX.so.0 (0x00007f5d2431a000)
      libGLdispatch.so.0 =&gt; /usr/lib/nvidia-361/libGLdispatch.so.0 (0x00007f5d24032000)
      libpcre.so.3 =&gt; /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f5d23dc2000)
      libX11.so.6 =&gt; /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f5d23a82000)
      libXext.so.6 =&gt; /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f5d2386a000)
      libxcb.so.1 =&gt; /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f5d23642000)
      libXau.so.6 =&gt; /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f5d2343a000)
      libXdmcp.so.6 =&gt; /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f5d23232000)
  </code></pre>
  
  <p>If I start to program, I see message:
      timerproject
      ProjectTimer: /snap/timerproject/x1/usr/lib/x86_64-linux-gnu/libQt5Network.so.5: version <code>Qt_5' not found 
          (required by /snap/timerproject/x1/media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Quick.so.5)
      ProjectTimer: /snap/timerproject/x1/usr/lib/x86_64-linux-gnu/libQt5Network.so.5: version</code>Qt_5' not found 
          (required by /snap/timerproject/x1/media/free/Qt5.7.0/5.7/gcc_64/lib/libQt5Qml.so.5)</p>
  
  <p>This is libraries for SNAP package:</p>
  
  <pre><code>ls -l /snap/timerproject/x1/media/free/Qt5.7.0/5.7/gcc_64/lib
  
  -rwxr-xr-x 1 root root 25047100 янв 28  2016 libicudata.so.56
  -rwxr-xr-x 1 root root  3374854 янв 28  2016 libicui18n.so.56
  -rwxr-xr-x 1 root root  2070162 янв 28  2016 libicuuc.so.56
  -rwxr-xr-x 1 root root  5339752 июл 30 16:45 libQt5Core.so.5
  -rwxr-xr-x 1 root root  5909528 июн 10 12:10 libQt5Gui.so.5
  -rwxr-xr-x 1 root root  4156520 июн 11 17:18 libQt5Qml.so.5
  -rwxr-xr-x 1 root root    78696 июн 13 00:46 libQt5QuickControls2.so.5
  -rwxr-xr-x 1 root root  4125768 июн 11 17:18 libQt5Quick.so.5
  -rwxr-xr-x 1 root root   807600 июн 13 00:46 libQt5QuickTemplates2.so.5
  -rwxr-xr-x 1 root root  6614408 июн 10 12:10 libQt5Widgets.so.5
  </code></pre>
  
  <p>My system have in standard libraries Qt:</p>
  
  <pre><code>ls -l /usr/lib/x86_64-linux-gnu/libQt5*
  -rw-r--r-- 1 root root     1014 май  2 15:37 /usr/lib/x86_64-linux-gnu/libQt5Core.prl
  lrwxrwxrwx 1 root root       19 май  2 15:39 /usr/lib/x86_64-linux-gnu/libQt5Core.so -&gt; libQt5Core.so.5.5.1
  lrwxrwxrwx 1 root root       19 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 -&gt; libQt5Core.so.5.5.1
  lrwxrwxrwx 1 root root       19 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5 -&gt; libQt5Core.so.5.5.1
  -rw-r--r-- 1 root root  5052920 май  2 15:41 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1
  -rw-r--r-- 1 root root     1008 май  2 15:37 /usr/lib/x86_64-linux-gnu/libQt5DBus.prl
  lrwxrwxrwx 1 root root       19 май  2 15:39 /usr/lib/x86_64-linux-gnu/libQt5DBus.so -&gt; libQt5DBus.so.5.5.1
  lrwxrwxrwx 1 root root       19 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 -&gt; libQt5DBus.so.5.5.1
  lrwxrwxrwx 1 root root       19 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.5 -&gt; libQt5DBus.so.5.5.1
  -rw-r--r-- 1 root root   509456 май  2 15:41 /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.5.1
  lrwxrwxrwx 1 root root       23 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Feedback.so.5 -&gt; libQt5Feedback.so.5.0.0
  lrwxrwxrwx 1 root root       23 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Feedback.so.5.0 -&gt; libQt5Feedback.so.5.0.0
  -rw-r--r-- 1 root root    52144 мар 14 14:20 /usr/lib/x86_64-linux-gnu/libQt5Feedback.so.5.0.0
  -rw-r--r-- 1 root root     1039 май  2 15:37 /usr/lib/x86_64-linux-gnu/libQt5Gui.prl
  lrwxrwxrwx 1 root root       18 май  2 15:39 /usr/lib/x86_64-linux-gnu/libQt5Gui.so -&gt; libQt5Gui.so.5.5.1
  lrwxrwxrwx 1 root root       18 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 -&gt; libQt5Gui.so.5.5.1
  lrwxrwxrwx 1 root root       18 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.5 -&gt; libQt5Gui.so.5.5.1
  -rw-r--r-- 1 root root  5514016 май  2 15:41 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.5.1
  -rw-r--r-- 1 root root     1002 май  2 15:37 /usr/lib/x86_64-linux-gnu/libQt5Network.prl
  lrwxrwxrwx 1 root root       22 май  2 15:39 /usr/lib/x86_64-linux-gnu/libQt5Network.so -&gt; libQt5Network.so.5.5.1
  lrwxrwxrwx 1 root root       22 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Network.so.5 -&gt; libQt5Network.so.5.5.1
  lrwxrwxrwx 1 root root       22 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Network.so.5.5 -&gt; libQt5Network.so.5.5.1
  -rw-r--r-- 1 root root  1412480 май  2 15:41 /usr/lib/x86_64-linux-gnu/libQt5Network.so.5.5.1
  -rw-r--r-- 1 root root  1266500 май  2 15:41 /usr/lib/x86_64-linux-gnu/libQt5OpenGLExtensions.a
  -rw-r--r-- 1 root root     1056 май  2 15:37 /usr/lib/x86_64-linux-gnu/libQt5OpenGLExtensions.prl
  lrwxrwxrwx 1 root root       21 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5 -&gt; libQt5OpenGL.so.5.5.1
  lrwxrwxrwx 1 root root       21 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5.5 -&gt; libQt5OpenGL.so.5.5.1
  -rw-r--r-- 1 root root   362752 май  2 15:41 /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5.5.1
  lrwxrwxrwx 1 root root       18 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 -&gt; libQt5Qml.so.5.5.1
  lrwxrwxrwx 1 root root       18 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.5 -&gt; libQt5Qml.so.5.5.1
  -rw-r--r-- 1 root root  4358744 апр 12 13:00 /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.5.1
  lrwxrwxrwx 1 root root       20 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5 -&gt; libQt5Quick.so.5.5.1
  lrwxrwxrwx 1 root root       20 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.5 -&gt; libQt5Quick.so.5.5.1
  -rw-r--r-- 1 root root  3991248 апр 12 13:00 /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.5.1
  lrwxrwxrwx 1 root root       24 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so.5 -&gt; libQt5QuickTest.so.5.5.1
  lrwxrwxrwx 1 root root       24 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so.5.5 -&gt; libQt5QuickTest.so.5.5.1
  -rw-r--r-- 1 root root   119232 апр 12 13:00 /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so.5.5.1
  lrwxrwxrwx 1 root root       21 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5WebKit.so.5 -&gt; libQt5WebKit.so.5.5.1
  lrwxrwxrwx 1 root root       21 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5WebKit.so.5.5 -&gt; libQt5WebKit.so.5.5.1
  -rw-r--r-- 1 root root 37857816 ноя 30  2015 /usr/lib/x86_64-linux-gnu/libQt5WebKit.so.5.5.1
  lrwxrwxrwx 1 root root       28 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5 -&gt; libQt5WebKitWidgets.so.5.5.1
  lrwxrwxrwx 1 root root       28 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5.5 -&gt; libQt5WebKitWidgets.so.5.5.1
  -rw-r--r-- 1 root root   282016 ноя 30  2015 /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5.5.1
  -rw-r--r-- 1 root root     1059 май  2 15:37 /usr/lib/x86_64-linux-gnu/libQt5Widgets.prl
  lrwxrwxrwx 1 root root       22 май  2 15:39 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so -&gt; libQt5Widgets.so.5.5.1
  lrwxrwxrwx 1 root root       22 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 -&gt; libQt5Widgets.so.5.5.1
  lrwxrwxrwx 1 root root       22 июл 29 22:58 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5 -&gt; libQt5Widgets.so.5.5.1
  -rw-r--r-- 1 root root  6861328 май  2 15:41 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1
  </code></pre>
  
  <p>Maybe someone can understand where is the error? Or maybe someone can tell me how better to deal with libraries (my project not used a system libraries)
  And last question, but not least does someone know how to build Qt projects like this? </p>