
  name: v4l2camera
  version: git
  summary: Web interface to V4L2
  description: |
    This is a Web interface to V4L2, the http server use civetweb. 

  grade: stable 
  confinement: strict
  base: core22

  parts:
    ui:
      plugin: npm
      npm-node-version: 16.17.1
      npm-include-node: true
      source: vuejs
  
    v4l2web:
      plugin: make
      source: .
      build-packages:
        - g++
        - make
        - cmake
        - pkg-config
        - libjpeg-dev
        - libssl-dev
      stage-packages:
        - libjpeg8
        - libssl3
      build-environment:
        - PATH: $SNAPCRAFT_PART_INSTALL/../../ui/install/bin:$PATH       

  apps:
    v4l2web:
      command: bin/v4l2camera -p $SNAP/share/v4l2camera
      daemon: simple   
      plugs: [network-bind, camera, alsa]
