@@ -2,23 +2,22 @@ name: bittorrent-tracker-editor
22adopt-info : mainprogram
33icon : metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.png
44
5- base : core22
5+ base : core24
66grade : stable
77confinement : strict
88
9- architectures :
10- - build-on : amd64
11- - build-on : arm64
9+ platforms :
10+ amd64 :
11+ build-on : [amd64]
12+ arm64 :
13+ build-on : [arm64]
1214
1315apps :
1416 bittorrent-tracker-editor :
1517 desktop : io.github.gerryferdinandus.bittorrent-tracker-editor.desktop
1618 extensions :
17- - kde-neon
19+ - kde-neon-6
1820 command : trackereditor
19- environment :
20- # Fallback to XWayland if running in a Wayland session.
21- DISABLE_WAYLAND : 1
2221 plugs :
2322 - home
2423 - network
@@ -32,28 +31,29 @@ parts:
3231 - curl
3332 - build-essential
3433 - fpc
35- - libqt5x11extras5-dev
34+
3635 build-environment :
3736 - LAZARUS_URL_TAR_GZ : " https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/lazarus.tar.gz"
38- - LAZARUS_QT_VERSION : " 5 "
37+ - LAZARUS_QT_VERSION : " 6 "
3938 - LIB_DIR : " /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR"
4039 - LAZARUS_DIR : " $PWD/lazarus"
4140 override-build : |
42- # Remove the older libQTpas.so
43- rm -f $LIB_DIR/libQt${LAZARUS_QT_VERSION}Pas.*
44-
4541 #Download lazarus source code. Directory 'lazarus' will be created in the root.
4642 curl -L -O $LAZARUS_URL_TAR_GZ
4743 tar -xzf *.tar.gz
4844
49- # Create libQTpas.so and put it in snap $CRAFT_PART_INSTALL
45+ #--- Create libQTpas.so and put it in /usr/lib/ and $CRAFT_PART_INSTALL
5046 cd "$LAZARUS_DIR/lcl/interfaces/qt${LAZARUS_QT_VERSION}/cbindings/"
51- qmake
47+ /snap/kde-qt6-core24-sdk/current/usr/bin/qt6/qmake6
5248 make -j$(nproc)
53- make install
49+
50+ # copy the libQTpas.so to /usr/lib/ (needed for compile-time linking)
51+ cp -av libQt${LAZARUS_QT_VERSION}Pas.* $LIB_DIR/
52+
53+ # copy the libQTpas.so to snap install directory (needed for run-time linking)
5454 cp -av --parents $LIB_DIR/libQt${LAZARUS_QT_VERSION}Pas.* $CRAFT_PART_INSTALL
5555
56- # make lazbuild and put the link with extra parameter in /usr/bin/
56+ #--- Make lazbuild and put the link with extra parameter in /usr/bin/
5757 cd "$LAZARUS_DIR"
5858 make lazbuild
5959 echo "$LAZARUS_DIR/lazbuild --primary-config-path=$LAZARUS_DIR --lazarusdir=$LAZARUS_DIR \$*" > /usr/bin/lazbuild
@@ -65,19 +65,20 @@ parts:
6565 plugin : nil
6666 parse-info : [metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.metainfo.xml]
6767 override-build : |
68- lazbuild --build-mode=Release --widgetset=qt5 source/project/tracker_editor/trackereditor.lpi
68+ lazbuild --build-mode=Release --widgetset=qt6 source/project/tracker_editor/trackereditor.lpi
6969 install enduser/trackereditor $CRAFT_PART_INSTALL/
7070 install metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.desktop $CRAFT_PART_INSTALL/
7171
7272# --------------------------------------------------------------
73- # Only 2 files are explicitly added in this snap
73+ # Only 3 files are explicitly added in this snap
7474# - main program: enduser/trackereditor
75- # - Lazarus QT suport library: libQt5Pas.so
75+ # - desktop file: metainfo/io.github.gerryferdinandus.bittorrent-tracker-editor.desktop
76+ # - libQt6Pas.so created during the build_lazarus part
7677#
7778# Create snap. Run from the project root folder:
78- # snapcraft --verbosity verbose
79+ # snapcraft pack --verbosity verbose
7980#
80- # he snapTo look what is inside t file. Directory 'squashfs-root' will be created in the root folder:
81+ # To look what is inside the snap file. Directory 'squashfs-root' will be created in the root folder:
8182# unsquashfs *.snap
8283#
8384# Install the snap:
8687# Run the snap
8788# snap run bittorrent-tracker-editor
8889# --------------------------------------------------------------
89- # Todo: building for QT6 is still not working with snap
90- # https://askubuntu.com/questions/1460242/ubuntu-22-04-with-qt6-qmake-could-not-find-a-qt-installation-of
91- # qtchooser -install qt{LAZARUS_QT_VERSION} $(which qmake6)
92- # export QT_SELECT=qt{LAZARUS_QT_VERSION}
93- # --------------------------------------------------------------
0 commit comments