snapcraft.yaml 5.14 KB
Newer Older
1
name: remmina
2
adopt-info: remmina
3 4 5
version: git
version-script: cat parts/remmina/src/snap/SNAP_VERSION
icon: remmina/desktop/scalable/apps/remmina.svg
6 7 8 9
description: |
  Remmina is a remote desktop client written in GTK+, aiming to be useful for
  system administrators and travellers, who need to work with lots of remote
  computers in front of either large monitors or tiny netbooks. Remmina supports
10
  multiple network protocols in an integrated and consistent user interface.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
  Currently RDP, VNC, SPICE, NX, XDMCP and SSH are supported.

  Remmina is free and open-source software, released under GNU GPL license.

grade: stable
confinement: strict

parts:
  freerdp:
    plugin: cmake
    source: https://github.com/FreeRDP/FreeRDP.git
    source-depth: 1
    build-packages:
      - build-essential
      - libasound2-dev
26 27
      - libavcodec-dev
      - libavutil-dev
28
      - libcups2-dev
29 30
      - libgnutls-dev
      - libgnutls28-dev
31 32 33
      - libjpeg-dev
      - libpcsclite-dev
      - libpulse-dev
34
      - libsecret-1-dev
35 36 37 38 39 40 41 42
      - libssl-dev
      - libx11-dev
      - libxcursor-dev
      - libxdamage-dev
      - libxext-dev
      - libxi-dev
      - libxinerama-dev
      - libxkbfile-dev
43
      - libxml2-dev
44
      - libxrandr-dev
45
      - libxtst-dev
46 47
      - libxv-dev
    configflags:
48
      - -DCMAKE_BUILD_TYPE=Release
49
      - -DWITH_WAYLAND=on
50 51 52 53
      - -DWITH_CLIENT=off
      - -DWITH_SERVER=off
      - -DWITH_PULSE=on
      - -DWITH_GSTREAMER=off
54
      - -DWITH_FFMPEG=on
55 56 57 58 59 60
      - -DWITH_CHANNELS=on
      - -DSTATIC_CHANNELS=off
      - -DWITH_CUPS=on
      - -DWITH_PCSC=on
      - -DWITH_JPEG=on

61 62 63
    # XXX: This is an hack to have a kind of bind-mount with absolute prefix.
      - -DCMAKE_INSTALL_PREFIX=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr
    organize:
64
      snap/remmina/current: .
65

66 67 68 69 70
    prime:
      - -usr/include
      - -usr/lib/cmake
      - -usr/lib/pkgconfig

71 72 73 74 75 76 77
  # Remove this (and use again libssh-dev) once libssh-0.7 is available in distro
  libssh-0.7:
    plugin: cmake
    source: git://git.libssh.org/projects/libssh.git
    source-depth: 1
    source-branch: v0-7
    configflags:
78
      - -DCMAKE_BUILD_TYPE=Release
79 80 81 82
      - -DWITH_STATIC_LIB=ON
      - -DWITH_GSSAPI=ON
      - -DWITH_NACL=0

83 84 85
    # XXX: This is an hack to have a kind of bind-mount with absolute prefix.
      - -DCMAKE_INSTALL_PREFIX=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr
    organize:
86
      snap/remmina/current: .
87

88 89 90
    prime:
      - ./**/libssh*.so.*

91 92 93 94 95 96 97 98 99 100
  # FIXME: this is an ugly workaround for https://pad.lv/1761633
  remmina-appdata:
    plugin: nil
    source: remmina/desktop
    prime: [-./*]
    prepare: |
      SNAPCRAFT_PART_SRC=$SNAPCRAFT_PART_INSTALL/../src
      cp -av $SNAPCRAFT_PART_SRC/appdata.xml \
            $SNAPCRAFT_PART_SRC/org.remmina.Remmina.appdata.xml

101 102
  remmina:
    plugin: cmake
103
    source: .
104 105 106 107
    parse-info: [../../remmina-appdata/src/org.remmina.Remmina.appdata.xml]
    prepare: |
      SNAPCRAFT_PART_SRC=$SNAPCRAFT_PART_INSTALL/../src
      cp -av $SNAPCRAFT_STAGE/../snap $SNAPCRAFT_PART_SRC
108 109 110 111 112 113 114 115 116
    stage-packages:
      - xauth
    build-packages:
      - intltool
      - libappindicator3-dev
      - libavahi-ui-gtk3-dev
      - libgcrypt20-dev
      - libgnome-keyring-dev
      - libgtk-3-dev
117 118
      - libjson-glib-dev
      - libsoup2.4-dev
119 120
      - libspice-client-gtk-3.0-dev
      - libspice-protocol-dev
121 122 123 124
      - libvncserver-dev
      - libvte-2.91-dev
      - libxkbfile-dev
    configflags:
125
      - -DCMAKE_BUILD_TYPE=Release
126
      - -DCMAKE_PREFIX_PATH=$SNAPCRAFT_STAGE/usr
127
      - -DWITH_TELEPATHY=off
128
      - -DSNAP_BUILD=on
129

130
      # XXX: This is an hack to have a kind of bind-mount with absolute prefix.
131
      - -DCMAKE_INSTALL_PREFIX=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr
132 133 134 135

    install: |
      cp -av $SNAPCRAFT_PART_INSTALL/../src/snap/gui $SNAPCRAFT_STAGE/../snap

136
    organize:
137
      snap/remmina/current: .
138 139
    stage:
      - -./usr/share/fonts/**
140

141
    after:
142
      - libssh-0.7
143
      - freerdp
144
      - desktop-gtk3
145
      - remmina-appdata
146 147 148

  # Removing files that are accessible thanks to desktop plug
  desktop-gtk3:
149 150 151
    stage-packages:
      - gnome-icon-theme
      - libappindicator3-1
152 153
    stage:
      - -./usr/share/fonts/**
154 155 156 157 158 159 160 161 162
    install: |
      set -x
      export XDG_DATA_DIRS=$SNAPCRAFT_PART_INSTALL/usr/share
      update-mime-database $SNAPCRAFT_PART_INSTALL/usr/share/mime
      for dir in $SNAPCRAFT_PART_INSTALL/usr/share/icons/*/; do
        if [ -f $dir/index.theme ]; then
          gtk-update-icon-cache-3.0 -q $dir
        fi
      done
163 164 165

apps:
  remmina:
166 167 168 169
    # desktop-launch seems to be broken when setting up wayland env
    # so we disable it
    environment:
      DISABLE_WAYLAND: 1
170
    command: desktop-launch remmina
171
    common-id: org.Remmina.desktop
172
    desktop: usr/share/applications/org.remmina.Remmina.desktop
173 174 175
    plugs:
      - avahi-observe
      - cups-control
176 177
      - desktop
      - desktop-legacy
178 179 180 181 182 183 184
      - gsettings
      - home
      - mount-observe
      - network
      - network-bind
      - pulseaudio
      - unity7
185
      - password-manager-service
186
      - wayland
187 188

  winpr-makecert:
189
    command: winpr-makecert
190 191

  winpr-hash:
192
    command: winpr-hash
193 194 195 196 197

slots:
  remmina-gapp:
    interface: dbus
    bus: session
198
    name: org.remmina.Remmina