2019-06-24 10:22:46 +00:00
|
|
|
name: qelectrotech
|
|
|
|
title: QElectroTech
|
2023-09-05 10:27:43 +02:00
|
|
|
base: core22
|
2019-06-24 10:22:46 +00:00
|
|
|
adopt-info: qelectrotech
|
2019-06-25 20:10:23 +00:00
|
|
|
license: GPL-2.0
|
2019-06-24 10:22:46 +00:00
|
|
|
summary: Electrical diagram editor
|
|
|
|
description: |
|
|
|
|
QElectroTech, or QET in short, is a libre and open source desktop application
|
|
|
|
to create diagrams and schematics.
|
|
|
|
|
2019-06-26 07:55:06 +00:00
|
|
|
grade: stable
|
2019-06-24 10:22:46 +00:00
|
|
|
confinement: strict
|
2021-11-20 11:51:21 +01:00
|
|
|
compression: lzo
|
2019-06-24 10:22:46 +00:00
|
|
|
|
2020-05-06 10:05:47 +02:00
|
|
|
architectures:
|
2023-09-06 16:28:57 +02:00
|
|
|
- build-on: amd64
|
|
|
|
build-for: amd64
|
|
|
|
- build-on: arm64
|
|
|
|
build-for: arm64
|
2023-09-05 14:10:08 +02:00
|
|
|
|
2019-06-24 10:22:46 +00:00
|
|
|
layout:
|
|
|
|
/usr/local/share/qelectrotech:
|
2020-04-16 19:54:39 +02:00
|
|
|
symlink: $SNAP/usr/local/share/qelectrotech
|
2023-11-13 10:33:16 +01:00
|
|
|
|
2019-06-24 10:22:46 +00:00
|
|
|
|
|
|
|
apps:
|
|
|
|
qelectrotech:
|
2023-09-05 15:06:47 +02:00
|
|
|
command: usr/local/bin/qelectrotech
|
2023-09-05 13:30:07 +02:00
|
|
|
common-id: qelectrotech.desktop
|
|
|
|
extensions:
|
|
|
|
- kde-neon
|
2024-10-31 11:15:50 +01:00
|
|
|
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control, wayland, x11]
|
2019-06-24 10:22:46 +00:00
|
|
|
environment: &env
|
2020-04-16 19:35:59 +02:00
|
|
|
TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6
|
2020-04-16 19:51:06 +02:00
|
|
|
HOME: $SNAP_USER_COMMON
|
build-aux/snap/snapcraft.yaml: python3.8 -> 3.10
Fix traceback when selecting "Project" menu "Launch the terminal block
creation plugin" item:
Traceback (most recent call last):
File "/snap/qelectrotech/1973/bin/qet_tb_generator", line 33, in <module>
sys.exit(load_entry_point('qet-tb-generator==1.3.1', 'console_scripts', 'qet_tb_generator')())
File "/snap/qelectrotech/1973/bin/qet_tb_generator", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/snap/qelectrotech/1973/lib/python3.10/site-packages/src/main.py", line 98, in <module>
import src.PySimpleGUI as sg
File "/snap/qelectrotech/1973/lib/python3.10/site-packages/src/PySimpleGUI.py", line 95, in <module>
import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'
2025-01-29 00:22:17 -06:00
|
|
|
PYTHONPATH: $SNAP:$SNAP/lib/python3.10/site-packages:$SNAP/usr/lib/python3.10:$SNAP/usr/lib/python3.10/lib-dynload
|
2019-06-24 10:22:46 +00:00
|
|
|
|
|
|
|
qet-tb-generator:
|
2023-09-05 15:06:47 +02:00
|
|
|
command: bin/qet_tb_generator
|
2023-09-05 14:03:01 +02:00
|
|
|
extensions:
|
|
|
|
- kde-neon
|
2019-06-24 10:22:46 +00:00
|
|
|
plugs: *plugs
|
|
|
|
environment: *env
|
2020-04-16 19:51:06 +02:00
|
|
|
|
2024-09-29 14:37:25 +02:00
|
|
|
|
2019-06-24 10:22:46 +00:00
|
|
|
parts:
|
|
|
|
launchers:
|
|
|
|
plugin: dump
|
2020-02-13 17:41:01 +01:00
|
|
|
source: build-aux/snap/local/launchers
|
2019-06-24 10:22:46 +00:00
|
|
|
organize:
|
|
|
|
'*': bin/
|
|
|
|
|
|
|
|
qet-tb-generator:
|
|
|
|
plugin: python
|
2021-11-16 13:31:52 +01:00
|
|
|
source: https://github.com/raulroda/qet_tb_generator-plugin.git
|
2024-05-05 20:46:37 +02:00
|
|
|
python-packages: [PySimpleGUI]
|
2019-06-24 10:22:46 +00:00
|
|
|
stage-packages:
|
|
|
|
- python3-lxml
|
|
|
|
- python3-tk
|
|
|
|
- libtk8.6
|
|
|
|
|
2020-04-16 19:39:32 +02:00
|
|
|
kde-sdk-setup:
|
|
|
|
plugin: nil
|
|
|
|
build-snaps:
|
2023-10-13 09:13:47 +02:00
|
|
|
- kf5-5-110-qt-5-15-11-core22-sdk
|
2020-04-16 19:39:32 +02:00
|
|
|
build-packages:
|
|
|
|
- g++
|
|
|
|
- mesa-common-dev
|
|
|
|
- libglvnd-dev
|
|
|
|
- rsync
|
|
|
|
override-build: |
|
2023-10-13 09:13:47 +02:00
|
|
|
rsync -a --ignore-existing /snap/kf5-5-110-qt-5-15-11-core22-sdk/current/ /
|
2022-01-13 10:10:00 +01:00
|
|
|
|
2024-09-29 14:37:25 +02:00
|
|
|
|
2019-06-24 10:22:46 +00:00
|
|
|
qelectrotech:
|
2020-04-16 19:39:32 +02:00
|
|
|
after: [kde-sdk-setup]
|
|
|
|
plugin: nil
|
2019-06-24 10:22:46 +00:00
|
|
|
source: .
|
2021-11-20 11:51:21 +01:00
|
|
|
stage-packages: [ git, sqlite3, xdg-user-dirs ]
|
2020-09-27 12:44:08 +02:00
|
|
|
build-packages:
|
2020-04-16 19:39:32 +02:00
|
|
|
- git
|
2020-09-24 12:19:30 +02:00
|
|
|
- libsqlite3-dev
|
2022-01-13 10:10:00 +01:00
|
|
|
override-build: |
|
2024-05-05 16:30:12 +02:00
|
|
|
displayed_version=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
|
2022-01-13 10:10:00 +01:00
|
|
|
snap_version="${displayed_version}-g$(git rev-parse --short=8 HEAD)"
|
2021-11-20 11:51:21 +01:00
|
|
|
modified_displayed_version="${snap_version}.snap"
|
2019-06-26 07:55:06 +00:00
|
|
|
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
|
2023-09-06 17:49:52 +02:00
|
|
|
craftctl set version="$snap_version"
|
2023-09-06 18:35:42 +02:00
|
|
|
qmake "$CRAFT_PART_SRC/qelectrotech.pro"
|
|
|
|
make -j${CRAFT_PARALLEL_BUILD_COUNT}
|
|
|
|
make install INSTALL_ROOT="$CRAFT_PART_INSTALL"
|
2019-06-24 10:22:46 +00:00
|
|
|
override-stage: |
|
2023-09-06 17:34:07 +02:00
|
|
|
craftctl default
|
2019-06-24 10:22:46 +00:00
|
|
|
# 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"
|
2024-12-14 16:09:07 +01:00
|
|
|
$SED_CMD usr/local/share/applications/org.qelectrotech.qelectrotech.desktop
|
2020-04-16 19:39:32 +02:00
|
|
|
|
2020-04-16 19:41:41 +02:00
|
|
|
cleanup:
|
2024-09-30 06:13:24 +02:00
|
|
|
after: [qelectrotech, qet-tb-generator]
|
2020-04-16 19:41:41 +02:00
|
|
|
plugin: nil
|
2023-10-13 09:13:47 +02:00
|
|
|
build-snaps: [kf5-5-110-qt-5-15-11-core22]
|
2020-04-16 19:41:41 +02:00
|
|
|
override-prime: |
|
|
|
|
set -eux
|
2023-10-13 09:13:47 +02:00
|
|
|
for snap in "kf5-5-110-qt-5-15-11-core22"; do # List all content-snaps you're using here
|
2023-09-06 18:35:42 +02:00
|
|
|
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$CRAFT_PRIME/{}" "$CRAFT_PRIME/usr/{}" \;
|
2021-11-20 11:51:21 +01:00
|
|
|
done
|
|
|
|
for cruft in bug lintian man; do
|
2023-09-06 18:35:42 +02:00
|
|
|
rm -rf $CRAFT_PRIME/usr/share/$cruft
|
2020-04-16 19:41:41 +02:00
|
|
|
done
|
2023-09-06 18:35:42 +02:00
|
|
|
find $CRAFT_PRIME/usr/share/doc/ -type f -not -name 'copyright' -delete
|
|
|
|
find $CRAFT_PRIME/usr/share -type d -empty -delete
|