Skip to content

Instantly share code, notes, and snippets.

@3v1n0
Last active May 1, 2021 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save 3v1n0/0008e78d3903222baa8ba1379f8eba00 to your computer and use it in GitHub Desktop.
Save 3v1n0/0008e78d3903222baa8ba1379f8eba00 to your computer and use it in GitHub Desktop.
Snapcraft QT builds examples (shared, static...)
name: nextcloud-client
version: 2.2.4+git
icon: ../nextcloudtheme/theme/colored/Nextcloud-icon.svg
summary: Nextcloud Desktop Client
description: |
The Nextcloud Desktop Client is a tool to synchronize files from Nextcloud
Server with your computer.
grade: stable
confinement: strict
parts:
client:
plugin: cmake
source: ../
source-subdir: client
build-packages:
- g++
- libqt5webkit5-dev
- libsqlite3-dev
- libssl-dev
- pkg-config
- qt5keychain-dev
- qttools5-dev-tools
configflags:
- -DCMAKE_BUILD_TYPE=Release
- -DOEM_THEME_DIR=$SNAPCRAFT_PART_INSTALL/../src/nextcloudtheme
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_INSTALL_LIBDIR=/usr/lib
- -DSYSCONF_INSTALL_DIR=/etc
after:
- desktop-qt5
- snapcraft-preload
xdg-open:
source: https://github.com/ubuntu-core/snapd-xdg-open.git
source-depth: 1
plugin: dump
organize:
data/xdg-open: bin/xdg-open
prime:
- bin
apps:
nextcloud-client:
aliases:
- nextcloud
command: snapcraft-preload nextcloud
environment:
LD_LIBRARY_PATH: $SNAP/usr/lib/nextcloud:$LD_LIBRARY_PATH
desktop: usr/share/applications/nextcloud.desktop
plugs:
- unity7
- home
- network
- network-bind
- network-manager
cmd:
aliases:
- nextcloudcmd
command: snapcraft-preload nextcloudcmd
environment:
LD_LIBRARY_PATH: $SNAP/usr/lib/nextcloud:$LD_LIBRARY_PATH
plugs:
- unity7
- home
- network
name: qt5-systray-static
version: 5.7
summary: Qt5 systray example
description: Test indicator icons from a snap
grade: "devel"
confinement: strict
parts:
qt5-systray:
plugin: make
prepare: $SNAPCRAFT_STAGE/bin/qmake
make-install-var: INSTALL_ROOT
source: .
after:
- qt
qt:
plugin: qtbuilder
# qt-version: 5.6.2
qt-source-git: https://code.qt.io/qt/qt5.git
qt-submodules: ['qtbase']
# qt-patches-base-url: https://here-are-my-patches.org/Patches
# qt-patches-path: patches
build-packages:
- libasound2-dev
- libdbusmenu-glib-dev
- libffi-dev
- liblzma-dev
- libpulse-dev
- libssl-dev
- libx11-xcb-dev
- libxcb-icccm4-dev
- libxcb-image0-dev
- libxcb-keysyms1-dev
- libxcb-randr0-dev
- libxcb-render-util0-dev
- libxcb-sync-dev
- libxcb-util0-dev
- libxcb-xfixes0-dev
- libxcb1-dev
- libxrender-dev
configflags:
- -prefix
- $SNAPCRAFT_STAGE
- -release
- -force-debug-info
- -opensource
- -confirm-license
- -qt-zlib
- -qt-libpng
- -qt-freetype
- -qt-harfbuzz
- -qt-pcre
- -no-opengl
- -static
- -openssl-linked
- -no-mirclient
- -nomake
- examples
- -nomake
- tests
prime: [-./*]
integration:
plugin: nil
stage-packages:
- fonts-dejavu
apps:
qt5-systray:
command: systray
environment:
QT_QPA_FONTDIR: $SNAP/usr/share/fonts/truetype/dejavu/
plugs:
- unity7
name: qt5-systray
version: 5.7
summary: Qt5 systray example
description: Test indicator icons from a snap
grade: "devel"
confinement: strict
parts:
qt5-systray:
plugin: qmake
qt-version: qt5
source: .
after:
- desktop-qt5
- indicator-qt5
desktop-qt5:
stage: [ -./**/lib/*/qt5/**/libappmenu-qt5.so ]
apps:
qt5-systray:
command: desktop-launch systray
plugs:
- unity7
name: telegram-desktop
version: 1.1.7
summary: Telegram Desktop
description: |
Telegram is a popular messaging protocol with encryption and security as
its key focus.
grade: stable
confinement: strict
apps:
telegramdesktop:
command: |
bash -c \'mkdir -p $HOME/{.local/share/fonts,.cache} &&
env QT_XKB_CONFIG_ROOT=$SNAP/usr/share/X11/xkb
QT_IM_MODULE=xim
QTCOMPOSE=$SNAP/usr/share/X11/locale
XDG_DATA_DIRS=$SNAP/usr/share:$XDG_DATADIRS
XDG_CACHE_HOME=$HOME/.cache
Telegram\'
plugs:
- home
- network
- network-manager
- network-bind
- pulseaudio
- unity7
parts:
telegram:
plugin: gyp-cmake
source: https://github.com/telegramdesktop/tdesktop/archive/v$SNAPCRAFT_PROJECT_VERSION.tar.gz
build-packages:
- libappindicator-dev
- libappindicator3-dev
- libexif-dev
- libicu-dev
- liblzma-dev
- libssl-dev
- libunity-dev
- zlib1g-dev
gyp-file: Telegram/gyp/Telegram.gyp
build-type: 'Release'
artifacts: ['Telegram']
organize:
Telegram: bin/Telegram
configflags:
- -Dlinux_path_xkbcommon=$SNAPCRAFT_STAGE
- -Dlinux_path_va=$SNAPCRAFT_STAGE
- -Dlinux_path_ffmpeg=$SNAPCRAFT_STAGE
- -Dlinux_path_openal=$SNAPCRAFT_STAGE
- -Dlinux_path_qt=$SNAPCRAFT_STAGE
- -Dlinux_path_breakpad=$SNAPCRAFT_STAGE
- -Dlinux_path_libexif_lib=$SNAPCRAFT_STAGE
- -Dlinux_lib_ssl=-lssl
- -Dlinux_lib_crypto=-lcrypto
- -Dlinux_lib_icu=-licuuc -licutu -licui18n
- -Dtravis_defines=TDESKTOP_DISABLE_AUTOUPDATE,
TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME,
TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION
- --depth=.
after:
- breakpad
- ffmpeg
- gyp
- libva
- openal
- qt
- libtgvoip
libtgvoip:
plugin: gyp-cmake
source: https://github.com/grishka/libtgvoip.git
gyp-file: libtgvoip.gyp
build-packages:
- libasound2-dev
- libopus-dev
- libpulse-dev
- libssl-dev
after:
- gyp
desktop-integration:
plugin: nil
stage-packages:
- libpulse0
- libx11-data
- libx11-xcb1
- xkb-data
snapd-xdg-open:
source: https://github.com/ubuntu-core/snapd-xdg-open.git
source-depth: 1
plugin: dump
organize:
data/xdg-open: bin/xdg-open
prime:
- bin
libva:
source: https://github.com/01org/libva.git
source-depth: 1
plugin: autotools
build-packages:
- libdrm-dev
- libegl1-mesa-dev
- libgl1-mesa-dev
- libx11-dev
- libxext-dev
- libxfixes-dev
configflags:
- --enable-static
prime: [-./*]
ffmpeg:
source: https://github.com/FFmpeg/FFmpeg.git
source-depth: 1
source-branch: release/3.1
plugin: autotools
build-packages:
- libass-dev
- libfreetype6-dev
- libgpac-dev
- liblzma-dev
- libopus-dev
- libsdl1.2-dev
- libtheora-dev
- libtool
- libva-dev
- libvdpau-dev
- libvorbis-dev
- libxcb1-dev
- libxcb-shm0-dev
- libxcb-xfixes0-dev
- pkg-config
- texi2html
- yasm
- zlib1g-dev
configflags:
- --prefix=/
- --disable-debug
- --disable-programs
- --disable-doc
- --disable-everything
- --enable-gpl
- --enable-version3
- --enable-libopus
- --enable-decoder=aac
- --enable-decoder=aac_latm
- --enable-decoder=aasc
- --enable-decoder=flac
- --enable-decoder=gif
- --enable-decoder=h264
- --enable-decoder=h264_vdpau
- --enable-decoder=mp1
- --enable-decoder=mp1float
- --enable-decoder=mp2
- --enable-decoder=mp2float
- --enable-decoder=mp3
- --enable-decoder=mp3adu
- --enable-decoder=mp3adufloat
- --enable-decoder=mp3float
- --enable-decoder=mp3on4
- --enable-decoder=mp3on4float
- --enable-decoder=mpeg4
- --enable-decoder=mpeg4_vdpau
- --enable-decoder=msmpeg4v2
- --enable-decoder=msmpeg4v3
- --enable-decoder=opus
- --enable-decoder=vorbis
- --enable-decoder=wavpack
- --enable-decoder=wmalossless
- --enable-decoder=wmapro
- --enable-decoder=wmav1
- --enable-decoder=wmav2
- --enable-decoder=wmavoice
- --enable-encoder=libopus
- --enable-hwaccel=h264_vaapi
- --enable-hwaccel=h264_vdpau
- --enable-hwaccel=mpeg4_vaapi
- --enable-hwaccel=mpeg4_vdpau
- --enable-parser=aac
- --enable-parser=aac_latm
- --enable-parser=flac
- --enable-parser=h264
- --enable-parser=mpeg4video
- --enable-parser=mpegaudio
- --enable-parser=opus
- --enable-parser=vorbis
- --enable-demuxer=aac
- --enable-demuxer=flac
- --enable-demuxer=gif
- --enable-demuxer=h264
- --enable-demuxer=mov
- --enable-demuxer=mp3
- --enable-demuxer=ogg
- --enable-demuxer=wav
- --enable-muxer=ogg
- --enable-muxer=opus
prime: [-./*]
openal:
source: http://repo.or.cz/openal-soft.git
source-depth: 1
plugin: cmake
build-packages:
- oss4-dev
- portaudio19-dev
configflags:
- -DCMAKE_BUILD_TYPE=Release
- -DLIBTYPE=STATIC
after:
- ffmpeg
prime: [-./*]
libxkbcommon:
source: https://github.com/xkbcommon/libxkbcommon.git
source-depth: 1
plugin: autotools
build-packages:
- xutils-dev
- bison
- python-xcbgen
configflags:
- --disable-x11
prime: [-./*]
qt:
plugin: qtbuilder
qt-version: 5.6.2
qt-source-git: https://code.qt.io/qt/qt5.git
qt-submodules: ['qtbase', 'qtimageformats']
qt-patches-base-url: https://raw.githubusercontent.com/telegramdesktop/tdesktop/master/Telegram/Patches
qt-patches-path: patches
build-packages:
- libasound2-dev
- libdbusmenu-glib-dev
- libffi-dev
- liblzma-dev
- libpulse-dev
- libssl-dev
- libx11-xcb-dev
- libxcb-icccm4-dev
- libxcb-image0-dev
- libxcb-keysyms1-dev
- libxcb-randr0-dev
- libxcb-render-util0-dev
- libxcb-sync-dev
- libxcb-util0-dev
- libxcb-xfixes0-dev
- libxcb1-dev
- libxrender-dev
configflags:
- -prefix
- $SNAPCRAFT_STAGE
- -release
- -force-debug-info
- -opensource
- -confirm-license
- -qt-zlib
- -qt-libpng
- -qt-libjpeg
- -qt-freetype
- -qt-harfbuzz
- -qt-pcre
- -qt-xcb
- -qt-xkbcommon-x11
- -no-opengl
- -no-gtkstyle
- -static
- -openssl-linked
- -no-mirclient
- -nomake
- examples
- -nomake
- tests
after:
- libxkbcommon
prime: [-./*]
breakpad:
plugin: autotools-subsource
source: https://chromium.googlesource.com/breakpad/breakpad
source-type: git
source-depth: 1
sub-sources:
- linux-syscall-support:
dest: src/third_party/lss
source: https://chromium.googlesource.com/linux-syscall-support
source-type: git
source-depth: 1
prime: [-./*]
gyp:
plugin: patched-python
source: https://chromium.googlesource.com/external/gyp
source-type: git
source-commit: 702ac58e4772
python-version: python2
patches:
- https://raw.githubusercontent.com/telegramdesktop/tdesktop/master/Telegram/Patches/gyp.diff
prime: [-./*]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment