Update syncthingtray

This commit is contained in:
Martchus 2019-11-09 02:52:44 +01:00
parent d7752b8687
commit 699d79b6ba
4 changed files with 28 additions and 11 deletions

View File

@ -30,7 +30,8 @@ do
echo "NEXT: $project/v$version"
# determine file path of arch linux package
pkg_files=("$repo_dir/mingw-w64-$project-$version"-*-*.pkg.tar.xz)
pkg_name=mingw-w64-$project
pkg_files=("$repo_dir/$pkg_name-$version"-*-*.pkg.tar.xz)
if [[ ${#pkg_files[@]} == 0 ]]; then
echo "no mingw-w64 package for $project/v$version present"
continue
@ -41,15 +42,24 @@ do
pkg_file_name=${latest_pkg_file##*/}
temp_dir=$(mktemp -d -t "$pkg_file_name-XXXXXXXXXX")
pushd "$temp_dir"
bsdtar xJf "$latest_pkg_file"
# locate the license file
license_file=usr/share/licenses/$pkg_name/LICENSES-windows-distribution.md
if [[ ! -f $license_file ]]; then
echo "the package $latest_pkg_file does not include the expected license file $license_file"
continue
fi
# make a zip file for each statically linked binary
bsdtar xJf "$latest_pkg_file"
zip_files=()
for arch in i686-w64-mingw32 x86_64-w64-mingw32; do
binaries=(usr/$arch/bin/*-static.exe)
for binary in ${binaries[@]}; do
binary_name=${binary##*/}
binary_name=${binary_name%-static.exe}-$version-$arch
base_name=${binary##*/}
base_name=${base_name%-static.exe}
symlink_name=$base_name-$arch.exe
binary_name=$base_name-$version-$arch.exe
# check whether upload already exists
zip_file="$binary_name.zip"
@ -60,8 +70,11 @@ do
# create zip file
echo "zipping $binary to $zip_file"
mv "$binary" "$binary_name.exe"
bsdtar acf "$zip_file" "$binary_name.exe"
mv "$binary" "$binary_name"
ln -s "$binary_name" "$symlink_name"
license_file_2=$project-$version-$arch-LICENSES.md
cp "$license_file" "$license_file_2"
bsdtar acf "$zip_file" "$binary_name" "$license_file_2"
zip_files+=("$zip_file")
done
done

View File

@ -1,6 +1,6 @@
#!/bin/bash
declare -A versions=(
[syncthingtray]=0.10.2
[syncthingtray]=0.10.3
[c++utilities]=5.0.1
[qtutilities]=6.0.2
[tagparser]=9.1.1

View File

@ -24,7 +24,7 @@ _enable_plasmoid=${SYNCTHING_TRAY_ENABLE_PLASMOID:-1}
_reponame=syncthingtray
pkgname=syncthingtray
pkgver=0.10.2
pkgver=0.10.3
pkgrel=1
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
pkgdesc='Tray application for Syncthing'
@ -43,7 +43,7 @@ checkdepends=('cppunit' 'syncthing' 'iproute2')
[[ $_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=('84f6085c9d1a21d396fa85545b934f7fcd22eab91da0da961bfe6ac0d41632e9')
sha256sums=('6becc583e2bb5a0692cca934d64b76d015e5452e144456340260ab56c1920283')
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

View File

@ -15,7 +15,7 @@ _enable_libsyncthing=${MINGW_W64_SYNCTHING_TRAY_JS_PROVIDER:-ON}
_reponame=syncthingtray
pkgname=mingw-w64-syncthingtray
_name=${pkgname#mingw-w64-}
pkgver=0.10.2
pkgver=0.10.3
pkgrel=1
arch=('any')
pkgdesc='Tray application for Syncthing (mingw-w64)'
@ -31,7 +31,7 @@ makedepends=('mingw-w64-gcc' 'mingw-w64-cmake' 'mingw-w64-qt5-tools' 'ffmpeg')
url="https://github.com/Martchus/${_reponame}"
source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
[[ $_enable_libsyncthing == ON ]] && source+=("syncthing::git+https://github.com/Martchus/syncthing.git#branch=libsyncthing-latest")
sha256sums=('84f6085c9d1a21d396fa85545b934f7fcd22eab91da0da961bfe6ac0d41632e9'
sha256sums=('6becc583e2bb5a0692cca934d64b76d015e5452e144456340260ab56c1920283'
'SKIP')
options=(!buildflags staticlibs !strip !emptydirs)
@ -109,6 +109,10 @@ build() {
package() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
install \
-D --target-directory="$pkgdir/usr/share/licenses/$pkgname" \
LICENSES-windows-distribution.md
for _arch in "${_architectures[@]}"; do
for _cfg in "${_configurations[@]}"; do
msg2 "${_arch}-${_cfg}"