name: manuskript
version: overwritten
version-script: grep -E  "__version__.*\".*\"" "manuskript/version.py" | cut -d\" -f2
summary: Manuskript is an open-source tool for writers.
description: |
  Manuskript provides a rich environment to help writers create their first draft and then further refine and edit their masterpiece.
  With Manuskript you can:
    Grow your premise from one sentence, to a paragraph, to a full summary
    Create characters
    Conceive plots
    Construct outlines (Outline mode and/or Index cards)
    Write with focus (Distraction free mode)
    Build worlds
    Track items
    Edit and re-organize chapters and scenes
    View Story line
    Compose with fiction or non-fiction templates and writing modes
    Export to HTML, ePub, OpenDocument, DocX, PDF, and more
    Additionally Manuskript can help in many more ways with a spell checker, markdown highlighter, frequency analyzer, and automatic save in open and plain text file format.
grade: stable
confinement: strict
base: core18
icon: icons/Manuskript/manuskript.svg

apps:
  manuskript:
    command: desktop-launch $SNAP/bin/manuskript
    environment:
      # Fallback to XWayland if running in a Wayland session.
      DISABLE_WAYLAND: 1
    plugs:
    - desktop
    - desktop-legacy
    - unity7
    - wayland
    - x11
    - opengl
    - home

parts:
  desktop-qt5:
    build-packages:
    - build-essential
    - qtbase5-dev
    - dpkg-dev
    make-parameters:
    - FLAVOR=qt5
    plugin: make
    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
    source-subdir: qt
    stage-packages:
    - libxkbcommon0
    - ttf-ubuntu-font-family
    - dmz-cursor-theme
    - light-themes
    - adwaita-icon-theme
    - gnome-themes-standard
    - shared-mime-info
    - libqt5gui5
    - libgdk-pixbuf2.0-0
    - libqt5svg5
    - try:
      - appmenu-qt5
    - locales-all
    - xdg-user-dirs
    - fcitx-frontend-qt5

  manuskript:
    after: [desktop-qt5]
    plugin: dump
    source: https://github.com/olivierkes/manuskript.git
    source-type: git
    build-packages:
      - python3
      - python3-pyqt5
      - python3-pyqt5.qtwebkit
      - libqt5svg5
      - python3-lxml
      - zlib1g
      - python3-enchant
      - python3-markdown
      - pandoc
      - texlive-latex-recommended
      - texlive-fonts-recommended
      - texlive-luatex
    stage-packages:
      - python3
      - python3-pyqt5
      - python3-pyqt5.qtwebkit
      - libqt5svg5
      - python3-lxml
      - zlib1g
      - libc-bin
      - locales
      - python3-enchant
      - python3-markdown
      - pandoc
      - texlive-latex-recommended
      - texlive-fonts-recommended
      - texlive-luatex
