edouard@79: name: beremiz edouard@79: version: '1.3-beta2' edouard@79: summary: Beremiz edouard@79: description: | edouard@81: Beremiz is Free and Open Source PLC. It brings Free Software IDE (GPL) and Runtime (LGPL) for machine automation, conforming to IEC-61131. edouard@81: # TODO icon edouard@81: edouard@79: edouard@79: grade: devel edouard@79: confinement: devmode edouard@79: base: core20 edouard@79: edouard@79: parts: edouard@79: edouard@79: python-deps: edouard@79: # This part provides all python2 dependencies, including interpreter edouard@79: # More particularily, it builds latest PIP supporting python2 from git edouard@79: # and uses it to collect and buid other Beremiz dependencies. edouard@81: # edouard@79: # rational: edouard@79: # - python plugin doesn't support python2 anymore on core20+ edouard@79: # - attempts to get python2+pip+virtualenv in a core20 based snap failed edouard@81: edouard@79: plugin: nil edouard@79: source: https://github.com/pypa/pip/archive/refs/tags/20.3.4.tar.gz edouard@79: build-packages: edouard@79: - libssl-dev edouard@79: - libgtk-3-dev edouard@79: - libgl1-mesa-dev edouard@79: - libglu1-mesa-dev edouard@79: - python2-dev edouard@79: edouard@79: stage-packages: edouard@79: - python2 edouard@79: - python-setuptools edouard@79: edouard@79: override-build: | edouard@79: # For some reasons site-packages needs to be created and edouard@79: # added to PYTHONPATH during PIP (own) build. edouard@81: # Apparently not anymore when snap is executed. edouard@79: mkdir $SNAPCRAFT_PART_INSTALL/usr/lib/python2.7/site-packages edouard@81: PYTHONPATH=$SNAPCRAFT_PART_INSTALL/usr/lib/python2.7/site-packages \ edouard@81: $SNAPCRAFT_PART_INSTALL/usr/bin/python2 $SNAPCRAFT_PART_SRC/setup.py \ edouard@81: install --prefix $SNAPCRAFT_PART_INSTALL/usr edouard@81: PYTHONPATH=$SNAPCRAFT_PART_INSTALL/usr/lib/python2.7/site-packages \ edouard@81: $SNAPCRAFT_PART_INSTALL/usr/bin/pip install \ edouard@81: lxml \ edouard@81: future \ edouard@81: matplotlib \ edouard@81: msgpack_python \ edouard@81: u-msgpack-python \ edouard@81: zeroconf2 \ edouard@81: enum34 \ edouard@81: pyro \ edouard@81: sslpsk \ edouard@81: posix_spawn \ edouard@81: twisted \ edouard@81: nevow \ edouard@81: autobahn \ edouard@81: click \ edouard@81: opcua \ edouard@81: pycountry \ edouard@81: fonttools \ edouard@81: Brotli \ edouard@79: wxPython==4.1.1 edouard@79: edouard@79: beremiz: edouard@79: # Beremiz python source + GCC toolchain edouard@79: # source tree is expected to be just aside snap directory edouard@79: plugin: nil edouard@79: source: beremiz edouard@79: source-type: local edouard@79: stage-packages: edouard@79: - gcc edouard@79: - libc6 edouard@79: - libc6-dev edouard@79: - linux-libc-dev edouard@79: - libgcc-9-dev edouard@79: - libgcc-s1 edouard@79: override-build: | edouard@79: cp -a $SNAPCRAFT_PART_SRC $SNAPCRAFT_PART_INSTALL/beremiz edouard@79: edouard@79: matiec: edouard@79: # Matiec ST, SFC and IL compiler. edouard@79: # source tree is expected to be just aside snap directory edouard@79: plugin: nil edouard@79: source: matiec edouard@79: source-type: local edouard@79: build-packages: edouard@79: - build-essential edouard@79: - automake edouard@79: - flex edouard@79: - bison edouard@79: override-build: | edouard@79: autoreconf -i && ./configure && make edouard@79: cp -a $SNAPCRAFT_PART_BUILD $SNAPCRAFT_PART_INSTALL/matiec edouard@81: edouard@81: open62541: edouard@81: plugin: nil edouard@81: source: open62541 edouard@81: source-type: local edouard@81: build-packages: edouard@81: - build-essential edouard@81: - cmake edouard@81: override-build: | edouard@81: mkdir build && cd build && cmake .. && make edouard@81: cp -a $SNAPCRAFT_PART_BUILD $SNAPCRAFT_PART_INSTALL/open62541 edouard@79: edouard@81: inkscape: edouard@81: # CLI only, used in SVGHMI build edouard@81: # GUI fails to launch couldn't find a way edouard@81: plugin: nil edouard@81: stage-packages: edouard@81: - inkscape edouard@81: - libgtk-3-0 edouard@81: # libgtk3 needs to be explicitely given edouard@81: # otherwise wxGtk doesn't start, with this error : edouard@81: # libgtk-3.so.0: undefined symbol: pango_font_family_get_face edouard@81: # ... why ? edouard@81: edouard@79: revisiontxt: edouard@79: # Makefile generated "revisions.txt" edouard@79: plugin: nil edouard@79: source: . edouard@79: source-type: local edouard@79: override-build: | edouard@79: cp $SNAPCRAFT_PART_SRC/revisions.txt $SNAPCRAFT_PART_INSTALL edouard@79: edouard@79: apps: edouard@79: ide: edouard@81: # Launcher for the IDE edouard@79: environment: edouard@79: SYSROOT: $SNAP edouard@79: command: usr/bin/python2 $SNAP/beremiz/Beremiz.py edouard@79: extensions: [gnome-3-38] edouard@79: edouard@79: beremiz: edouard@81: # Beremiz Command Line interface edouard@79: environment: edouard@79: SYSROOT: $SNAP edouard@79: command: usr/bin/python2 $SNAP/beremiz/Beremiz_cli.py edouard@81: edouard@81: runtime: edouard@81: # Standalone runtime edouard@81: environment: edouard@81: SYSROOT: $SNAP edouard@81: command: usr/bin/python2 $SNAP/beremiz/Beremiz_service.py