summaryrefslogtreecommitdiff
path: root/pkg/riseupvpn/snap/snapcraft.yaml
blob: 8d490f31d4196c68d884dd222d58429ec827d2db (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
87
88
89
90
91
92
93
94
name: riseup-vpn
version: '0.10.3+git'
epoch: 0
summary: RiseupVPN, anonymous VPN. Powered by Bitmask.
description: |
        RiseupVPN is an anonymous VPN. It's controlled by a minimal systray
        that communicates with the bitmask daemon.
        Don't forget to donate!

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: classic
icon: snap/gui/riseupvpn.svg

parts:
         
        bitmask:
                plugin: python
                python-version: python2
                source-branch: snap 
                # XXX change to leap/master when merged
                source: https://0xacab.org/kali/bitmask-dev.git
                requirements: pkg/requirements-vpn.pip
                stage-packages:
                        # this seems to trigger https://bugs.launchpad.net/snapcraft/+bug/1676684
                        - python2.7-dev
                        - libsqlcipher-dev
                        - libffi-dev
                        - libsqlite3-dev
                        - libzmq3-dev
                prime: 
                    - -usr/include
                    - -usr/lib/locale
                    - -usr/share/X11/locale
                    - -usr/share/doc
                    - -usr/share/locale
                    - -usr/share/man
                    #- -usr/share/icons
        openvpn:
                plugin: nil
                stage-packages:
                        - openvpn
                prime:
                    - -usr/share/doc
                    - -usr/share/man
        bitmask-systray:
                plugin: go
                source: https://0xacab.org/leap/bitmask-systray.git
                build-packages:
                        - pkg-config
                        - patchelf
                        - libzmq5
                        - libzmq3-dev
                        - libsodium-dev
                        - libappindicator3-dev
                        - libgtk-3-dev
                stage-packages:
                        - libzmq5
                        - libsodium18
                        - libappindicator3-1
                install: |
                  TRIPLET_PATH="$SNAPCRAFT_PART_INSTALL/usr/lib/$(gcc -print-multiarch)"
                  LIBZMQ=$(readlink -n $TRIPLET_PATH/libzmq.so.5)
                  LIBSOD=$(readlink -n $TRIPLET_PATH/libsodium.so.18)
                  ln -s "../usr/lib/$(gcc -print-multiarch)/$LIBZMQ" $SNAPCRAFT_PART_INSTALL/bin/libzmq.so.5
                  ln -s "../usr/lib/$(gcc -print-multiarch)/$LIBSOD" $SNAPCRAFT_PART_INSTALL/bin/libsodium.so.18
                  patchelf --set-rpath /snap/riseup-vpn/current/bin/ $SNAPCRAFT_PART_INSTALL/bin/bitmask-systray.git
                prime: 
                    - -usr/include
                    - -usr/lib/locale
                    - -usr/share/X11/locale
                    - -usr/share/doc
                    - -usr/share/locale
                    - -usr/share/man
                    #- -usr/share/icons
        desktop-gtk3:
                prime: 
                    - -usr/include
                    - -usr/lib/locale
                    - -usr/share/X11/locale
                    - -usr/share/doc
                    - -usr/share/locale
                    - -usr/share/man
                    #- -usr/share/icons
                    - '*'

apps:
        launcher:
                command: ./bin/bitmask_anonvpn
        bitmaskd:
                command: ./bin/bitmaskd
        bitmask-systray:
                command: ./bin/bitmask-systray.git
        openvpn:
                command: ./usr/sbin/openvpn