snapcraft.yaml 3.34 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
# -*- Mode: YAML; indent-tabs-mode: nil; tab-width: 2 -*-
---
name: deja-dup
version: git
version-script: grep 'version:' meson.build -m1 | cut -d\' -f2
summary: Déjà Dup Backup Tool
description: |
  An easy to use personal backup system for your GNOME desktop.

  https://wiki.gnome.org/Apps/DejaDup
icon: data/icons/org.gnome.DejaDup.svg
12
license: GPL-3.0+
13

14
grade: stable
15 16 17 18 19 20
confinement: classic

base: core18

apps:
  deja-dup:
21
    command: desktop-launch $SNAP/bin/wrapper
22 23
    desktop: share/applications/org.gnome.DejaDup.desktop
    environment:
24
      PATH: $SNAP/bin:$PATH
25
      PYTHONPATH: $SNAP/lib/python3.6/site-packages:$SNAP/usr/lib/python3/dist-packages
26
      XDG_DATA_DIRS: $SNAP/share:$XDG_DATA_DIRS
27
  monitor:
28
    command: desktop-launch $SNAP/bin/monitor.wrapper
29 30 31 32 33
    environment:
      PATH: /snap/bin:$PATH
      XDG_DATA_DIRS: $SNAP/share:$XDG_DATA_DIRS
    passthrough:
      autostart: org.gnome.DejaDup.Monitor.desktop
34 35 36
  duplicity:
    command: bin/duplicity
    environment:
37
      PYTHONPATH: $SNAP/lib/python3.6/site-packages:$SNAP/usr/lib/python3/dist-packages
38 39

parts:
40 41
  dump:
    plugin: dump
Michael Terry's avatar
Michael Terry committed
42
    source: ./snap/local
43

44
  duplicity:
Michael Terry's avatar
Michael Terry committed
45 46
    after:
      - dump
47
    plugin: python
48
    python-version: python3
49
    source: https://launchpad.net/duplicity/0.8-series/0.8.01/+download/duplicity-0.8.01.tar.gz
50
    source-type: tar
51
    python-packages:
52
      - cffi==1.11.5  # gets pulled in by pyrax, and we need to lock to same version as Ubuntu ships
53
      - pyrax  # not packaged in Ubuntu
54
      - PyDrive  # not packaged in Ubuntu
55
    build-packages:
56
      - ieee-data  # python-netaddr links to this, but does not depend on it
57
      - libffi-dev
58 59 60
      - librsync-dev
    stage-packages:
      - librsync1
61 62 63 64 65
      - python3-boto
      - python3-gi
      - python3-swiftclient
    override-prime: |
      snapcraftctl prime
66 67
      patch -p0 < python3.patch
      rm python3.patch
68 69 70 71 72 73 74 75 76 77 78

  deja-dup:
    plugin: meson
    source: .
    source-type: git
    meson-parameters:
      - --prefix=/snap/deja-dup/current
    organize:
      snap/deja-dup/current: .
    build-packages:
      - appstream-util
79
      - dbus
80
      - desktop-file-utils
81
      - gettext
82 83 84 85 86 87
      - itstool
      - libglib2.0-bin
      - libglib2.0-dev
      - libgoa-1.0-dev
      - libgpg-error-dev
      - libgtk-3-dev
88
      - libjson-glib-dev
89
      - libsecret-1-dev
90
      - libsoup2.4-dev
91 92
      - valac
    stage-packages:
93
      - gvfs-backends
94 95
      - libgoa-1.0-0b
      - libgtk-3-0
96
      - libjson-glib-1.0-0
97
      - libsecret-1-0
98
      - libsoup2.4-1
99 100 101 102
    override-prime: |
      snapcraftctl prime
      sed -i 's|Icon=.*|Icon=/share/icons/hicolor/scalable/apps/org.gnome.DejaDup.svg|' share/applications/org.gnome.DejaDup.desktop
      glib-compile-schemas share/glib-2.0/schemas
103

104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
  desktop-gtk3:
    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
    source-subdir: gtk
    plugin: make
    make-parameters:
      - FLAVOR=gtk3
    build-packages:
      - libgtk-3-dev
    stage-packages:
      - libxkbcommon0  # XKB_CONFIG_ROOT
      - ttf-ubuntu-font-family
      - dmz-cursor-theme
      - light-themes
      - adwaita-icon-theme
      - gnome-themes-standard
      - shared-mime-info
      - libgtk-3-0
      - libgdk-pixbuf2.0-0
      - libglib2.0-bin
      - libgtk-3-bin
      - unity-gtk3-module
      - libappindicator3-1
      - locales-all
      - xdg-user-dirs
      - ibus-gtk3
      - libibus-1.0-5