Merge pull request #2481 from yopito/seafile.624.py3

Seafile client: update to 6.2.4, switch to python3
This commit is contained in:
Alessio Sergi 2018-10-07 18:24:25 +02:00 committed by GitHub
commit b2b45f5619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 131 additions and 76 deletions

View File

@ -2334,7 +2334,6 @@ libm.so android-studio-3.0.1_1
libdl.so android-studio-3.0.1_1
libKF5WidgetsAddons.so.5 kwidgetsaddons-5.26.0_1
libsearpc.so.1 libsearpc-3.0.7_1
libccnet.so.0 ccnet-5.0.4_1
libseafile.so.0 seafile-libclient-5.0.4_1
libpodofo.so.0.9.6 libpodofo-0.9.6_1
libIrcUtil.so.3 libcommuni-3.4.0_1

View File

@ -1 +0,0 @@
ccnet

View File

@ -1 +0,0 @@
ccnet

View File

@ -1,11 +0,0 @@
--- lib/rsa.c.orig 2017-05-06 19:32:15.000000000 +0000
+++ lib/rsa.c 2017-05-06 19:32:23.971214589 +0000
@@ -13,7 +13,7 @@
/* Forward compatibility functions if libssl < 1.1.0. */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
{

View File

@ -1,44 +0,0 @@
# Template file for 'ccnet'
pkgname=ccnet
version=6.1.8
revision=3
build_style=gnu-configure
configure_args="--disable-static"
hostmakedepends="automake libsearpc-codegen libtool pkg-config vala"
makedepends="libevent-devel libsearpc-devel sqlite-devel"
short_desc="Seafile networking library"
maintainer="yopito <pierre.bourgin@free.fr>"
license="GPL-3.0-or-later"
homepage="https://github.com/haiwen/${pkgname}"
distfiles="https://github.com/haiwen/${pkgname}/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=b55636bf95232dc1db70d3604d0bebb7c3d730292d15b9b6c5b951307eb69762
pre_configure() {
./autogen.sh
}
post_install() {
vdoc README.markdown
vdoc LICENSE.txt
vdoc HACKING
}
ccnet-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}
ccnet-python_package() {
noarch=yes
pycompile_module="ccnet"
depends="ccnet"
short_desc="Python2 bindings"
pkg_install() {
vmove usr/lib/python2.7
}
}

1
srcpkgs/libsearpc-python3 Symbolic link
View File

@ -0,0 +1 @@
libsearpc

View File

@ -0,0 +1,81 @@
--- pysearpc/client.py.orig 2018-08-21 03:42:02.000000000 +0200
+++ pysearpc/client.py 2018-10-03 18:10:31.097876808 +0200
@@ -1,5 +1,5 @@
import json
-from common import SearpcError
+from .common import SearpcError
def _fret_int(ret_str):
try:
@@ -7,10 +7,10 @@
except:
raise SearpcError('Invalid response format')
- if dicts.has_key('err_code'):
+ if 'err_code' in dicts:
raise SearpcError(dicts['err_msg'])
- if dicts.has_key('ret'):
+ if 'ret' in dicts:
return dicts['ret']
else:
raise SearpcError('Invalid response format')
@@ -21,10 +21,10 @@
except:
raise SearpcError('Invalid response format')
- if dicts.has_key('err_code'):
+ if 'err_code' in dicts:
raise SearpcError(dicts['err_msg'])
- if dicts.has_key('ret'):
+ if 'ret' in dicts:
return dicts['ret']
else:
raise SearpcError('Invalid response format')
@@ -61,7 +61,7 @@
except:
raise SearpcError('Invalid response format')
- if dicts.has_key('err_code'):
+ if 'err_code' in dicts:
raise SearpcError(dicts['err_msg'])
if dicts['ret']:
@@ -75,7 +75,7 @@
except:
raise SearpcError('Invalid response format')
- if dicts.has_key('err_code'):
+ if 'err_code' in dicts:
raise SearpcError(dicts['err_msg'])
l = []
--- pysearpc/server.py.orig 2018-08-21 03:42:02.000000000 +0200
+++ pysearpc/server.py 2018-10-03 18:10:31.097876808 +0200
@@ -1,6 +1,6 @@
import json
-from common import SearpcError
+from .common import SearpcError
class SearpcService(object):
def __init__(self, name):
@@ -25,7 +25,7 @@
"""input str -> output str"""
try:
argv = json.loads(fcallstr)
- except Exception, e:
+ except Exception as e:
raise SearpcError('bad call str: ' + str(e))
service = self.services[svcname]
@@ -41,7 +41,7 @@
def call_function(self, svcname, fcallstr):
try:
retVal = self._call_function(svcname, fcallstr)
- except Exception, e:
+ except Exception as e:
ret = {'err_code': 555, 'err_msg': str(e)}
else:
ret = {'ret': retVal}

View File

@ -1,11 +1,11 @@
# Template file for 'libsearpc'
pkgname=libsearpc
version=3.1.0
revision=1
revision=2
build_style=gnu-configure
pycompile_module="pysearpc"
configure_args="--disable-static --disable-compile-demo"
hostmakedepends="automake libtool pkg-config python"
configure_args="PYTHON=python3 --disable-static --disable-compile-demo"
hostmakedepends="automake libtool pkg-config python3 glib-devel"
makedepends="libglib-devel jansson-devel"
short_desc="Seafile RPC library"
maintainer="yopito <pierre.bourgin@free.fr>"
@ -35,7 +35,8 @@ libsearpc-devel_package() {
libsearpc-codegen_package() {
short_desc+=" - code generator"
depends="python"
depends="python3"
python_version=3
noarch=yes
pkg_install() {
vdoc AUTHORS
@ -43,3 +44,13 @@ libsearpc-codegen_package() {
vmove usr/bin/searpc-codegen.py
}
}
libsearpc-python3_package() {
short_desc+=" - Python3 bindings"
pycompile_module="pysearpc"
depends="python3"
noarch=yes
pkg_install() {
vmove usr/lib/python3*
}
}

1
srcpkgs/seafile-cli Symbolic link
View File

@ -0,0 +1 @@
seafile-libclient

View File

@ -1,20 +1,20 @@
# Template file for 'seafile-client-qt'
pkgname=seafile-client-qt
version=6.1.8
version=6.2.4
revision=1
_sourcename="seafile-client"
wrksrc="${_sourcename}-${version}"
build_style=cmake
configure_args="$(vopt_if shibboleth -DBUILD_SHIBBOLETH_SUPPORT=ON)"
hostmakedepends="pkg-config"
makedepends="ccnet-devel qt5-tools-devel seafile-libclient-devel
makedepends="qt5-tools-devel seafile-libclient-devel sqlite-devel libevent-devel
$(vopt_if shibboleth 'qt5-webengine-devel qt5-declarative-devel qt5-webchannel-devel qt5-location-devel')"
short_desc="Cloud storage system - Qt graphical client"
maintainer="yopito <pierre.bourgin@free.fr>"
license="Apache-2.0"
homepage="https://github.com/haiwen/${_sourcename}"
distfiles="https://github.com/haiwen/${_sourcename}/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=daef6d2b5be5659dca55bc782262f7c7cc5a8e4b0b4db5f4a7fedad9e061e6db
checksum=bcf5b5d3b170774c9a76d98a628c72ed990e8c93ca1e498b0eda6cdc9da37366
build_options="shibboleth"
desc_option_shibboleth="Build with Shibboleth support"

View File

@ -0,0 +1 @@
seafile-libclient

View File

@ -1,34 +1,31 @@
# Template file for 'seafile-libclient'
pkgname=seafile-libclient
version=6.1.8
revision=3
version=6.2.4
revision=1
_distname="${pkgname/-libclient/}"
wrksrc="${_distname}-${version}"
build_style=gnu-configure
configure_args="--disable-static"
configure_args="PYTHON=python3 --disable-static"
hostmakedepends="automake intltool libsearpc-codegen libtool pkg-config vala"
makedepends="ccnet-devel libcurl-devel"
depends="python"
short_desc="Cloud storage system - client command-line and libraries"
makedepends="libglib-devel libuuid-devel libsearpc-devel sqlite-devel
libevent-devel libcurl-devel"
short_desc="Cloud storage system - library"
maintainer="yopito <pierre.bourgin@free.fr>"
license="GPL-2.0-or-later" # Has openssl exception not yet present on SPDX
homepage="https://github.com/haiwen/seafile"
distfiles="${homepage}/archive/v${version}.tar.gz>${_distname}-${version}.tar.gz"
checksum=5d0b525446c1e15ffb7754ab0cc6bb1ea9d294dc1dddc7c6583a24780850ba24
checksum=3972073608692de6c0b254a6d5fa711ac3697174be0a06d1930b3830e643f711
pre_configure() {
./autogen.sh
}
post_install() {
# remove server files
rm -rf "${DESTDIR}/usr/lib/python2.7/site-packages/seaserv"
vdoc README.markdown
}
seafile-libclient-devel_package() {
short_desc+=" - development files"
short_desc="Cloud storage system - development files"
depends="seafile-libclient>=${version}_${revision} glib-devel libsearpc-devel jansson-devel"
pkg_install() {
vdoc README.markdown
@ -37,3 +34,24 @@ seafile-libclient-devel_package() {
vmove usr/lib/pkgconfig
}
}
seafile-libclient-python3_package() {
short_desc="Cloud storage system - Python3 bindings"
pycompile_module="seafile"
depends="libsearpc-python3"
noarch=yes
pkg_install() {
vmove usr/lib/python3*
}
}
seafile-cli_package() {
short_desc="Cloud storage system - client CLI"
depends="seafile-libclient-python3 ${sourcepkg}>=${version}_${revision}"
python_version=3
noarch=yes
pkg_install() {
vmove usr/bin/seaf-cli
vmove usr/share/man/man1/seaf-cli.1
}
}