name: big-metro
title: Big Metro
version: '1.2.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) 
confinement: strict
base: core20
grade: stable
icon: "Images/64x64/BigMetro.png"
license: NLPL

parts:
  big-metro:
    plugin: nil
    source: .
    source-type: local
    build-packages: 
    - fpc
    - lazarus
    - lcl
    - lcl-utils
    override-build: |
      snapcraftctl build
      lazbuild --build-mode=Release BigMetro.lpi
      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/bin
      install -s -m 755 BigMetro $SNAPCRAFT_PART_INSTALL/usr/bin
      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/BigMetro/languages
      install -m 755 Languages/BigMetro.po $SNAPCRAFT_PART_INSTALL/usr/share/BigMetro/languages
      install -m 755 Languages/BigMetro.cs.po $SNAPCRAFT_PART_INSTALL/usr/share/BigMetro/languages
      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/applications
      install -m 755 Install/snap/local/BigMetro.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications
      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps
      install -m 644 Images/64x64/BigMetro.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps          
    stage:
    - usr
    - usr/bin
    - usr/share/BigMetro
    - usr/share/applications/BigMetro.desktop
    - usr/share/pixmaps
    stage-packages:
    - libgtk2.0-0

apps:
  big-metro:
    command: usr/bin/BigMetro
    desktop: usr/share/applications/BigMetro.desktop    
    plugs:
    - desktop
    - x11

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