Skip to content
Snippets Groups Projects
Unverified Commit bbc227c8 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[pkg] parametrize working snap file

parent 103abf08
No related branches found
No related tags found
No related merge requests found
......@@ -2,92 +2,122 @@ 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.
RiseupVPN is an easy, fast, and secure VPN service from riseup.net.
RiseupVPN 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
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
- libdouble-conversion1
- libfreetype6
- libgl1
- libglvnd0
- libglx0
- libgraphite2-3
- libharfbuzz0b
- libicu60
- libpng16-16
- libqt5core5a
- libqt5gui5
- libqt5network5
- libqt5qml5
- libqt5widgets5
- libx11-6
- libxau6
- libxcb1
- libxdmcp6
- qml-module-qt-labs-platform
- qml-module-qtquick-controls2
- qml-module-qtquick-dialogs
- qml-module-qtquick-extras
prime:
- -usr/share/doc
- -usr/share/man
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
bitmask-vpn:
plugin: nil
source: .
source-type: local
stage:
- bin/${binaryName}
override-build: |
mkdir -p $SNAPCRAFT_PRIME/snap/
echo 0.20.4-40-gcf5ed56 > $SNAPCRAFT_PRIME/snap/version.txt
mkdir -p $SNAPCRAFT_PRIME/usr/share/applications
cp $SNAPCRAFT_PROJECT_DIR/snap/local/${binaryName}.desktop $SNAPCRAFT_PRIME/usr/share/applications/${binaryName}.desktop
QT_SELECT=5 XBUILD=no ./build.sh
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
mv qtbuild/release/${binaryName} $SNAPCRAFT_PART_INSTALL/bin/
override-prime: |
rm -rf $SNAPCRAFT_PROJECT_DIR/snap/hooks/.mypy_cache
snapcraftctl prime
build-packages:
- pkg-config
- patchelf
- g++
- golang
- git
- make
- qtbase5-dev
- qttools5-dev-tools
- qt5-qmake
- qtdeclarative5-dev
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: |
mkdir -p $SNAPCRAFT_PART_INSTALL/snap/
mkdir -p $SNAPCRAFT_PRIME/snap/
echo ${version} > $SNAPCRAFT_PRIME/snap/version.txt
QT_SELECT=5 XBUILD=no TARGET={binaryName} ./build.sh
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
mv qtbuild/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
- qt5-qmake
- qttools5-dev-tools
- qtdeclarative5-dev
stage-packages: # for some reason they're not picked from here - duplicating in desktop-qt5.
- libqt5qml5
- libqt5quick5
- qml-module-qtquick-controls
- qml-module-qtquick-dialogs
- qml-module-qtquick-extras
- qml-module-qt-labs-qmlmodels
- qml-module-qt-labs-platform
after: [desktop-qt5]
desktop-qt5:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: qt
plugin: make
make-parameters: ["FLAVOR=qt5"]
build-packages:
- build-essential
- qtbase5-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- locales-all
- xdg-user-dirs
- fcitx-frontend-qt5
- libxcb1
- libqt5gui5
- libgdk-pixbuf2.0-0
- libqt5svg5
- libqt5qml5
- libqt5quick5
- qml-module-qtquick2
- qml-module-qtquick-controls
- qml-module-qtquick-dialogs
- qml-module-qtquick-extras
- qml-module-qt-labs-platform
- qml-module-qt-labs-qmlmodels
- try: [appmenu-qt5] # not available on core18
apps:
launcher:
command: bin/${binaryName}
desktop: usr/share/applications/${binaryName}.desktop
environment:
LD_LIBRARY_PATH: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET:$LD_LIBRARY_PATH"
openvpn:
command: usr/sbin/openvpn
environment:
LD_LIBRARY_PATH: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET:$LD_LIBRARY_PATH"
bitmask-root:
command: bin/bitmask-root
bitmask-root:
command: bin/bitmask-root
openvpn:
command: usr/sbin/openvpn
environment:
LD_LIBRARY_PATH: &library-path
$SNAP/lib:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET
launcher:
command: bin/${binaryName}
environment:
QT_PLUGIN_PATH: &path
$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml
LD_LIBRARY_PATH:
$SNAP/lib:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$LD_LIBRARY_PATH
QML2_IMPORT_PATH:
$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml
# debug -------------
#QT_DEBUG_PLUGINS: 1
SNAP_DESKTOP_DEBUG: 1
# debug -------------
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment