edouard@79: name: beremiz edouard@79: version: '1.3-beta2' edouard@79: summary: Beremiz edouard@79: description: | edouard@79: Beremiz is an integrated development environment for machine automation. It is Free Software, conforming to IEC-61131 among other standards. 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@79: 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@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: # libs reclaimed by snapcraft at the end of wxPython build edouard@79: # TODO: test if still necessary since using "extensions: [gnome-3-38]" edouard@79: - libgtk-3-0 edouard@79: - libegl1 edouard@79: - libgl1 edouard@79: - libsm6 edouard@79: - libxtst6 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@79: # Strangely, not anymore when snap is executed. edouard@79: mkdir $SNAPCRAFT_PART_INSTALL/usr/lib/python2.7/site-packages edouard@79: PYTHONPATH=$SNAPCRAFT_PART_INSTALL/usr/lib/python2.7/site-packages $SNAPCRAFT_PART_INSTALL/usr/bin/python2 $SNAPCRAFT_PART_SRC/setup.py install --prefix $SNAPCRAFT_PART_INSTALL/usr edouard@79: PYTHONPATH=$SNAPCRAFT_PART_INSTALL/usr/lib/python2.7/site-packages $SNAPCRAFT_PART_INSTALL/usr/bin/pip install \ edouard@79: lxml \ edouard@79: future \ edouard@79: matplotlib \ edouard@79: zeroconf2 \ edouard@79: enum34 \ edouard@79: pyro \ edouard@79: sslpsk \ edouard@79: posix_spawn \ edouard@79: twisted \ edouard@79: nevow \ edouard@79: autobahn \ edouard@79: click \ edouard@79: opcua \ 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: 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@79: 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@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@79: environment: edouard@79: SYSROOT: $SNAP edouard@79: command: usr/bin/python2 $SNAP/beremiz/Beremiz_cli.py edouard@79: