Skip to content

Commit

Permalink
snap: Add browser proxy for confined browser integration (#5512)
Browse files Browse the repository at this point in the history
  • Loading branch information
LyzardKing authored and koppor committed Oct 25, 2019
1 parent f86944a commit e7c4be5
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,32 @@ license: MIT
architectures:
- build-on: amd64

apps:
jabref:
command: bin/JabRef
extensions: [gnome-3-28]
browser-proxy:
command: lib/jabrefHost.py
extensions: [gnome-3-28]

environment:
_JAVA_OPTIONS: "-Duser.home=$SNAP_USER_DATA"
plugs:
desktop:
desktop-legacy:
wayland:
unity7:
home:
opengl:
network-bind:
removable-media:
browser-extension:
interface: system-files
read:
- /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts
write:
- /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json

apps:
jabref:
command: bin/JabRef
extensions: [gnome-3-28]
environment:
_JAVA_OPTIONS: "-Duser.home=$SNAP_USER_DATA"
plugs:
- desktop
- desktop-legacy
- wayland
- unity7
- home
- opengl
- network-bind
- removable-media

parts:
jabref:
plugin: dump
Expand All @@ -47,5 +49,5 @@ parts:
override-build: |
snapcraftctl build
snapcraftctl set-version "$(cat $SNAPCRAFT_PART_INSTALL/lib/app/JabRef.cfg | grep "app.version=" | cut -d'=' -f2)"
sed -i 's|/opt/jabref/lib/jabrefHost.py|/snap/jabref/current/lib/jabrefHost.py|g' $SNAPCRAFT_PART_INSTALL/lib/org.jabref.jabref.json
sed -i 's|/opt/jabref/lib/jabrefHost.py|/snap/bin/jabref.browser-proxy|g' $SNAPCRAFT_PART_INSTALL/lib/org.jabref.jabref.json
chmod +x $SNAPCRAFT_PART_INSTALL/lib/jabrefHost.py

0 comments on commit e7c4be5

Please sign in to comment.