id: im.pidgin.Pidgin3
runtime: org.gnome.Platform
runtime-version: '47'
branch: default
sdk: org.gnome.Sdk
command: pidgin3
separate-locales: false
tags:
  - dev
add-extensions:
  im.pidgin.Purple3.Plugin:
    directory: plugins
    version: default
    add-ld-path: lib
    merge-dirs: purple-3
    no-autodownload: true
    autodelete: true
    subdirectories: true
  im.pidgin.Pidgin3.Plugin:
    directory: plugins
    version: default
    add-ld-path: lib
    merge-dirs: pidgin-3
    no-autodownload: true
    autodelete: true
    subdirectories: true
modules:
  - name: mercurial
    buildsystem: simple
    build-commands:
      - make PREFIX=/app install-bin
    sources:
      - type: archive
        url: https://www.mercurial-scm.org/release/mercurial-6.9.tar.gz
        sha256: 629604293df2be8171ec856bf4f8b4faa8e4305af13607dce0f89f74132836d6
  - name: libidn
    buildsystem: autotools
    cleanup:
      - /lib/*.la
    config-opts:
      - "--disable-static"
    sources:
      - type: archive
        url: https://ftp.gnu.org/gnu/libidn/libidn-1.42.tar.gz
        sha256: d6c199dcd806e4fe279360cb4b08349a0d39560ed548ffd1ccadda8cdecb4723
  - name: birb
    buildsystem: meson
    config-opts:
      - "-Ddoc=false"
      - "--wrap-mode=nofallback"
    sources:
      - type: archive
        archive-type: tar-xz
        url: https://sourceforge.net/projects/pidgin/files/birb/0.2.0/birb-0.2.0-dev.tar.xz/download
        sha256: b4c24426a6c9aeb959a7a8d60d31def8e90cfb17680c90a0cc54d582789ecc38
  - name: hasl
    buildsystem: meson
    config-opts:
      - "-Ddoc=false"
      - "--wrap-mode=nofallback"
    sources:
      - type: archive
        archive-type: tar-xz
        url: https://sourceforge.net/projects/pidgin/files/hasl/0.3.2/hasl-0.3.2.tar.xz/download
        sha256: d67ba1ce29c6f1fcdc69dadae0bafe12cf60b9e8be80bb67b5f4f9e0db44c427
  - name: ibis
    buildsystem: meson
    config-opts:
      - "-Ddoc=false"
      - "--wrap-mode=nofallback"
    sources:
      - type: archive
        archive-type: tar-xz
        url: https://sourceforge.net/projects/pidgin/files/ibis/0.10.1/ibis-0.10.1.tar.xz/download
        sha256: 3c6a43a5cbbf80efa91e90e5b62e19e37258e788734feee76ab6fb6b7e13bb8c
  - name: xeme
    buildsystem: meson
    config-opts:
      - "-Ddoc=false"
      - "--wrap-mode=nofallback"
    sources:
      - type: archive
        archive-type: tar-gzip
        url: https://keep.imfreedom.org/xeme/xeme/archive/5d0707ab10a2.tar.gz
        sha256: eabb0f88fdc54775e9aab63d277d0d0cf54c456ee09580d45bd516d1117088da
  - name: gplugin
    buildsystem: meson
    config-opts:
      - "-Ddoc=false"
      - "-Dlua=false"
      - "-Dpython3=false"
      - "--wrap-mode=nofallback"
    sources:
      - type: archive
        archive-type: tar-xz
        url: https://sourceforge.net/projects/pidgin/files/gplugin/0.44.2/gplugin-0.44.2.tar.xz/download
        sha256: aea244e1add9628b50ec042c54cf93803f4577f8f142678f09b91fd4c0b20f72
  - name: pidgin3
    buildsystem: meson
    config-opts:
      - "-Ddoc=false"
      - "--wrap-mode=nofallback"
    sources:
      - type: dir
        path: .
    post-install:
      - install -d /app/plugins
      - install -d /app/plugins/pidgin-3
      - install -d /app/plugins/purple-3
finish-args:
  # X11 + XShm access
  - "--share=ipc"
  - "--socket=fallback-x11"
  # Wayland access
  - "--socket=wayland"
  # GPU acceleration if needed
  - "--device=dri"
  # Needs to talk to the network:
  - "--share=network"
  # Audio
  - "--socket=pulseaudio"
  # Notifications (purple-toast)
  - "--talk-name=org.freedesktop.Notifications"
  # Accessibility
  - "--talk-name=org.a11y.Bus"
  # libsecret plugin
  - "--talk-name=org.freedesktop.secrets"
  # kwallet plugin
  - "--talk-name=org.kde.kwalletd5"
  - "--talk-name=org.kde.kwalletd6"
  # Bonjour
  - "--system-talk-name=org.freedesktop.Avahi"
  # Plugin Paths
  - "--env=PURPLE_PLUGIN_PATH=/app/plugins/purple-3"
  - "--env=PIDGIN_PLUGIN_PATH=/app/plugins/pidgin-3"
