qt: playlist: use item title if available
[vlc.git] / extras / package / snap / snapcraft.yaml
1 name: vlc
2 version-script: cat $SNAPCRAFT_STAGE/version
3 version: "daily"
4 grade: stable
5 base: core18
6 summary: Read, capture, broadcast your multimedia streams
7 description: |
8   VLC is a free and open source cross-platform multimedia player and
9   framework that plays most multimedia files as well as DVDs, Audio CDs,
10   VCDs, and various streaming protocols.
11   NOTE. This snap contains an untested daily build of VLC
12 confinement: strict
13
14 apps:
15   vlc:
16     desktop: usr/share/applications/vlc.desktop
17     command: desktop-launch $SNAP/bin/vlc-snap-wrapper.sh
18     common-id: org.videolan.vlc
19     plugs:
20       - unity7
21       - network
22       - network-bind
23       - home
24       - opengl
25       - pulseaudio
26       - mount-observe
27       - optical-drive
28       - camera
29       - removable-media
30       - screen-inhibit-control
31       - x11
32       - desktop
33       - desktop-legacy
34       - dvb
35       - audio-playback
36       - audio-record
37       - jack1
38       - avahi-control
39     slots:
40       - mpris
41
42 parts:
43   desktop-qt5-vlc:
44     source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
45     source-commit: 622e2aa7a840b3a7dbb6ea4d432d687d5cc2e8ef
46     source-subdir: qt/
47     plugin: make
48     make-parameters: ["FLAVOR=qt5"]
49     build-packages:
50       - qtbase5-dev
51       - dpkg-dev
52     stage-packages:
53       - libxkbcommon0
54       - ttf-ubuntu-font-family
55       - dmz-cursor-theme
56       - light-themes
57       - shared-mime-info
58       - libqt5gui5
59       - libgdk-pixbuf2.0-0
60       - libqt5svg5
61       - locales-all
62   vlc:
63     after: [desktop-qt5-vlc]
64     source: ../../../
65     source-type: git
66     plugin: autotools
67     override-build: |
68       sed -i 's|0\.19\.8|0\.19\.7|'  configure.ac
69       cd extras/tools
70       ./bootstrap
71       make -j $(getconf _NPROCESSORS_ONLN) .protoc
72       make -j $(getconf _NPROCESSORS_ONLN) .nasm
73       make -j $(getconf _NPROCESSORS_ONLN) .meson
74       cd ../../
75       export PATH=$PWD/extras/tools/build/bin:$PATH
76       cd contrib && mkdir linux && cd linux
77       ../bootstrap \
78           --host=$TRIPLET \
79           --enable-libdsm \
80           --enable-dvdcss \
81           --disable-upnp \
82           --disable-chromaprint
83       if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
84           make prebuilt PREBUILT_URL="$VLC_PREBUILT_CONTRIBS_URL"
85       else
86           make list
87           make -j $(getconf _NPROCESSORS_ONLN) fetch
88           make -j $(getconf _NPROCESSORS_ONLN) -k install || make -j1
89           make package
90       fi
91       cd ../../
92       export NOCONFIGURE=1
93       autoreconf -fi
94       ./configure \
95           --prefix=$SNAPCRAFT_PART_INSTALL/usr \
96           --disable-wayland \
97           --enable-merge-ffmpeg
98       make -j $(getconf _NPROCESSORS_ONLN)
99       echo $(git describe --always HEAD) > $SNAPCRAFT_STAGE/version
100       make install
101       sed -i 's|Icon=vlc|Icon=/usr/share/icons/hicolor/256x256/apps/vlc\.png|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/vlc.desktop
102       sed -i 's|TryExec=.*|TryExec=/snap/bin/vlc|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/vlc.desktop
103     build-packages:
104       - ant
105       - git
106       - g++
107       - make
108       - yasm
109       - autoconf
110       - libtool
111       - libtool-bin
112       - cmake
113       - automake
114       - build-essential
115       - libxcb-xfixes0-dev
116       - libqt5svg5-dev
117       - libasound2-dev
118       - libavahi-client-dev
119       - libcdio-dev
120       - libdbus-1-dev
121       - libdirectfb-dev
122       - libegl1-mesa-dev
123       - libfreerdp-dev
124       - libfreetype6-dev
125       - libfribidi-dev
126       - libgles2-mesa-dev
127       - libgnutls28-dev
128       - libgtk2.0-dev
129       - libidn11-dev
130       - libjack-dev
131       - liblircclient-dev
132       - liblua5.2-dev
133       - libmtp-dev
134       - libncursesw5-dev
135       - libpng-dev
136       - libpulse-dev
137       - libqt5x11extras5-dev
138       - qtbase5-private-dev
139       - librsvg2-dev
140       - libsecret-1-dev
141       - libudev-dev
142       - libupnp-dev
143       - libv4l-dev
144       - libva-dev
145       - libvdpau-dev
146       - libx11-dev
147       - libxcb-composite0-dev
148       - libxcb-keysyms1-dev
149       - libxcb-randr0-dev
150       - libxcb-shm0-dev
151       - libxcb-xv0-dev
152       - libxcb1-dev
153       - libxext-dev
154       - libxi-dev
155       - libxinerama-dev
156       - libxkbcommon-x11-dev
157       - libxml2-dev
158       - libxpm-dev
159       - libzvbi-dev
160       - lua5.2
161       - pkg-config
162       - qtbase5-dev
163       - xz-utils
164       - zlib1g-dev
165       - bison
166       - flex
167       - libvulkan-dev
168       - qtdeclarative5-dev
169       - qtquickcontrols2-5-dev
170       - qml-module-qtquick-controls2
171       - qml-module-qtquick-layouts
172       - qml-module-qtquick-templates2
173       - qml-module-qtgraphicaleffects
174     stage-packages:
175       - fonts-freefont-ttf
176       - dbus-x11
177       - libegl1-mesa
178       - libfreerdp-client1.1
179       - libfreerdp-core1.1
180       - libfreerdp-gdi1.1
181       - libfreetype6
182       - libfribidi0
183       - libdb5.3
184       - libgcc1
185       - libgl1-mesa-glx
186       - libgles2-mesa
187       - libglib2.0-0
188       - libpulse0
189       - libqt5core5a
190       - libqt5gui5
191       - librsvg2-2
192       - libsecret-1-0
193       - libva-drm2
194       - libva-x11-2
195       - libva2
196       - libvdpau1
197       - libx11-6
198       - libxcb-composite0
199       - libxcb-keysyms1
200       - libxcb-randr0
201       - libxcb-shm0
202       - libxcb-xv0
203       - libxcb1
204       - libxext6
205       - libxi6
206       - libxinerama1
207       - libxkbcommon-x11-0
208       - libxpm4
209       - vdpau-va-driver
210       - i965-va-driver
211       - mesa-utils
212       - mesa-vdpau-drivers
213       - zlib1g
214       - kde-style-breeze
215       - breeze-icon-theme
216       - frameworkintegration
217       - plasma-integration
218       - phonon4qt5-backend-null
219       - libjack0
220       - libasound2
221       - libgtk-3-0
222       - liblua5.2-0
223       - libmtp9
224       - libupnp6
225       - libzvbi0
226       - libnotify4
227       - libvulkan1
228       - libaacs0
229       - mesa-vulkan-drivers
230       - libvulkan-dev
231       - openjdk-8-jdk
232       - qml-module-qtquick-controls2
233       - qml-module-qtquick-layouts
234       - qml-module-qtquick-templates2
235       - qml-module-qtgraphicaleffects
236     filesets:
237       exclusion:
238       - "-usr/lib/*/cmake/*"
239       - "-usr/include/*"
240       - "-usr/share/ECM/*"
241       - "-usr/share/doc/*"
242       - "-usr/share/man/*"
243       - "-usr/bin/X11"
244       - "-usr/lib/gcc/x86_64-linux-gnu/6.0.0"
245       - "-usr/lib/aspell/*"
246     prime:
247       - "$exclusion"
248
249   wrapper:
250     plugin: dump
251     after: [vlc]
252     source: .
253     organize:
254       vlc-snap-wrapper.sh: bin/vlc-snap-wrapper.sh
255
256   fixup-vulkan-icd-paths:
257     plugin: nil
258     after: [wrapper]
259     override-build: |
260       sed -i -E 's,(^.+"library_path": ")/.*/,\1,' $SNAPCRAFT_STAGE/usr/share/vulkan/icd.d/*.json