name: translines
title: TransLines
version: '1.4.0'
summary: Enjoyable real-time metro building game.
description: |
  Features:
  * Supported 9 metro lines with different colors
  * Supported 12 metro stations shapes
  * Each week a player gets new train
  * Passengers with specific shape travel to the station with same shape
  * Tracks can be re-positioned and extended on both ends
  * New random stations appear continuously
  * Dark mode
  * Full screen mode
  * Multi-language support (English, Czech, French, German)
  * Career support with playable cities
  * Selectable weekly new improvements: line, carriage or terminal
confinement: strict
base: core22
grade: stable
icon: "Images/64x64/TransLines.png"
license: NLPL

parts:
  translines:
    plugin: nil
    source: .
    source-type: local
    build-packages:
    - fpc
    - lazarus
    - lcl
    - lcl-utils
    override-build: |
      snapcraftctl build
      lazbuild --build-mode=Release TransLines.lpi
      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/bin
      install -s -m 755 TransLines $SNAPCRAFT_PART_INSTALL/usr/bin
      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/TransLines/languages
      install -m 755 Languages/*.pot $SNAPCRAFT_PART_INSTALL/usr/share/TransLines/languages
      install -m 755 Languages/*.po $SNAPCRAFT_PART_INSTALL/usr/share/TransLines/languages
      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/applications
      install -m 755 Install/snap/local/TransLines.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications
      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps
      install -m 644 Images/64x64/TransLines.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps
    stage:
    - usr
    - usr/bin
    - usr/share/TransLines
    - usr/share/applications/TransLines.desktop
    - usr/share/pixmaps
    stage-packages:
    # Autodetected dependencies
    - libatk1.0-0
    - libcairo2
    - libdatrie1
    - libfontconfig1
    - libfreetype6
    - libfribidi0
    - libgdk-pixbuf2.0-0
    - libgraphite2-3
    - libgtk2.0-0
    - libharfbuzz0b
    - libpango-1.0-0
    - libpangocairo-1.0-0
    - libpangoft2-1.0-0
    - libpixman-1-0
    - libpng16-16
    - libthai0
    - libx11-6
    - libxau6
    - libxcb-render0
    - libxcb-shm0
    - libxcb1
    - libxcomposite1
    - libxcursor1
    - libxdamage1
    - libxdmcp6
    - libxext6
    - libxfixes3
    - libxi6
    - libxinerama1
    - libxrandr2
    - libxrender1
    - libbrotli1

apps:
  translines:
    command: usr/bin/TransLines
    desktop: usr/share/applications/TransLines.desktop
    plugs:
    - desktop
    - x11

layout:
  /usr/share/TransLines:
    bind: $SNAP/usr/share/TransLines
