name: ${binaryName} version: ${version} summary: ${applicationName}, secure VPN. Powered by Bitmask. description: | ${applicationName} is an easy, fast, and secure VPN service from ${providerURL}. ${applicationName} does not require a user account, keep logs, or track you in any way. The service is paid for entirely by donations from users like you. grade: stable confinement: classic icon: snap/gui/icon.svg base: core20 compression: lzo architectures: - build-on: amd64 - build-on: i386 parts: bitmask-root: plugin: dump source: helpers source-type: local override-prime: | mkdir -p bin cp $SNAPCRAFT_PART_SRC/bitmask-root bin/ chmod +x bin/bitmask-root openvpn: plugin: nil stage-packages: [openvpn] prime: - -usr/share/doc - -usr/share/man bitmask-vpn: plugin: nil source: . source-type: local stage: - bin/${binaryName} override-build: | # TODO - this still has some round corners for vendoring. # Maybe we just need to put the providers.json in the VENDOR_PATH # and pass it to gui/providers from some path that snap can access. # Same for the vendor.qrc mkdir -p $SNAPCRAFT_PART_INSTALL/snap/ mkdir -p $SNAPCRAFT_PRIME/snap/ echo ${version} > $SNAPCRAFT_PRIME/snap/version.txt make build_golib ln -fs /usr/lib/qt5/bin/lrelease /root/parts/qt5/install/usr/lib/qt5/bin/lrelease QMAKE=/root/parts/qt5/install/usr/lib/qt5/bin/qmake LRELEASE=/usr/lib/qt5/bin/lrelease QT_SELECT=5 XBUILD=no TARGET=${binaryName} make build_gui mkdir -p $SNAPCRAFT_PART_INSTALL/bin mv build/qt/release/${binaryName} $SNAPCRAFT_PART_INSTALL/bin/ override-prime: | rm -rf $SNAPCRAFT_PROJECT_DIR/snap/hooks/.mypy_cache snapcraftctl prime build-packages: - pkg-config - g++ - golang - git - make - qttools5-dev-tools stage-packages: - qml-module-qt-labs-platform after: [desktop-qt5] desktop-integration: plugin: nil stage-packages: - libx11-data - libx11-xcb1 - xkb-data desktop-qt5: source: https://github.com/desktop-app/snapcraft-desktop-helpers.git source-subdir: qt plugin: make make-parameters: ["FLAVOR=qt5"] build-packages: - build-essential - dpkg-dev stage-packages: - libjpeg-turbo8 - libxkbcommon0 - ttf-ubuntu-font-family - dmz-cursor-theme - light-themes - adwaita-icon-theme - gnome-themes-standard - shared-mime-info - libgdk-pixbuf2.0-0 - locales-all - xdg-user-dirs - fcitx-frontend-qt5 - libglib2.0-bin stage: - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libjpeg.so.8.2.2 - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5Core.so.5 - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5DBus.so.5 - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5EglFSDeviceIntegration.so.5 - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5Gui.so.5 - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5Network.so.5 - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5XcbQpa.so.5 - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/bearer/libqconnmanbearer.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/bearer/libqgenericbearer.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/bearer/libqnmbearer.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/egldeviceintegrations/libqeglfs-emu-integration.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/generic/libqevdevkeyboardplugin.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/generic/libqevdevmouseplugin.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/generic/libqevdevtabletplugin.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/generic/libqevdevtouchplugin.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/generic/libqtuiotouchplugin.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/imageformats/libqgif.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/imageformats/libqico.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/imageformats/libqjpeg.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqeglfs.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqlinuxfb.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqminimal.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqminimalegl.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqoffscreen.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqvnc.so - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqxcb.so after: - qt5 qt5: plugin: nil build-packages: - libdbus-1-dev - libegl-dev - libfontconfig1-dev - libfreetype-dev - libgl-dev - libglib2.0-dev - libharfbuzz-dev - libicu-dev - libpcre2-dev - libpng-dev - libwayland-dev - libx11-dev - libx11-xcb-dev - libxcb1-dev - libxcb-glx0-dev - libxcb-icccm4-dev - libxcb-image0-dev - libxcb-keysyms1-dev - libxcb-randr0-dev - libxcb-render0-dev - libxcb-render-util0-dev - libxcb-shape0-dev - libxcb-shm0-dev - libxcb-sync-dev - libxcb-util-dev - libxcb-xfixes0-dev - libxcb-xinerama0-dev - libxcb-xinput-dev - libxcb-xkb-dev - libxcursor-dev - libxkbcommon-dev - libxkbcommon-x11-dev - zlib1g-dev stage-packages: - libdbus-1-3 - libegl1 - libfontconfig1 - libfreetype6 - libgl1 - libglib2.0-0 - libharfbuzz0b - libicu66 - libpcre2-16-0 - libpng16-16 #- libwayland-client0 #- libwayland-cursor0 #- libwayland-egl1 - libx11-6 - libx11-xcb1 - libxcb1 - libxcb-glx0 - libxcb-icccm4 - libxcb-image0 - libxcb-keysyms1 - libxcb-randr0 - libxcb-render0 - libxcb-render-util0 - libxcb-shape0 - libxcb-shm0 - libxcb-sync1 - libxcb-util1 - libxcb-xfixes0 - libxcb-xinerama0 - libxcb-xinput0 - libxcb-xkb1 - libxcursor1 - libxkbcommon0 - libxkbcommon-x11-0 - zlib1g - try: [appmenu-qt5] # not available on core18 override-pull: | QT=5_15_2 git clone -b v5.15.2 --depth=1 git://code.qt.io/qt/qt5.git . perl init-repository --module-subset=qtbase,qtimageformats,qtsvg,qtdeclarative,qtgraphicaleffects,qtquickcontrols,qtquickcontrols2,qtscript git submodule update qtbase qtimageformats qtsvg qtdeclarative qtgraphicaleffects qtquickcontrols qtquickcontrols2 qtscript override-build: | ./configure \ -prefix /usr \ -bindir /usr/lib/qt5/bin \ -libdir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET \ -docdir /usr/share/qt5/doc \ -headerdir /usr/include/$SNAPCRAFT_ARCH_TRIPLET/qt5 \ -datadir /usr/share/qt5 \ -archdatadir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5 \ -plugindir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins \ -importdir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/imports \ -translationdir /usr/share/qt5/translations \ -hostdatadir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5 \ -sysconfdir /etc/xdg \ -examplesdir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/examples \ -release \ -opensource \ -confirm-license \ -no-gtk \ -no-feature-xcb-sm \ -no-openssl \ -nomake examples \ -nomake tests \ -opengl desktop \ -I $SNAPCRAFT_STAGE/usr/include \ -L $SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT make INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL" install stage: - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libjpeg.so.8.2.2 prime: - -./usr/include - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cmake - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/bin - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/mkspecs - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/examples - -./usr/lib/qt5 - -./usr/share apps: bitmask-root: command: bin/bitmask-root openvpn: command: usr/sbin/openvpn launcher: command: bin/${binaryName} -platform xcb environment: QT_PLUGIN_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml/QtQuick/Controls.2/:$SNAP/usr/lib/x86_64-linux-gnu/qt5/plugins:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/xcbglintegrations QT_QPA_PLATFORM_PLUGIN_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins:$SNAP/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms # QT_STYLE_OVERRIDE: Fusion QML2_IMPORT_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml DISABLE_WAYLAND: 1 LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri # debug ------------- # QT_OPENGL: software # QT_DEBUG_PLUGINS: 1 SNAP_DESKTOP_DEBUG: 1 # debug -------------