diff options
author | eolianoe | 2017-10-24 19:20:51 +0200 |
---|---|---|
committer | eolianoe | 2017-10-24 19:20:51 +0200 |
commit | 9d338284a20c60469629d7989242a3710082991c (patch) | |
tree | c5ff34c6948d28996169a723e9b654f7ae86843e | |
parent | f0aa274750284d1864b8a0a3ddf8caff2bbe4dd7 (diff) | |
download | aur-9d338284a20c60469629d7989242a3710082991c.tar.gz |
add support for mysql
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | mysql-setup.patch | 31 |
2 files changed, 41 insertions, 5 deletions
@@ -12,22 +12,26 @@ license=('AGPL3') makedepends=("vala" "intltool") depends=("seafile" "wget" "sqlite" "fuse" "ccnet-server" "libarchive" "libevhtp-seafile" "git" "ffmpeg" - "python2-requests" "python2-flup" - "python2-setuptools" "python2-pillow" "mysql-python") + "python2-requests" "python2-flup") +optdepends=("python2-setuptools: MySQL deploying" + "python2-pillow: MySQL deploying" + "mysql-python: MySQL deploying") source=("${pkgname}-${pkgver}-server.tar.gz::${url}/archive/v${pkgver}-server.tar.gz" "seafile-admin_virtualenv.patch" "seafile-server@.service" "create-default-conf-dir.patch" "0001-Revert-server-put-pids-folder-out-of-seafile-data.patch" "libseafile.in.patch" - "openssl-1.1.diff") + "openssl-1.1.diff" + "mysql-setup.patch") sha256sums=('9f3b5803c59af6fb1431e40951c800bf08d17b6a7cc3c1307359891b7199a388' '52fb29858f6424052cf01630ad72b5687a4fb259f23f9efc97f08be04a883218' - 'b33b9299370954145d70991abe0084c8b19c5c07233b35e62ae16c9c1ce7c0e9' + 'da31d1b61031cbacc42e1ab708c67c83dba933ff391b07677dabab7ab79729f4' '6bd632f8741b039bad961af3d6850b651e25b7e7a3018d6e2789f350ff93bb78' 'b1748e826d8e7cccdd825b99864b74dfb5795312f8878d63e9a87105f4382e29' 'a2d7f7cf0c59aba97650af62b3cefd0ceb71a1007c34d9369a88e5769c7f6076' - 'ffa351b22e89a66f80139888e4e7a2c2bde41fd648d57c71dcf10884dc03bbc3') + 'ffa351b22e89a66f80139888e4e7a2c2bde41fd648d57c71dcf10884dc03bbc3' + '67da9dff7e1620041eb5a5e3dbb5c61457c2106e5fbb57db06e6f061a0d63c7d') prepare () { cd "${srcdir}/${pkgname}-${pkgver}-server" @@ -37,6 +41,7 @@ prepare () { patch -p1 -i "${srcdir}/create-default-conf-dir.patch" patch -p1 -i "${srcdir}/libseafile.in.patch" patch -p1 -i "${srcdir}/openssl-1.1.diff" + patch -p1 -i "${srcdir}/mysql-setup.patch" # Fix all script's python 2 requirement grep -s -l -r '#!/usr/bin/env python\b' "${srcdir}/${pkgname}-${pkgver}-server" \ diff --git a/mysql-setup.patch b/mysql-setup.patch new file mode 100644 index 000000000000..f94fca799a9b --- /dev/null +++ b/mysql-setup.patch @@ -0,0 +1,31 @@ +--- a/scripts/setup-seafile-mysql.py ++++ b/scripts/setup-seafile-mysql.py +@@ -304,14 +304,13 @@ +- self.bin_dir = os.path.join(self.install_path, 'seafile', 'bin') ++ self.bin_dir = '/usr/bin' + self.central_config_dir = os.path.join(self.top_dir, 'conf') + Utils.must_mkdir(self.central_config_dir) + + def check_pre_condiction(self): + def error_if_not_exists(path): + if not os.path.exists(path): + Utils.error('"%s" not found' % path) + + paths = [ +- os.path.join(self.install_path, 'seafile'), + os.path.join(self.install_path, 'seahub'), + os.path.join(self.install_path, 'runtime'), + ] +--- a/tools/seafile-admin ++++ b/tools/seafile-admin +@@ -864,3 +864,10 @@ ++ # seahub.db is useless with MySQL and crash the startup! ++ with open(files[3], 'r') as f: ++ for line in f: ++ if 'DATABASES' in line: ++ del(files[2]) ++ break ++ + for fpath in files: + if not os.path.exists(fpath): + error('%s not found' % fpath) |