name: gedit adopt-info: gedit grade: stable # must be 'stable' to release into candidate/stable channels confinement: strict base: core22 layout: /usr/lib/$CRAFT_ARCH_TRIPLET/libpeas-1.0: symlink: $SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET/libpeas-1.0 /usr/lib/$CRAFT_ARCH_TRIPLET/gedit: symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/gedit /usr/lib/$CRAFT_ARCH_TRIPLET/peas-demo: symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/peas-demo /usr/share/gedit: symlink: $SNAP/usr/share/gedit slots: # for GtkApplication registration gedit: interface: dbus bus: session name: org.gnome.gedit apps: gedit: command: usr/bin/gedit extensions: [gnome] plugs: - avahi-observe - cups-control - home - network - mount-observe - removable-media common-id: org.gnome.gedit.desktop environment: GI_TYPELIB_PATH: $SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/gedit/girepository-1.0:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/girepository-1.0:$SNAP/gnome-platform/usr/lib/girepository-1.0:$SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET/girepository-1.0 parts: gtksourceview: source: https://gitlab.gnome.org/GNOME/gtksourceview.git source-tag: '4.8.4' # ext:updatesnap # version-format: # lower-than: '5' # no-9x-revisions: true source-depth: 1 plugin: meson meson-parameters: - --prefix=/usr - --buildtype=release build-packages: - gettext - libxml2-dev - gobject-introspection build-environment: - PYTHONPATH: /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/gobject-introspection${PYTHONPATH:+:$PYTHONPATH} override-pull: | set -eux craftctl default sed -i 's#Werror=missing-include-dirs#Wmissing-include-dirs#g' meson.build amtk: # ext:updatesnap # version-format: # allow-neither-tag-nor-branch: true source: https://github.com/gedit-technology/libgedit-amtk.git source-depth: 1 source-type: git # ext:updatesnap # version-format: # allow-neither-tag-nor-branch: true plugin: meson meson-parameters: - --prefix=/usr - -Dgtk_doc=false gedit-gtksourceview: # ext:updatesnap # version-format: # allow-neither-tag-nor-branch: true source: https://gedit-technology.net/tarballs/libgedit-gtksourceview/libgedit-gtksourceview-299.0.4.tar.xz plugin: meson after: [gtksourceview] meson-parameters: - --prefix=/usr - -Dgtk_doc=false - --buildtype=release build-environment: - M4PATH: /snap/gnome-42-2204-sdk/current/usr/lib/glibmm-2.4 - PKG_CONFIG_PATH: $CRAFT_STAGE/usr/lib/pkgconfig:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} build-packages: - gtk-doc-tools - ninja-build - meson tepl: after: [ gedit-gtksourceview, amtk ] source: https://gitlab.gnome.org/swilmet/tepl.git source-depth: 1 source-tag: '6.8.0' plugin: meson meson-parameters: - --prefix=/usr - -Dgtk_doc=false #override-build: | # set -ex # craftctl default gedit: after: [ gedit-gtksourceview, amtk, tepl ] source: https://gitlab.gnome.org/GNOME/gedit.git source-tag: '46.1' source-depth: 1 source-type: git parse-info: [usr/share/metainfo/org.gnome.gedit.appdata.xml] plugin: meson meson-parameters: - --prefix=/usr - --buildtype=release - -Dvala_args="--vapidir=$CRAFT_STAGE/usr/share/vala/vapi" build-environment: - C_INCLUDE_PATH: $CRAFT_STAGE/usr/include/gtksourceview-4 - PYTHONPATH: /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu/gobject-introspection${PYTHONPATH:+:$PYTHONPATH} #- PKG_CONFIG_PATH: $CRAFT_STAGE/usr/lib/pkgconfig:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} #- LD_LIBRARY_PATH: /snap/gnome-42-2204-sdk/current/usr/lib:/snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${PKG_LIBRARY_PATH:+:$PKG_LIBRARY_PATH} override-pull: | craftctl default patch -p1 < $CRAFT_PROJECT_DIR/patches/gedit.diff override-build: | sed -i.bak -e 's|Icon=org.gnome.gedit$|Icon=${SNAP}/meta/gui/org.gnome.gedit.svg|g' $CRAFT_PART_SRC/data/org.gnome.gedit.desktop.in sed -i.bak -e "s|symlink_media: true|symlink_media: false|g" $CRAFT_PART_SRC/help/meson.build craftctl default mkdir -p $CRAFT_PART_INSTALL/meta/gui/ cp $CRAFT_PART_SRC/data/icons/org.gnome.gedit.svg $CRAFT_PART_INSTALL/meta/gui/ gedit-plugins: after: [ gedit ] source: https://gitlab.gnome.org/GNOME/gedit-plugins.git source-tag: '45.0' # ext:updatesnap # version-format: # lower-than: '46' # no-9x-revisions: true source-depth: 1 source-type: git plugin: meson meson-parameters: - --prefix=/snap/gedit/current/usr - -Dplugin_bookmarks=true - -Dplugin_bracketcompletion=true - -Dplugin_charmap=true - -Dplugin_codecomment=true - -Dplugin_colorpicker=true - -Dplugin_drawspaces=true - -Dplugin_git=true - -Dplugin_joinlines=true - -Dplugin_multiedit=false - -Dplugin_smartspaces=true - -Dplugin_terminal=true - -Dplugin_textsize=true - -Dplugin_wordcompletion=true - --buildtype=release organize: snap/gedit/current/usr: usr build-environment: - C_INCLUDE_PATH: $CRAFT_STAGE/usr/include:$CRAFT_STAGE/usr/include/gedit-41:$CRAFT_STAGE/usr/include/gtksourceview-4 - LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/gedit - PKG_CONFIG_PATH: $PKG_CONFIG_PATH:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig build-packages: - libgit2-glib-1.0-dev - libgucharmap-2-90-dev - libvte-2.91-dev libraries: plugin: nil stage-packages: - libuchardet0 - libfribidi0 prime: - usr/lib/*/libuchardet* - usr/lib/*/libfribidi* # Find files provided by the base and platform snap and ensure they aren't # duplicated in this snap cleanup: after: [gedit-plugins, libraries] plugin: nil build-snaps: [core22, gtk-common-themes, gnome-42-2204] override-prime: | set -eux for snap in "core22" "gtk-common-themes" "gnome-42-2204"; do cd "/snap/$snap/current" && find . -type f,l -name *.so.* -exec rm -f "$CRAFT_PRIME/{}" \; done