app-id: org.gajim.Gajim.Devel
runtime: org.gnome.Platform
runtime-version: '3.34'
sdk: org.gnome.Sdk
command: gajim-devel
tags:
  - devel
  - development
  - nightly
desktop-file-name-prefix: '(Nightly) '
rename-icon: org.gajim.Gajim
rename-desktop-file: org.gajim.Gajim.desktop
rename-appdata-file: org.gajim.Gajim.appdata.xml
finish-args:
  - --share=ipc
  - --share=network
  - --socket=fallback-x11
  - --socket=wayland
  - --socket=pulseaudio
  - --system-talk-name=org.freedesktop.GeoClue2
  - --system-talk-name=org.freedesktop.login1
  - --talk-name=org.mpris.MediaPlayer2.*
  - --talk-name=org.freedesktop.portal.Fcitx
  # Automatic status
  - --talk-name=org.gnome.Mutter.IdleMonitor
  # Keyring
  - --talk-name=org.freedesktop.secrets
  # GnuPG
  - --filesystem=~/.gnupg
  # extensions
  - --env=PYTHONPATH=/app/plugins/lib/python3.7/site-packages

add-extensions:
  org.gajim.Gajim.Devel.Plugin:
    directory: plugins
    merge-dirs: lib/python3.7/site-packages
    subdirectories: true
    no-autodownload: true
    autodelete: true

cleanup:
  - '/bin/easy*'
  - /include
  - /lib/debug
  - /lib/pkgconfig
  - /lib/python2.7
  - /share/aclocal
  - /share/doc
  - /share/gtk-doc
  - /share/man
  - '*.a'
  - '*.la'

modules:
  - name: python3-pycparser
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app .
    sources:
      - type: archive
        url: https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
        sha256: a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3

  - name: python3-cffi
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app .
    sources:
      - type: archive
        url: https://files.pythonhosted.org/packages/2d/bf/960e5a422db3ac1a5e612cb35ca436c3fc985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz
        sha256: 599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346

  - name: python3-asn1crypto
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app asn1crypto-1.2.0-py2.py3-none-any.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/6b/8c/ff300484eca90b397d919408619fae479965bdd8a1df3d6d08d58e491da5/asn1crypto-1.2.0-py2.py3-none-any.whl
        sha256: 7bb1cc02a5620b3d72da4ba070bda2f44f0e61b44dee910a302eddff802b6fb5

  - name: python3-idna
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app idna-2.8-py2.py3-none-any.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
        sha256: ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c

  - name: python3-cryptography
    buildsystem: simple
    build-commands:
      - python3 setup.py install --prefix=/app
    sources:
      - type: archive
        url: https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz
        sha256: 3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651

  - name: python3-pyopenssl
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app pyOpenSSL-19.0.0-py2.py3-none-any.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/01/c8/ceb170d81bd3941cbeb9940fc6cc2ef2ca4288d0ca8929ea4db5905d904d/pyOpenSSL-19.0.0-py2.py3-none-any.whl
        sha256: c727930ad54b10fc157015014b666f2d8b41f70c0d03e83ab67624fd3dd5d1e6

  - name: python3-dbus-python
    build-options:
      env:
        PYTHON_VERSION: '3'
    sources:
      - type: archive
        url: https://files.pythonhosted.org/packages/3f/e7/4edb582d1ffd5ac3c84188deea32e960b5c8c0fe1da56ce70224f85ce542/dbus-python-1.2.8.tar.gz
        sha256: abf12bbb765e300bf8e2a1b2f32f85949eab06998dbda127952c31cb63957b6f

  - name: python3-jeepney
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app jeepney-0.4.1-py3-none-any.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/0a/4c/ef880713a6c6d628869596703167eab2edf8e0ec2d870d1089dcb0901b81/jeepney-0.4.1-py3-none-any.whl
        sha256: f6a3f93464a0cf052f4e87da3c8b3ed1e27696758fb9739c63d3a74d9a1b6774

  - name: python3-secretstorage
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app SecretStorage-3.1.1-py3-none-any.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/82/59/cb226752e20d83598d7fdcabd7819570b0329a61db07cfbdd21b2ef546e3/SecretStorage-3.1.1-py3-none-any.whl
        sha256: 7a119fb52a88e398dbb22a4b3eb39b779bfbace7e4153b7bc6e5954d86282a8a

  - name: python3-entrypoints
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app entrypoints-0.3-py2.py3-none-any.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/ac/c6/44694103f8c221443ee6b0041f69e2740d89a25641e62fb4f2ee568f2f9c/entrypoints-0.3-py2.py3-none-any.whl
        sha256: 589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19

  - name: python3-keyring
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app keyring-19.2.0-py2.py3-none-any.whl
    cleanup:
      - /bin
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/b1/08/ad1ae7262c8146bee3be360cc766d0261037a90b44872b080a53aaed4e84/keyring-19.2.0-py2.py3-none-any.whl
        sha256: f5bb20ea6c57c2360daf0c591931c9ea0d7660a8d9e32ca84d63273f131ea605

  - name: python3-css-parser
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app css_parser-1.0.4-py3-none-any.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/py3/c/css_parser/css_parser-1.0.4-py3-none-any.whl
        sha256: 49d6906416569e715b144df97ed81a94b6dc663fbcae6d1dbf4807e7fb8367ae

  - name: python3-precis_i18n
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app precis_i18n-1.0.1-py3-none-any.whl
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/b6/ec/9abe8377d9819fc0383992aaa1b8ce263b45a2371f9f30204abf61029937/precis_i18n-1.0.1-py3-none-any.whl
        sha256: dc9f9fb0c080af9454adce9cc1ddcd718309f3a99ca05186f65e9f6b0654dcd9

  - name: gsound
    sources:
      - type: git
        url: https://gitlab.gnome.org/GNOME/gsound.git
        tag: 1.0.2
        commit: a86946b494aa32782b3f6334344d07b5c11d5219

  - name: gspell
    cleanup:
      - /bin
    sources:
      - type: archive
        url: https://download.gnome.org/sources/gspell/1.8/gspell-1.8.2.tar.xz
        sha256: bb9195c3a95bacf556d0203e9691f7489e0d3bc5ae1e5a440c89b2f2435d3ed6

  - name: python3-nbxmpp
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app .
    sources:
      - type: git
        url: https://dev.gajim.org/gajim/python-nbxmpp.git

  - name: gajim
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=/app .
      - touch /app/share/run-as-flatpak
      - echo -e '#!/bin/sh\ngajim --gapplication-app-id=org.gajim.Gajim.Devel "$@"' > /app/bin/gajim-devel
      - chmod 755 /app/bin/gajim-devel
    sources:
      - type: git
        url: https://dev.gajim.org/gajim/gajim.git
      - type: shell
        commands:
          - sed -i "s+<id>org.gajim.Gajim</id>+<id>org.gajim.Gajim.Devel</id>+" data/org.gajim.Gajim.appdata.xml.in
          - sed -i "s+<name>Gajim</name>+<name>Gajim (Nightly)</name>+" data/org.gajim.Gajim.appdata.xml.in
    post-install:
      - install -d /app/plugins
