name: vcard-studio
title: vCard Studio
version: '1.0.0'
summary: A contact management application with support for vCard file format.
description: |
  A tool for work with contacts stored in vCard format (.vcf).
  
  Features:
  * Add, Edit, Remove contacts
  * Merge files together
  * Find duplicate contacts
confinement: strict
base: core20
grade: stable
icon: "Images/vCard Studio.png"
license: NLPL

parts:
  vcard-studio:
    plugin: nil
    source: .
    source-type: local
    build-packages: 
    - fpc
    - lazarus
    - lcl
    - lcl-utils
    override-build: |
      snapcraftctl build
      lazbuild --build-mode=Release vCardStudio.lpi
      ROOT=/root/parts/vcard-studio/install
      install -d -m 755 $ROOT/usr/bin
      install -s -m 755 vCardStudio $ROOT/usr/bin/vCardStudio
      install -d -m 755 $ROOT/usr/share/vCardStudio/Languages
      install -m 755 Languages/vCardStudio.po $ROOT/usr/share/vCardStudio/Languages
      install -m 755 Languages/vCardStudio.cs.po $ROOT/usr/share/vCardStudio/Languages
      install -m 755 Languages/UFormAbout.po $ROOT/usr/share/vCardStudio/Languages
      install -m 755 Languages/UFormAbout.cs.po $ROOT/usr/share/vCardStudio/Languages
      install -d -m 755 $ROOT/usr/share/applications
      install -m 755 Install/snap/local/vCardStudio.desktop $ROOT/usr/share/applications
      install -d -m 755 $ROOT/usr/share/pixmaps
      install -m 755 Images/vCard\ Studio.png $ROOT/usr/share/pixmaps
    stage:
      - etc
      - usr
      - usr/bin
      - usr/share/vCardStudio
      - usr/share/applications/vCardStudio.desktop
      - usr/share/pixmaps
    stage-packages:
      - 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

apps:
  vcard-studio:
    command: usr/bin/vCardStudio
    desktop: usr/share/applications/vCardStudio.desktop    
    plugs:
      - desktop
      - x11
      - home

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