summaryrefslogtreecommitdiff
path: root/branding/templates/snap/snapcraft-template.yaml
blob: 8039a4a4fd30106fdf289a01786d5b8e70bc3fcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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: core18

parts:
        desktop-gtk3:
                plugin: nil
                stage-packages:
                    - libc6
                prime:
                    - '*'
                    - -usr/include
                    - -usr/lib/locale
                    - -usr/share/X11/locale
                    - -usr/share/doc
                    - -usr/share/locale
                    - -usr/share/man
         
        bitmask-root:
                after: [desktop-gtk3]
                plugin: dump
                source: https://0xacab.org/leap/bitmask-dev/
                source-type: git
                build-packages:
                    - wget
                override-prime: |
                        echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" 
                        mkdir -p bin
                        wget -O bin/bitmask-root https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/bitmask-root
                        chmod +x bin/bitmask-root
                        echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" 

        openvpn:
                plugin: nil
                stage-packages:
                    - openvpn
                    - libc6
                prime:
                    - -usr/share/doc
                    - -usr/share/man

        bitmask-vpn:
                after: [desktop-gtk3]
                plugin: go
                source-type: git
                source: https://0xacab.org/leap/bitmask-vpn
                # this does not seem to work with snapcraft package version in bionic
                #go-packages:
                #        - 0xacab.org/leap/bitmask-vpn/cmd/bitmask-vpn
                override-build: |
                      echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" 
                      #cat $SNAPCRAFT_PROJECT_DIR/snap/local/bitmask-vpn.desktop
                      cp $SNAPCRAFT_STAGE/../snap/local/${binaryName}.desktop $SNAPCRAFT_PRIME/${binaryName}.desktop
                      #cp ../../../gui/bitmask-vpn.desktop $SNAPCRAFT_PRIME/${binaryName}.desktop
                      snapcraftctl build
                      echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" 
                build-packages:
                    - pkg-config
                    - patchelf
                    - libpcre3-dev
                    - libappindicator3-dev
                    - libgtk-3-dev
                stage-packages:
                    - libc6
                    - libpcre3
                    - libappindicator3-1
                    - zlib1g

apps:
        launcher:
                command: bin/bitmask-vpn
                desktop: ${binaryName}.desktop
                environment:
                        LD_LIBRARY_PATH: "$SNAP/usr/lib/$(gcc -print-multiarch):$SNAP/lib/$(gcc -print-multiarch):$LD_LIBRARY_PATH"
        openvpn:
                command: usr/sbin/openvpn
        bitmask-root:
                command: bin/bitmask-root