mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-01 10:50:03 +02:00
The kde-neon extension reduces our boilerplate in snapcraft.yaml and reduces the snap size considerably, as we do not need to ship any library that is already included in the kde-frameworks-5-core18 snap itself. This limits qelectrotech builds to the architectures supported by kde-frameworks-5-core18, i.e. only amd64.
107 lines
2.9 KiB
YAML
107 lines
2.9 KiB
YAML
name: qelectrotech
|
|
title: QElectroTech
|
|
base: core18
|
|
adopt-info: qelectrotech
|
|
license: GPL-2.0
|
|
summary: Electrical diagram editor
|
|
description: |
|
|
QElectroTech, or QET in short, is a libre and open source desktop application
|
|
to create diagrams and schematics.
|
|
|
|
grade: stable
|
|
confinement: strict
|
|
|
|
layout:
|
|
/usr/local/share/qelectrotech:
|
|
bind: $SNAP/usr/local/share/qelectrotech
|
|
/usr/share/libdrm/amdgpu.ids:
|
|
bind-file: $SNAP/kf5/usr/share/libdrm/amdgpu.ids
|
|
|
|
apps:
|
|
qelectrotech:
|
|
command: usr/local/bin/qelectrotech
|
|
command-chain:
|
|
- bin/qelectrotech-launch
|
|
desktop: usr/local/share/applications/qelectrotech.desktop
|
|
extensions: [kde-neon]
|
|
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control]
|
|
environment: &env
|
|
__EGL_VENDOR_LIBRARY_DIRS: $SNAP/kf5/usr/share/glvnd/egl_vendor.d:$SNAP/usr/share/glvnd/egl_vendor.d
|
|
TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6
|
|
QT_QPA_PLATFORMTHEME: gtk3
|
|
QT_AUTO_SCREEN_SCALE_FACTOR: 1
|
|
|
|
qet-tb-generator:
|
|
command: bin/qelectrotech-launch $SNAP/bin/qet_tb_generator
|
|
extensions: [kde-neon]
|
|
plugs: *plugs
|
|
environment: *env
|
|
|
|
dxf-to-qet:
|
|
command: bin/DXFtoQET
|
|
extensions: [kde-neon]
|
|
plugs: *plugs
|
|
environment: *env
|
|
|
|
parts:
|
|
launchers:
|
|
plugin: dump
|
|
source: build-aux/snap/local/launchers
|
|
organize:
|
|
'*': bin/
|
|
|
|
qet-tb-generator:
|
|
plugin: python
|
|
python-version: python3
|
|
source: https://github.com/qelectrotech/qet_tb_generator.git
|
|
stage-packages:
|
|
- python3-lxml
|
|
- python3-tk
|
|
- libtk8.6
|
|
|
|
dxf-to-qet:
|
|
after: [desktop-qt5]
|
|
plugin: qmake
|
|
source: https://github.com/qelectrotech/DXFtoQET.git
|
|
build-packages:
|
|
- qtbase5-dev
|
|
override-build: |
|
|
snapcraftctl build
|
|
mkdir -p "$SNAPCRAFT_PART_INSTALL/bin"
|
|
cp DXFtoQET "$SNAPCRAFT_PART_INSTALL/bin/"
|
|
|
|
qelectrotech:
|
|
after: [desktop-qt5]
|
|
plugin: qmake
|
|
source: .
|
|
override-pull: |
|
|
snapcraftctl pull
|
|
snap_version=$(git describe --dirty)
|
|
modified_displayed_version=$snap_version".snap"
|
|
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
|
|
snapcraftctl set-version "$snap_version"
|
|
override-stage: |
|
|
snapcraftctl stage
|
|
# patch desktop file with correct icon path
|
|
SED_CMD="sed -i -E s|^Icon=(.*)|Icon=\${SNAP}/usr/local/share/icons/hicolor/128x128/apps/\1.png|g"
|
|
$SED_CMD usr/local/share/applications/qelectrotech.desktop
|
|
build-packages:
|
|
- g++
|
|
- qttools5-dev-tools
|
|
- libqt5svg5-dev
|
|
- libkf5widgetsaddons-dev
|
|
- libkf5coreaddons-dev
|
|
- git
|
|
stage-packages:
|
|
- qtwayland5
|
|
- qt5-gtk-platformtheme
|
|
- libkf5coreaddons5
|
|
- libkf5widgetsaddons5
|
|
- libqt5concurrent5
|
|
- libqt5printsupport5
|
|
- libqt5sql5
|
|
- libqt5xml5
|
|
- libfam0
|
|
- libqt5sql5-sqlite
|
|
- libdrm2
|