%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/snap-store/1216/snap/
Upload File :
Create Path :
Current File : //snap/snap-store/1216/snap/snapcraft.yaml

name: snap-store
adopt-info: snap-store
summary: Snap Store
description: |
  Snap Store allows you to find and install new applications and remove
  existing installed applications.

  Snap Store showcases featured and popular applications with useful
  descriptions and multiple screenshots per application.
  Applications can be found either through browsing the list of categories
  or by searching.

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict
base: core22

layout:
  /usr/pkg/share/xml/iso-codes:
    symlink: $SNAP/gnome-platform/usr/share/xml/iso-codes
  /etc/PackageKit:
    bind: $SNAP/etc/PackageKit

plugs:
  hostfs-usr-share-applications:
    interface: system-files
    read:
    - /var/lib/snapd/hostfs/usr/share/applications
  dot-snap-auth-json:
    interface: personal-files
    read:
    - $HOME/.snap/auth.json

slots:
  # for GtkApplication registration
  snap-store:
    interface: dbus
    bus: session
    name: io.snapcraft.Store
  packagekit-svc:  # name that is used with 'snap connect' on plugs side
    bus: session
    interface: dbus
    name: org.freedesktop.PackageKit

environment:
  LD_LIBRARY_PATH: $SNAP/lib:$SNAP/usr/lib:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET:$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH
  GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas
  GIO_EXTRA_MODULES: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/gio/modules
  GS_SELF_TEST_OS_RELEASE_FILENAME: /var/lib/snapd/hostfs/etc/os-release

apps:
  snap-store:
    extensions: [gnome]
    command: usr/bin/snap-store
    desktop: usr/share/applications/io.snapcraft.Store.desktop
    plugs:
      - appstream-metadata
      - fwupd
      - gsettings
      - password-manager-service
      - network
      - network-manager
      - network-status
      - packagekit-control
      - snapd-control
      - system-observe
      - upower-observe
      - dot-snap-auth-json
      - hostfs-usr-share-applications
    environment:
      GNOTIFICATION_BACKEND: freedesktop
  ubuntu-software:
    extensions: [gnome]
    command-chain: [autostart/setup-autostart]
    command: usr/bin/snap-store
    desktop: usr/share/ubuntu/applications/org.gnome.Software.desktop
    autostart: ubuntu-software-service.desktop
    plugs:
      - appstream-metadata
      - fwupd
      - gsettings
      - password-manager-service
      - network
      - network-manager
      - network-status
      - packagekit-control
      - snapd-control
      - system-observe
      - upower-observe
      - dot-snap-auth-json
      - hostfs-usr-share-applications
    environment:
      GNOTIFICATION_BACKEND: freedesktop
  ubuntu-software-local-file:
    extensions: [gnome]
    command: usr/bin/snap-store
    desktop: usr/share/applications/gnome-software-local-file.desktop
    plugs:
      - appstream-metadata
      - fwupd
      - gsettings
      - password-manager-service
      - network
      - network-manager
      - network-status
      - packagekit-control
      - snapd-control
      - system-observe
      - upower-observe
      - dot-snap-auth-json
      - hostfs-usr-share-applications
    environment:
      GNOTIFICATION_BACKEND: freedesktop

parts:
  snapd-glib:
    source: https://github.com/snapcore/snapd-glib
    source-type: git
    source-tag: '1.60'
    plugin: meson
    meson-parameters:
      - --prefix=/usr
      - --buildtype=release
      - -Ddocs=false
      - -Dintrospection=false
      - -Dvala-bindings=false
      - -Dqt-bindings=false
      - -Dqml-bindings=false
    build-packages:
      - libpolkit-gobject-1-dev
    prime:
      - -usr/include
      - -usr/lib/pkgconfig
      - -usr/lib/*/pkgconfig
      - -usr/share/pkgconfig

  autostart:
    source: ${CRAFT_PROJECT_DIR}/snap/local/autostart
    plugin: dump
    stage: [ "*" ]
    prime: [ "*" ]

  launchpad-translations:
    source: ${CRAFT_PROJECT_DIR}/snap/local/launchpad-export.tar.gz
    plugin: dump
    organize:
      '*': po_files/
    stage: [ "*" ]
    prime: [ "*"]

  xmlb:
    source: https://github.com/hughsie/libxmlb
    source-type: git
    plugin: meson
    source-tag: "0.3.9"
    meson-parameters:
      - --prefix=/usr
      - -Dgtkdoc=false
      - -Dintrospection=false
    override-pull: |
      craftctl default
      for i in $CRAFT_PROJECT_DIR/patches/*.diff; do
        patch -p1 < $i
      done
    prime:
      - "*"
      - -usr/include/libxmlb-2
      - -usr/libexec/installed-tests/libxmlb
      - -usr/share/installed-tests/libxmlb
      - -usr/share/doc/libxmlb2

  fwupd:
    after: [ xmlb ]
    plugin: meson
    meson-parameters:
      - --prefix=/usr
      - --buildtype=release
      - -Dtests=false
      - -Dbuild=library
      - -Dintrospection=false
      - -Ddocs=none
      - -Dman=false
      - -Dgusb=false
      - -Dlibarchive=false
      - -Dcurl=true
      - -Defi_binary=false
      - -Dplugin_logitech_bulkcontroller=false #workaround undefined plugin_deps
      - -Dplugin_msr=false
      - "-Dlibjcat:man=false"
      - "-Dlibjcat:gtkdoc=false"
      - "-Dlibjcat:introspection=false"
      - "-Dlibjcat:pkcs7=false"
      - "-Dlibjcat:tests=false"
      - "-Dgcab:docs=false"
    source: https://github.com/fwupd/fwupd.git
    source-type: git
    source-tag: '1.7.5'
    stage-packages:
      - libassuan0
      - libgpgme11
      - libyaml-0-2
      - libjcat1
    build-packages:
      - gcab
      - libgcab-dev
      - libjcat-dev
      - libgpgme11-dev
      - libsqlite3-dev
      - libyaml-dev
      - locales
      - uuid-dev
    prime:
      # we explicitly don't want /usr/bin/gpgconf
      # this will cause gpgme to error finding it
      # but that also avoids trying to use non-existent
      # /usr/bin/gpg2
      - -usr/bin
      - -usr/sbin
      - -usr/share/man
      - -usr/share/GConf
      - -etc/X11
      - -etc/ldap
      - -etc/logcheck
      - -usr/lib/dconf
      - -usr/lib/gcc
      - -usr/lib/glib-networking
      - -usr/lib/gnupg2
      - -usr/lib/sasl2
      - -usr/lib/systemd
      - -usr/lib/*/audit
      - -usr/share/glib-2.0/schemas
      - -usr/share/X11
      - -include
      - -lib/udev
      - -lib/*/pkgconfig
      - -usr/share/lintian
      - -usr/share/pkgconfig
      - -usr/share/installed-tests
      - -usr/share/polkit-1
      - -usr/share/vala
      - -usr/share/doc
      - -usr/share/gnupg2
      - -usr/share/info
      - -usr/share/gir-1.0
      - -usr/share/upstart
      - -usr/lib/*/pkgconfig
      - -usr/lib/*/libglib*
      - -usr/lib/*/libyaml*
      # we don't want system gnutls leaking in
      - -usr/lib/*/libgnutls*

  snap-store:
    after: [ snapd-glib, autostart, launchpad-translations, fwupd, xmlb ]
    source: .
    plugin: meson
    meson-parameters:
      - --prefix=/snap/snap-store/current/usr
      - --buildtype=release
      - -Dpackagekit=true
      - -Dpackagekit_autoremove=true
      - -Drpm_ostree=false
      - -Dsnap=true
      - -Dfwupd=true
      - -Dflatpak=false
      - -Dgspell=true
      - -Dtests=false
      - -Dgtk_doc=false
      - -Dvalgrind=false
      - -Dmalcontent=false
      - "-Dappstream:gir=false"
      - "-Dappstream:stemming=true"
      - "-Dappstream:apt-support=true"
    build-environment:
      - LD_LIBRARY_PATH: ${CRAFT_PART_BUILD}/subprojects/appstream/src:${LD_LIBRARY_PATH}
    organize:
      snap/snap-store/current/usr: usr
    override-pull: |
      craftctl default
      git config --global --add safe.directory $CRAFT_PART_SRC
      craftctl set version=$(git describe --tags --abbrev=7)
      sed -i.bak -e 's|Exec=gnome-software|Exec=snap-store.ubuntu-desktop|g' src/gnome-software-local-file.desktop.in
      echo StartupWMClass=snap-store >> src/gnome-software-local-file.desktop.in

    override-stage: |
      craftctl default
      # Cleanup old fuzzy strings before we try to msgmerge
      sed -i '/^#~/d' $CRAFT_PART_SRC/po/*.po
      # Import translations exported from Launchpad
      mkdir $CRAFT_STAGE/po_files/renamed
      cp $CRAFT_STAGE/po_files/*.po $CRAFT_STAGE/po_files/renamed/
      rename s/snap-store-// $CRAFT_STAGE/po_files/renamed/*.po
      for i in `ls $CRAFT_STAGE/po_files/*.po`;
      do
        file=`basename $i`
        if [ -f $CRAFT_PART_SRC/po/$file ];
        then
          echo "$CRAFT_PART_SRC/po/$file exists, merging"
          msgmerge -U $CRAFT_PART_SRC/po/$file $CRAFT_STAGE/po_files/$file
        else
          cp $CRAFT_STAGE/po_files/$file $CRAFT_PART_SRC/po/$file
        fi
      done
      for i in $CRAFT_PART_SRC/po/*.po; do basename -s .po $i; done > $CRAFT_PART_SRC/po/LINGUAS
      rm -rf $CRAFT_STAGE/po_files/renamed

    override-build: |
      mkdir -p $CRAFT_PART_INSTALL/autostart/
      cp -p $CRAFT_STAGE/setup-autostart $CRAFT_PART_INSTALL/autostart/
      cp -p $CRAFT_STAGE/ubuntu-software-service.desktop $CRAFT_PART_INSTALL/autostart/
      craftctl default

    override-prime: |
      craftctl default
      rm -f usr/bin/snap-store
      mv usr/bin/gnome-software usr/bin/snap-store
      rm -f usr/bin/gnome-software-editor
      rm -rf $CRAFT_PRIME/po_files
      rm -rf $CRAFT_PRIME/usr/share/icons
    build-packages:
      - docbook-xsl
      - gsettings-desktop-schemas-dev
      - libgoa-1.0-dev
      - libgspell-1-dev
      - libgudev-1.0-dev
      - liblmdb-dev
      - liblzma-dev
      - liboauth-dev
      - libpackagekit-glib2-dev
      - libpolkit-gobject-1-dev
      - libsecret-1-dev
      - libstemmer-dev
      - libsqlite3-dev
      - libxml2-utils
      - valgrind
      - xsltproc
      - rename
      - gperf
    stage-packages:
      - libsecret-1-0
      - libgspell-1-2
      - libgudev-1.0-0
      - liblzma5
      - liboauth0
      - libpackagekit-glib2-18
      - libpolkit-gobject-1-0
      - ubuntu-settings
      - libarchive13
      - packagekit-tools # FIXME include pkcon for testing purposes
    stage:
      - "*"
      - -usr/lib/*/libxmlb.so
      - -usr/lib/*/libxmlb.so.2.0.0
      - -usr/lib/*/libxmlb.so.2
    prime:
      - -usr/include
      - -usr/lib/pkgconfig
      - -usr/lib/*/pkgconfig
      - -usr/share/pkgconfig
      - -usr/lib/aspell
      - -usr/lib/*/enchant
      - -usr/lib/*/gdk-pixbuf-2.0
      - -usr/lib/*/gio
      - -usr/lib/*/gtk-3.0
      - -usr/lib/*/libat*
      - -usr/lib/*/libgio*
      - -usr/lib/*/libglib*
      - -usr/lib/*/libgtk*
      - -usr/lib/*/libgdk*
      - -usr/lib/*/libharfbuzz*
      - -usr/lib/*/libpango*
      - -usr/lib/*/libwayland*
      - -usr/lib/*/libappstream*

  # Find files provided by the base and platform snap and ensure they aren't
  # duplicated in this snap
  cleanup:
    after: [snap-store]
    plugin: nil
    build-snaps: [core22, gtk-common-themes, gnome-42-2204]
    override-prime: |
      set -eux
      # libxmlb is already included in the SDK, but is buggy, so we must preserve the one compiled here
      rm -rf $CRAFT_PRIME/tmplibrary
      mkdir $CRAFT_PRIME/tmplibrary
      cp -a $CRAFT_PRIME/usr/lib/$CRAFT_ARCH_TRIPLET/libxmlb* $CRAFT_PRIME/tmplibrary/
      $CRAFT_PROJECT_DIR/clean_snap_duplicates.py core22 gtk-common-themes gnome-42-2204
      cp -a $CRAFT_PRIME/tmplibrary/* $CRAFT_PRIME/usr/lib/$CRAFT_ARCH_TRIPLET/
      rm -rf $CRAFT_PRIME/tmplibrary

Zerion Mini Shell 1.0