Skip to content

Commit de83a1d

Browse files
palfreyEeems
andcommitted
Add syncthingctl (#957)
* Initial attempt at syncthingctl * Unfudge libcpp-utilities paths * Fix qtutilities build * Fix qtforkawesome * Partial syncthingctl build * Remove qtforkawesome patch * syncthingctl now builds * Timestamp fixes * Use released versions for syncthingctl and qtforkawesome * Add XDG_RUNTIME_DIR wrapper for syncthingctl * Put original syncthingctl in libexec --------- Co-authored-by: Nathaniel van Diepen <Eeems@users.noreply.github.com>
1 parent ca315e9 commit de83a1d

File tree

7 files changed

+262
-0
lines changed

7 files changed

+262
-0
lines changed

package/libcpp-utilities/package

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2021 The Toltec Contributors
3+
# SPDX-License-Identifier: MIT
4+
5+
pkgnames=(libcpp-utilities libcpp-utilities-dev)
6+
pkgdesc="Common C++ classes and routines used by Martchus' applications"
7+
url=https://github.com/Martchus/cpp-utilities
8+
pkgver=5.31.0-1
9+
timestamp=2025-09-20T23:53Z
10+
section="devel"
11+
maintainer="Tom Parker-Shemilt <palfrey@tevps.net>"
12+
license=GPL-2.0-or-later
13+
image=base:v3.3
14+
source=(
15+
https://github.com/Martchus/cpp-utilities/archive/refs/tags/v5.31.0.zip
16+
targets.cmake.patch
17+
)
18+
sha256sums=(
19+
cbdf3ef53c47fc3c1d8ee20bb1f65290db878408530afe46a285b401af2839a2
20+
SKIP
21+
)
22+
23+
build() {
24+
cmake -B build \
25+
-DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \
26+
-DCMAKE_INSTALL_PREFIX="/opt" \
27+
-DBUILD_SHARED_LIBS=ON
28+
cmake --build build
29+
cmake --build build --target install -- DESTDIR=../install
30+
}
31+
32+
libcpp-utilities() {
33+
package() {
34+
install -d "$pkgdir"/opt/lib "$pkgdir"/usr/lib
35+
cp --no-dereference "$srcdir"/install/opt/lib/lib*.so* "$pkgdir"/opt/lib
36+
37+
for file in "$pkgdir"/opt/lib/lib*.so*; do
38+
base="${file#"$pkgdir"}"
39+
ln -s "$base" "${file/\/opt/\/usr}"
40+
done
41+
}
42+
}
43+
44+
libcpp-utilities-dev() {
45+
pkgdesc="$pkgdesc - development files"
46+
installdepends=("libcpp-utilities=$pkgver")
47+
48+
package() {
49+
install -d "$pkgdir"/opt/lib
50+
cp -r "$srcdir"/install/opt/lib/pkgconfig "$pkgdir"/opt/lib
51+
cp -r "$srcdir"/install/opt/share "$pkgdir"/opt
52+
(cd $pkgdir/opt/share/c++utilities/cmake && patch -p0 < $srcdir/targets.cmake.patch)
53+
cp -r "$srcdir"/install/opt/include "$pkgdir"/opt
54+
}
55+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- c++utilitiesTargets.cmake.orig 2025-11-03 20:33:08.016186953 +0000
2+
+++ c++utilitiesTargets.cmake 2025-11-03 20:33:55.701608765 +0000
3+
@@ -55,7 +55,7 @@
4+
5+
set_target_properties(c++utilities PROPERTIES
6+
INTERFACE_COMPILE_DEFINITIONS "CPP_UTILITIES_USE_NATIVE_FILE_BUFFER"
7+
- INTERFACE_INCLUDE_DIRECTORIES "/opt/include"
8+
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
9+
)
10+
11+
# Create imported target c++utilities-headers
12+
@@ -63,7 +63,7 @@
13+
14+
set_target_properties(c++utilities-headers PROPERTIES
15+
INTERFACE_COMPILE_DEFINITIONS "CPP_UTILITIES_USE_NATIVE_FILE_BUFFER"
16+
- INTERFACE_INCLUDE_DIRECTORIES "/opt/include"
17+
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
18+
)
19+
20+
if(CMAKE_VERSION VERSION_LESS 3.0.0)

package/qtforkawesome/package

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2021 The Toltec Contributors
3+
# SPDX-License-Identifier: MIT
4+
5+
pkgnames=(libqtforkawesome libqtforkawesome-dev)
6+
pkgdesc="Library that bundles ForkAwesome for use within Qt applications"
7+
url=https://github.com/Martchus/qtforkawesome
8+
pkgver=0.3.2-1
9+
timestamp=2025-11-04T20:54Z
10+
section="devel"
11+
maintainer="Tom Parker-Shemilt <palfrey@tevps.net>"
12+
license=GPL-2.0-or-later
13+
image=qt:v3.3
14+
source=(
15+
"https://github.com/Martchus/qtforkawesome/archive/refs/tags/v0.3.2.zip"
16+
"https://raw.githubusercontent.com/ForkAwesome/Fork-Awesome/1e3849530d0266ece3a883649e1398414b92241d/fonts/forkawesome-webfont.ttf"
17+
"https://raw.githubusercontent.com/ForkAwesome/Fork-Awesome/0237ab8eafeeacb896e008f744be6d9d717f44b0/src/icons/icons.yml"
18+
)
19+
noextract=(icons.yml forkawesome-webfont.ttf)
20+
sha256sums=(
21+
945fee08e5de7521571f4abb2fbe37fd3013079b3ffeb1cc6c36aaff538c6d47
22+
4f319287827e35f841069eb471c092eccf97d2f7830aa4d8bd7301ded418bf49
23+
1e588fc6c93737add8443a98d2bbd6b75537d173da6b613e37aaff3fc1f80c92
24+
)
25+
makedepends=(build:cmake host:libcpp-utilities-dev host:libcpp-utilities host:libqtutilities host:libqtutilities-dev build:libyaml-libyaml-perl)
26+
27+
build() {
28+
cmake -B build \
29+
-DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \
30+
-DCMAKE_INSTALL_PREFIX="/opt" \
31+
-DBUILD_SHARED_LIBS=ON \
32+
-DFORK_AWESOME_ICON_DEFINITIONS=$(realpath $srcdir/icons.yml)
33+
cmake --build build
34+
rm -f build/qtforkawesome/forkawesome-webfont.ttf
35+
cp $(realpath $srcdir/forkawesome-webfont.ttf) build/qtforkawesome/forkawesome-webfont.ttf
36+
cmake --build build --target install -- DESTDIR=../install
37+
}
38+
39+
libqtforkawesome() {
40+
package() {
41+
install -d "$pkgdir"/opt/lib "$pkgdir"/usr/lib
42+
cp --no-dereference "$srcdir"/install/opt/lib/lib*.so* "$pkgdir"/opt/lib
43+
44+
for file in "$pkgdir"/opt/lib/lib*.so*; do
45+
base="${file#"$pkgdir"}"
46+
ln -s "$base" "${file/\/opt/\/usr}"
47+
done
48+
}
49+
}
50+
51+
libqtforkawesome-dev() {
52+
pkgdesc="$pkgdesc - development files"
53+
installdepends=("libqtforkawesome=$pkgver")
54+
55+
package() {
56+
install -d "$pkgdir"/opt/lib
57+
cp -r "$srcdir"/install/opt/lib/pkgconfig "$pkgdir"/opt/lib
58+
cp -r "$srcdir"/install/opt/share "$pkgdir"/opt
59+
cp -r "$srcdir"/install/opt/include "$pkgdir"/opt
60+
}
61+
}

package/qtutilities/package

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2021 The Toltec Contributors
3+
# SPDX-License-Identifier: MIT
4+
5+
pkgnames=(libqtutilities libqtutilities-dev)
6+
pkgdesc="Common Qt related C++ classes and routines used by Martchus' applications"
7+
url=https://github.com/Martchus/qtutilities
8+
pkgver=6.18.2-1
9+
timestamp=2025-09-24T09:03Z
10+
section="devel"
11+
maintainer="Tom Parker-Shemilt <palfrey@tevps.net>"
12+
license=GPL-2.0-or-later
13+
image=qt:v3.3
14+
source=(
15+
https://github.com/Martchus/qtutilities/archive/refs/tags/v6.18.2.zip
16+
targets.cmake.patch
17+
)
18+
sha256sums=(
19+
7a1047622c1a92760aaf448eee7c4a1b3c30c65bffdce7de1322c402ca0e9e1a
20+
SKIP
21+
)
22+
makedepends=(build:cmake host:libcpp-utilities-dev host:libcpp-utilities)
23+
24+
build() {
25+
cmake -B build \
26+
-DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \
27+
-DCMAKE_INSTALL_PREFIX="/opt" \
28+
-DBUILD_SHARED_LIBS=ON \
29+
-DENABLE_QT_TRANSLATIONS=OFF \
30+
-DWIDGETS_GUI=OFF
31+
cmake --build build
32+
cmake --build build --target install -- DESTDIR=../install
33+
}
34+
35+
libqtutilities() {
36+
package() {
37+
install -d "$pkgdir"/opt/lib "$pkgdir"/usr/lib
38+
cp --no-dereference "$srcdir"/install/opt/lib/lib*.so* "$pkgdir"/opt/lib
39+
40+
for file in "$pkgdir"/opt/lib/lib*.so*; do
41+
base="${file#"$pkgdir"}"
42+
ln -s "$base" "${file/\/opt/\/usr}"
43+
done
44+
}
45+
}
46+
47+
libqtutilities-dev() {
48+
pkgdesc="$pkgdesc - development files"
49+
installdepends=("libqtutilities=$pkgver")
50+
51+
package() {
52+
install -d "$pkgdir"/opt/lib
53+
cp -r "$srcdir"/install/opt/lib/pkgconfig "$pkgdir"/opt/lib
54+
cp -r "$srcdir"/install/opt/share "$pkgdir"/opt
55+
(cd $pkgdir/opt/share/qtutilities/cmake && patch -p0 < $srcdir/targets.cmake.patch)
56+
cp -r "$srcdir"/install/opt/include "$pkgdir"/opt
57+
}
58+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- qtutilitiesTargets.cmake.orig 2025-11-03 22:15:18.324436027 +0000
2+
+++ qtutilitiesTargets.cmake 2025-11-03 22:15:38.028569434 +0000
3+
@@ -55,7 +55,7 @@
4+
5+
set_target_properties(qtutilities PROPERTIES
6+
INTERFACE_COMPILE_DEFINITIONS "QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS"
7+
- INTERFACE_INCLUDE_DIRECTORIES "/opt/include"
8+
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
9+
INTERFACE_LINK_LIBRARIES "Qt5::Gui;Qt5::Core"
10+
)
11+
12+
@@ -64,7 +64,7 @@
13+
14+
set_target_properties(qtutilities-headers PROPERTIES
15+
INTERFACE_COMPILE_DEFINITIONS "QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS"
16+
- INTERFACE_INCLUDE_DIRECTORIES "/opt/include"
17+
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
18+
)
19+
20+
if(CMAKE_VERSION VERSION_LESS 3.0.0)

package/syncthingctl/package

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2025 The Toltec Contributors
3+
# SPDX-License-Identifier: MIT
4+
5+
pkgnames=(syncthingctl)
6+
pkgdesc="CLI that orchestrates syncthing"
7+
url="https://martchus.github.io/syncthingtray/"
8+
pkgver=2.0.3-1
9+
timestamp=2025-11-04T22:54:13Z
10+
section=utils
11+
maintainer="Tom Parker-Shemilt <palfrey@tevps.net>"
12+
license=GPL-2.0-or-later
13+
image=qt:v3.3
14+
makedepends=(build:cmake host:libcpp-utilities-dev host:libcpp-utilities host:libqtutilities host:libqtutilities-dev)
15+
installdepends=(libcpp-utilities libqtutilities syncthing)
16+
source=(
17+
https://github.com/Martchus/syncthingtray/archive/refs/tags/v2.0.3.zip
18+
syncthingctl
19+
)
20+
sha256sums=(
21+
8edeb6e6934ba54f175dccf0e3f7063aa01c2f07bf2e2361334bfe004e3a92ce
22+
SKIP
23+
)
24+
25+
build() {
26+
cmake -B build \
27+
-DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \
28+
-DCMAKE_INSTALL_PREFIX="/opt" \
29+
-DENABLE_QT_TRANSLATIONS=OFF \
30+
-DUSE_BOOST_PROCESS=OFF \
31+
-DNO_MODEL=ON \
32+
-DNO_FILE_ITEM_ACTION_PLUGIN=ON \
33+
-DNO_PLASMOID=ON \
34+
-DNO_WIDGETS=ON \
35+
-DNO_TRAY=ON
36+
cmake --build build
37+
cmake --build build --target install -- DESTDIR=../install
38+
}
39+
40+
package() {
41+
install -D -m 755 "$srcdir"/syncthingctl "$pkgdir"/opt/bin/syncthingctl
42+
install -D -m 755 "$srcdir"/install/opt/bin/syncthingctl "$pkgdir"/opt/libexec/syncthingctl
43+
}

package/syncthingctl/syncthingctl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
export XDG_RUNTIME_DIR=/tmp/runtime-root
4+
5+
exec /opt/libexec/syncthingctl $@

0 commit comments

Comments
 (0)