* Remove `mesa` as dependency; `qt5-base` and `qt6-base` both depend on it and none of the projects depend on it directly; official Qt-based packages like `qtcreator` also don't depend on `mesa` * Add `libx11` as dependency of `qtutilities` and variants as it is actually used directly by those packages for the capslock detection (even though that feature was broken for quite some time)
85 lines
3.3 KiB
Bash
85 lines
3.3 KiB
Bash
# Maintainer: Martchus <martchus@gmx.net>
|
|
|
|
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
|
|
# you also find the URL of a binary repository.
|
|
|
|
# if tests fail due to timeout, you can try to increase the timeout
|
|
# by setting SYNCTHING_TEST_TIMEOUT_FACTOR
|
|
|
|
# set the web view provider: either webkit, webengine, auto or none
|
|
_webview_provider=${SYNCTHING_TRAY_WEBVIEW_PROVIDER:-webengine}
|
|
|
|
# set the JavaScript provider: either script, qml, auto or none
|
|
_js_provider=${SYNCTHING_TRAY_JS_PROVIDER:-qml}
|
|
|
|
# set to non-empty string to enable KIO plugin to show Syncthing actions in
|
|
# Dolphin file browser
|
|
_enable_kio_plugin=${SYNCTHING_TRAY_ENABLE_KIO_PLUGIN:-1}
|
|
|
|
# set to non-empty string to enable Plasmoid for Plasma 5 desktop
|
|
_enable_plasmoid=${SYNCTHING_TRAY_ENABLE_PLASMOID:-1}
|
|
|
|
[[ $_enable_kio_plugin == 0 ]] && _enable_kio_plugin=
|
|
[[ $_enable_plasmoid == 0 ]] && _enable_plasmoid=
|
|
|
|
_reponame=syncthingtray
|
|
pkgname=syncthingtray
|
|
pkgver=1.4.6
|
|
pkgrel=1
|
|
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
|
|
pkgdesc='Tray application for Syncthing'
|
|
license=('GPL')
|
|
depends=('libqtutilities.so' 'libqtforkawesome.so' 'libc++utilities.so' 'libboost_filesystem.so' 'qt5-svg' 'openssl'
|
|
'desktop-file-utils' 'xdg-utils')
|
|
[[ $_webview_provider == none ]] && depends+=('qt5-base')
|
|
[[ $_webview_provider == webkit ]] && depends+=('qt5-webkit')
|
|
[[ $_webview_provider == webengine ]] && depends+=('qt5-webengine')
|
|
[[ $_js_provider == script ]] && depends+=('qt5-script')
|
|
[[ $_js_provider == qml ]] && depends+=('qt5-declarative')
|
|
[[ $_enable_kio_plugin ]] && optdepends+=('kio: KIO plugin for Syncthing actions in Dolphin')
|
|
[[ $_enable_plasmoid ]] && optdepends+=('plasma-workspace: Plasmoid for Plasma 5 desktop')
|
|
makedepends=('cmake' 'ninja' 'qt5-tools' 'boost')
|
|
checkdepends=('cppunit' 'syncthing' 'iproute2' 'appstream')
|
|
[[ $_enable_kio_plugin ]] && makedepends+=('kio')
|
|
[[ $_enable_plasmoid ]] && makedepends+=('plasma-framework' 'extra-cmake-modules')
|
|
url="https://github.com/Martchus/${_reponame}"
|
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
|
|
sha256sums=('3805fe0d7ec8d5df9670ba480e396b982cc1995361d446c691ad7eb1aacb322d')
|
|
|
|
ephemeral_port() {
|
|
comm -23 <(seq 49152 65535) <(ss -tan | awk '{print $4}' | cut -d':' -f2 | grep "[0-9]\{1,5\}" | sort | uniq) | shuf | head -n 1
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
|
|
local additional_args=
|
|
[[ $_enable_kio_plugin ]] || additional_args+=' -DNO_FILE_ITEM_ACTION_PLUGIN=ON'
|
|
[[ $_enable_plasmoid ]] || additional_args+=' -DNO_PLASMOID=ON'
|
|
|
|
cmake \
|
|
-G Ninja \
|
|
-DCMAKE_BUILD_TYPE:STRING='Release' \
|
|
-DCMAKE_INSTALL_PREFIX:PATH='/usr' \
|
|
-DBUILD_SHARED_LIBS:BOOL=ON \
|
|
-DWEBVIEW_PROVIDER="${_webview_provider}" \
|
|
-DJS_PROVIDER="${_js_provider}" \
|
|
-DSYSTEMD_SUPPORT=ON \
|
|
-DBUILTIN_TRANSLATIONS:BOOL=ON \
|
|
-DBUILTIN_TRANSLATIONS_OF_QT:BOOL=OFF \
|
|
$additional_args \
|
|
.
|
|
ninja
|
|
}
|
|
|
|
check() {
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
export HOME=${HOME:-/} # https://github.com/syncthing/syncthing/issues/8785
|
|
QT_QPA_PLATFORM=offscreen SYNCTHING_PORT=$(ephemeral_port) SYNCTHING_TEST_TIMEOUT_FACTOR=3 ninja check
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
DESTDIR="${pkgdir}" ninja install
|
|
}
|