From fbc033c9e3c7065f00fa1f561ca1c7c564429319 Mon Sep 17 00:00:00 2001 From: Alexis Ehret Date: Tue, 13 Sep 2022 13:33:29 +0200 Subject: [PATCH 1/3] New package: libdecsync-2.2.1 --- common/shlibs | 1 + srcpkgs/libdecsync-devel | 1 + srcpkgs/libdecsync/template | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 120000 srcpkgs/libdecsync-devel create mode 100644 srcpkgs/libdecsync/template diff --git a/common/shlibs b/common/shlibs index c962f0ab7622..ce9b7ac772aa 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4162,3 +4162,4 @@ libgbinder.so.1 libgbinder-1.1.20_1 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1 libtpm2-totp.so.0 libtpm2-totp-0.3.0_1 libmujs.so.1.2.0 mujs-1.2.0_2 +libdecsync.so.0 libdecsync-2.2.1_1 diff --git a/srcpkgs/libdecsync-devel b/srcpkgs/libdecsync-devel new file mode 120000 index 000000000000..e72513c6dcf1 --- /dev/null +++ b/srcpkgs/libdecsync-devel @@ -0,0 +1 @@ +libdecsync \ No newline at end of file diff --git a/srcpkgs/libdecsync/template b/srcpkgs/libdecsync/template new file mode 100644 index 000000000000..aabd2b0dc3c8 --- /dev/null +++ b/srcpkgs/libdecsync/template @@ -0,0 +1,35 @@ +# Template file for 'libdecsync' +pkgname=libdecsync +version=2.2.1 +revision=1 +archs="x86_64" +build_style=gnu-makefile +hostmakedepends="gradle openjdk8 patchelf pkg-config tar" +makedepends="ncurses-devel" +short_desc="Multiplatform library for synchronizing using DecSync" +maintainer="08a " +license="LGPL-2.0-only" +homepage="https://github.com/39aldo39/libdecsync" +distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz" +checksum=3e08b35efed3bafb079aa52a8dcd51217f6602cde64accba1a10cf5c25029d45 +subpackages="libdecsync-devel" +disable_parallel_build=yes + +export JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk + +pre_install() { + patchelf --set-soname libdecsync.so.0 build/bin/linuxX64/releaseShared/libdecsync.so +} + +post_install() { + ln -rsf "${DESTDIR}/usr/lib/libdecsync.so" "${DESTDIR}/usr/lib/libdecsync.so.0" +} + +libdecsync-devel_package() { + depends="${sourcepkg}-${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/share/pkgconfig + } +} From b6922484959c35ba0e8f5b047dec6da5082dc7c0 Mon Sep 17 00:00:00 2001 From: Alexis Ehret Date: Tue, 13 Sep 2022 18:18:15 +0200 Subject: [PATCH 2/3] New package: python3-libdecsync-2.2.1 --- .../0001-hardcode-libpath-for-voidlinux.patch | 64 +++++++++++++++++++ srcpkgs/python3-libdecsync/template | 16 +++++ 2 files changed, 80 insertions(+) create mode 100644 srcpkgs/python3-libdecsync/patches/0001-hardcode-libpath-for-voidlinux.patch create mode 100644 srcpkgs/python3-libdecsync/template diff --git a/srcpkgs/python3-libdecsync/patches/0001-hardcode-libpath-for-voidlinux.patch b/srcpkgs/python3-libdecsync/patches/0001-hardcode-libpath-for-voidlinux.patch new file mode 100644 index 000000000000..f55a0a11bf07 --- /dev/null +++ b/srcpkgs/python3-libdecsync/patches/0001-hardcode-libpath-for-voidlinux.patch @@ -0,0 +1,64 @@ +From 5a2024669f4cc03e79c2a5ae856edd635bd87b9e Mon Sep 17 00:00:00 2001 +From: Alexis Ehret +Date: Tue, 13 Sep 2022 18:04:32 +0200 +Subject: [PATCH 1/1] hardcode libpath for voidlinux + +Signed-off-by: Alexis Ehret +--- + libdecsync/__init__.py | 27 +-------------------------- + setup.py | 1 - + 2 files changed, 1 insertion(+), 27 deletions(-) + +diff --git a/libdecsync/__init__.py b/libdecsync/__init__.py +index fa2d14d..484c6dc 100644 +--- a/libdecsync/__init__.py ++++ b/libdecsync/__init__.py +@@ -29,32 +29,7 @@ import sys + class DecsyncException(Exception): + pass + +-os_name = platform.system() +-machine_type = platform.machine() +-platform_bits = platform.architecture()[0] +-if os_name == "Linux": +- if machine_type == "x86_64": +- libpath = resource_filename(__name__, "libs/libdecsync_amd64.so") +- elif machine_type.startswith("arm") or machine_type.startswith("aarch"): +- if platform_bits == "64bit": +- libpath = resource_filename(__name__, "libs/libdecsync_arm64.so") +- else: +- libpath = resource_filename(__name__, "libs/libdecsync_arm32.so") +- else: +- raise Exception("libdecsync: Machine type '" + machine_type + "' not supported") +-elif os_name == "Windows": +- if platform_bits == "64bit": +- libpath = resource_filename(__name__, "libs/decsync_x64.dll") +- else: +- libpath = resource_filename(__name__, "libs/decsync_x86.dll") +-elif os_name == "Darwin": +- if machine_type == "x86_64": +- libpath = resource_filename(__name__, "libs/libdecsync_amd64.dylib") +- else: +- libpath = resource_filename(__name__, "libs/libdecsync_arm64.dylib") +-else: +- raise Exception("libdecsync: Operating system '" + os_name + "' not supported") +- ++libpath = "/usr/lib/libdecsync.so.0" + _libdecsync = CDLL(libpath) + + def _errcheckDecsync(result, func, args): +diff --git a/setup.py b/setup.py +index a79755a..6853f70 100644 +--- a/setup.py ++++ b/setup.py +@@ -14,7 +14,6 @@ setup( + keywords=["decsync"], + license="LGPLv2+", + packages=["libdecsync"], +- package_data={"libdecsync":["libs/*"]}, + classifiers=[ + "Programming Language :: Python :: 3", + "Operating System :: POSIX :: Linux", +-- +2.37.3 + diff --git a/srcpkgs/python3-libdecsync/template b/srcpkgs/python3-libdecsync/template new file mode 100644 index 000000000000..bb5db27ab412 --- /dev/null +++ b/srcpkgs/python3-libdecsync/template @@ -0,0 +1,16 @@ +# Template file for 'python3-libdecsync' +pkgname=python3-libdecsync +version=2.2.1 +revision=1 +archs="x86_64" +wrksrc="libdecsync-bindings-python3-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3 libdecsync-${version}_${revision}" +checkdepends="${depends}" +short_desc="Python3 wrapper around libdecsync for synchronizing using DecSync" +maintainer="Alexis Ehret " +license="LGPL-2.0-only" +homepage="https://github.com/39aldo39/libdecsync-bindings-python3" +distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz" +checksum=68e0452c128306981dc8e7aa58248cc57855a2de241326b37fbeb5469446d10e From 788e71db996473994fde3b1dcb31af13766a96ac Mon Sep 17 00:00:00 2001 From: Alexis Ehret Date: Tue, 13 Sep 2022 20:21:54 +0200 Subject: [PATCH 3/3] New package: python3-radicale_storage_decsync-2.1.0 --- .../python3-radicale_storage_decsync/template | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 srcpkgs/python3-radicale_storage_decsync/template diff --git a/srcpkgs/python3-radicale_storage_decsync/template b/srcpkgs/python3-radicale_storage_decsync/template new file mode 100644 index 000000000000..b9efb10ec187 --- /dev/null +++ b/srcpkgs/python3-radicale_storage_decsync/template @@ -0,0 +1,16 @@ +# Template file for 'python3-radicale_storage_decsync' +pkgname=python3-radicale_storage_decsync +version=2.1.0 +revision=1 +archs="x86_64" +wrksrc="Radicale-DecSync-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools python3-pip" +depends="radicale>=3 python3-libdecsync>=2.0.0" +short_desc="Radicale DecSync is an Radicale storage plugin using DecSync" +maintainer="Alexis Ehret " +license="GPL-3.0-or-later" +homepage="https://github.com/39aldo39/Radicale-DecSync" +distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz" +checksum=c5879a447b2d9b73cb12c941504d796bf86a8fd19683df695331f8f5e59188c9 +make_check=no # Empty check