taskcluster/docker/firefox-snap/snapcraft.yaml.in
author Johan Lorenzo <jlorenzo@mozilla.com>
Tue, 01 Oct 2019 10:07:07 +0000
changeset 495730 6eb5b0b83574a3ebc249231c3e1758ccce45a284
parent 465217 0f9e3bff55750b4764e2ddd8c58e10c16e7f6865
child 503859 606408df5b4d712c7bf4e80621dd145f1cd82940
permissions -rw-r--r--
Bug 1460347 - snap: enable joystick interface r=mtabara Differential Revision: https://phabricator.services.mozilla.com/D47743

name: firefox
version: @VERSION@-@BUILD_NUMBER@
summary: Mozilla Firefox web browser
description:  Firefox is a powerful, extensible web browser with support for modern web application technologies.
confinement: strict
grade: stable

apps:
  firefox:
    command: desktop-launch $SNAP/firefox
    desktop: distribution/firefox.desktop
    environment:
      DISABLE_WAYLAND: 1
      HOME: "$SNAP_USER_COMMON"
    plugs:
      - avahi-observe
      - browser-sandbox
      - camera
      - cups-control
      - desktop
      - desktop-legacy
      - gsettings
      - home
      - joystick
      - network
      - network-observe
      - opengl
      - pulseaudio
      - removable-media
      - screen-inhibit-control
      - u2f-devices
      - unity7
      - upower-observe
      - x11

plugs:
  browser-sandbox:
    interface: browser-support
    allow-sandbox: true

parts:
  desktop-gtk3:
    source-commit: 6a600b00773e8e4624aa12ee1f8e013ba9f2fc03
  firefox:
    plugin: dump
    source: source
    stage-packages:
      - libxt6
      - libdbus-glib-1-2
      - libasound2
      - libpulse0
      - libgl1-mesa-dri
      - libgl1-mesa-glx
      - libmirclient9
      - desktop-file-utils
      - ffmpeg
      - libc-bin
      - locales-all
      - libcurl3-gnutls
    after: [desktop-gtk3]

  xdg-open:
    after: [firefox]
    plugin: nil
    source: .
    install: |
      set -eux
      mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/applications
      install -m 644 mimeapps.list $SNAPCRAFT_PART_INSTALL/usr/share/applications
      update-desktop-database -v $SNAPCRAFT_PART_INSTALL/usr/share/applications
    build-packages:
      - desktop-file-utils
    build-attributes: [no-system-libraries]

  shared-mime-info:
    after: [xdg-open]
    plugin: nil
    stage-packages:
      - shared-mime-info
    build-attributes: [no-system-libraries]
    install: |
      set -eux
      update-mime-database $SNAPCRAFT_PART_INSTALL/usr/share/mime