Commit dc88b346 authored by Jeremy Bicha's avatar Jeremy Bicha 🎹

snap: bundle gedit-plugins again

This reverts commit d15476fc.
parent 5c1324ff
Pipeline #55878 passed with stage
in 7 minutes and 30 seconds
......@@ -17,6 +17,15 @@ grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict
base: core18
passthrough:
layout:
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libpeas-1.0:
symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libpeas-1.0
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gedit:
symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gedit
/usr/share/gedit:
symlink: $SNAP/usr/share/gedit
plugs:
gnome-3-28-1804:
interface: content
......@@ -42,11 +51,6 @@ slots:
bus: session
name: org.gnome.gedit
passthrough:
layout:
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libpeas-1.0:
symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libpeas-1.0
apps:
gedit:
command: desktop-launch gedit
......@@ -65,7 +69,7 @@ apps:
desktop: usr/share/applications/org.gnome.gedit.desktop
environment:
GSETTINGS_SCHEMA_DIR: $SNAP/share/glib-2.0/schemas
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/lib/gedit
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET/gedit
parts:
desktop-gnome-platform:
......@@ -84,9 +88,9 @@ parts:
source: https://gitlab.gnome.org/GNOME/gtksourceview.git
source-type: git
plugin: autotools
configflags: [--prefix=/usr]
configflags: [--prefix=/snap/gedit/current/usr]
organize:
snap/gtksourceview/current/usr: usr
snap/gedit/current/usr: usr
build-packages:
- autoconf-archive
- gettext
......@@ -98,6 +102,11 @@ parts:
- libxml2-dev
- libxml2-utils
- valac
# meson gir overrides don't work well
override-build: |
snapcraftctl build
cp $SNAPCRAFT_PART_INSTALL/snap/gedit/current/usr/share/gir-1.0/GtkSource* /usr/share/gir-1.0
cp $SNAPCRAFT_PART_INSTALL/snap/gedit/current/usr/share/vala/vapi/gtksource* /usr/share/vala/vapi
gedit:
after: [desktop-gnome-platform, gtksourceview]
......@@ -105,18 +114,15 @@ parts:
source-type: git
plugin: meson
meson-parameters:
- --prefix=/snap/gedit/current/usr
- -Dintrospection=false
- --prefix=/usr
build-environment:
- C_INCLUDE_PATH: $SNAPCRAFT_STAGE/usr/include/gedit-3.14/
- C_INCLUDE_PATH: $SNAPCRAFT_STAGE/usr/include/gtksourceview-4
override-build: |
sed -i.bak -e 's|Icon=org.gnome.gedit$|Icon=${SNAP}/meta/gui/org.gnome.gedit.svg|g' data/org.gnome.gedit.desktop.in.in
snapcraftctl build
mkdir -p $SNAPCRAFT_PART_INSTALL/meta/gui/
cp data/org.gnome.gedit.svg $SNAPCRAFT_PART_INSTALL/meta/gui/
cp ../install/snap/gedit/current/usr/share/applications/org.gnome.gedit.desktop $SNAPCRAFT_PART_INSTALL/meta/gui/
organize:
snap/gedit/current/usr: usr
cp ../install/usr/share/applications/org.gnome.gedit.desktop $SNAPCRAFT_PART_INSTALL/meta/gui/
build-packages:
- desktop-file-utils
- gettext
......@@ -148,3 +154,47 @@ parts:
- python3-dbus
- python3-gi
- python3-gi-cairo
gedit-plugins:
after: [gedit]
source: https://gitlab.gnome.org/GNOME/gedit-plugins.git
source-type: git
plugin: autotools
# gedit's meson build uses the triplet libdir but gedit-plugin's
# autotools doesn't. They need to match.
configflags:
- --prefix=/snap/gedit/current/usr
- --libdir=/usr/lib/$SNAPCRAFT_ARCH_TRIPLET
organize:
snap/gedit/current/usr: usr
build-environment:
- C_INCLUDE_PATH: $SNAPCRAFT_STAGE/usr/include:$SNAPCRAFT_STAGE/usr/include/gedit-3.14:$SNAPCRAFT_STAGE/usr/include/gtksourceview-4
- LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gedit
- PKG_CONFIG_PATH: $PKG_CONFIG_PATH:$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig
build-packages:
- appstream
- build-essential
- gettext
- gnome-common
- itstool
- libgit2-glib-1.0-dev
- libglib2.0-dev
- libgtk-3-dev
- libgucharmap-2-90-dev
- libvte-2.91-dev
- python3
- python3-dbus
- python-dbus-dev
- python-gi-dev
- yelp-tools
# Overriding VAPIDIR in build-environment doesn't seem to work
override-build: |
sed -i.bak -e 's|--pkg\ config|--vapidir=$SNAPCRAFT_STAGE/usr/share/vala/vapi\ --pkg\ config|g' plugins/findinfiles/Makefile.am
sed -i.bak -e 's|--pkg\ config|--vapidir=$SNAPCRAFT_STAGE/usr/share/vala/vapi\ --pkg\ config|g' plugins/findinfiles/Makefile.am
snapcraftctl build
# Zeitgeist plugin isn't as useful in a Snap.
stage:
- -usr/lib/gedit/plugins/libzeitgeist.so
- -usr/lib/gedit/plugins/zeitgeist.plugin
- -usr/share/help/*/gedit/zeitgeist-dataprovider.page
- -usr/share/metainfo/gedit-zeitgeist.metainfo.xml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment