diff options
author | Martchus | 2019-07-20 16:55:40 +0200 |
---|---|---|
committer | Martchus | 2019-07-20 16:55:40 +0200 |
commit | d00d7ebbc17e9b5ecda5fe8b2b5fdc229ec2c326 (patch) | |
tree | 14f6c15b5a56c79f3eb05dd94786aa4e09f35c2e | |
download | aur-d00d7ebbc17e9b5ecda5fe8b2b5fdc229ec2c326.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | PKGBUILD | 87 |
2 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..000739bce619 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +pkgbase = syncthingtray-git + pkgdesc = Tray application for Syncthing + pkgver = 0.7.2 + pkgrel = 1 + url = https://github.com/Martchus/syncthingtray + arch = i686 + arch = x86_64 + arch = armv6h + arch = armv7h + arch = aarch64 + license = GPL + checkdepends = cppunit + checkdepends = syncthing + checkdepends = iproute2 + makedepends = cmake + makedepends = qt5-tools + makedepends = git + makedepends = mesa + makedepends = kio + makedepends = plasma-framework + makedepends = extra-cmake-modules + depends = qtutilities-git + depends = qt5-svg + depends = openssl + depends = desktop-file-utils + depends = xdg-utils + depends = qt5-webengine + depends = qt5-declarative + optdepends = kio: KIO plugin for Syncthing actions in Dolphin + optdepends = plasma-workspace: Plasmoid for Plasma 5 desktop + provides = syncthingtray + conflicts = syncthingtray + source = syncthingtray::git://github.com/Martchus/syncthingtray.git + sha256sums = SKIP + +pkgname = syncthingtray-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0a835d6f9608 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,87 @@ +# 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-git +_name=${pkgname%-git} +pkgver=0.7.2 +pkgrel=1 +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +pkgdesc='Tray application for Syncthing' +license=('GPL') +depends=('qtutilities-git' 'qt5-svg' 'openssl' 'desktop-file-utils' 'xdg-utils') +[[ $_webview_provider == none ]] && [[ $_js_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' 'qt5-tools' 'git' 'mesa') +checkdepends=('cppunit' 'syncthing' 'iproute2') +[[ $_enable_kio_plugin ]] && makedepends+=('kio') +[[ $_enable_plasmoid ]] && makedepends+=('plasma-framework' 'extra-cmake-modules') +provides=("${_name}") +conflicts=("${_name}") +url="https://github.com/Martchus/${_reponame}" +source=("${_reponame}::${MARTCHUS_GIT_URL_PREFIX:-git://github.com/Martchus}/${_reponame}.git") +sha256sums=('SKIP') + +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 +} + +pkgver() { + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame}" + echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame}" + + local additional_args= + [[ $_enable_kio_plugin ]] || additional_args+=' -DNO_FILE_ITEM_ACTION_PLUGIN=ON' + [[ $_enable_plasmoid ]] || additional_args+=' -DNO_PLASMOID=ON' + + cmake \ + -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 \ + $additional_args \ + . + make +} + +check() { + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame}" + make SYNCTHING_PORT=$(ephemeral_port) SYNCTHING_TEST_TIMEOUT_FACTOR=3 check +} + +package() { + cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame}" + make DESTDIR="${pkgdir}" install +} |