user/onlyoffice-document-server: new aport
This commit is contained in:
parent
0db9ff5c2b
commit
07d9405eac
4 changed files with 236 additions and 0 deletions
54
user/onlyoffice-document-server/APKBUILD
Normal file
54
user/onlyoffice-document-server/APKBUILD
Normal file
|
@ -0,0 +1,54 @@
|
|||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=onlyoffice-document-server
|
||||
pkgver=7.3.3
|
||||
_buildno=50
|
||||
pkgrel=0
|
||||
pkgdesc="ONLYOFFICE Docs is a free collaborative online office suite"
|
||||
url="https://github.com/ONLYOFFICE/DocumentServer"
|
||||
arch="x86_64"
|
||||
license="AGPL-3.0"
|
||||
makedepends="make g++ nodejs npm autoconf automake openjdk20-jdk"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://lab.ilot.io/mirrors/onlyoffice-document-server/-/releases/v$pkgver/downloads/tarball/onlyoffice-document-server-v$pkgver.tar.gz
|
||||
$pkgname-build_tools-$pkgver.$_buildno.tar.gz::https://github.com/ONLYOFFICE/build_tools/archive/refs/tags/v$pkgver.$_buildno.tar.gz
|
||||
server_fix-makefile.patch
|
||||
server_restore-mobile-editing.patch
|
||||
web-apps_restore-mobile-editing.patch
|
||||
"
|
||||
builddir="$srcdir"/$pkgname-v$pkgver
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
npm install -g --prefix "$srcdir"/npm_cache pkg grunt grunt-cli gifsicle
|
||||
ln -s ../build_tools-$pkgver.$_buildno build_tools
|
||||
}
|
||||
|
||||
build() {
|
||||
export PATH="$PATH:$srcdir/npm_cache/bin"
|
||||
msg "Building 3rdparty"
|
||||
cd "$builddir"/core/Common/3dParty
|
||||
./make.sh
|
||||
msg "Building sdkjs"
|
||||
cd "$builddir"/sdkjs
|
||||
msg "Building server"
|
||||
cd "$builddir"/server
|
||||
make
|
||||
}
|
||||
|
||||
rootpkg() {
|
||||
export PATH="$PATH:$srcdir/npm_cache/bin"
|
||||
cd "$builddir"/server
|
||||
make install DESTDIR="$pkgdir"
|
||||
}
|
||||
|
||||
|
||||
|
||||
sha512sums="
|
||||
e4601334830932515e4ba165eeeab935059d80523fcb4888da0b88b5fe6b3a2feff1f9c60166f4dbbaceabe546fe075f253b302eb0a7510c3b7762a06ab38755 onlyoffice-document-server-7.3.3.tar.gz
|
||||
176b9a7649fc1d4f2e633de706d019ddb09011bf2baebce18d2b9aa5a523c69240eb6efaed32d665fc47a09b2e8931f0163a9aafc30dc3390e0a6c479b6dda73 onlyoffice-document-server-build_tools-7.3.3.50.tar.gz
|
||||
dce838e901720cf18ccc8035e02b9f8fea0f38a448124321663612027058467de152bfc9c257a3bd14a0ab33a00962f604e1d6c5a7040d7f1b117d260e286839 server_fix-makefile.patch
|
||||
7c70d7392040ed415da0cdce91c71926624c20a36f850ba9affaff3353368830cc172c243cebc608d72051627c7e44de232818c93453b8c7e58314f05e450b2d server_restore-mobile-editing.patch
|
||||
5d5758b59c2e8e2b6a31d99efb7e3ad42c60ab035af3641be5f3d84f02a1ea5abf51a380cfc55e403569ebdf3620a9c67c81b8bd0ba4632fc0b5f0506e9cf57e web-apps_restore-mobile-editing.patch
|
||||
"
|
41
user/onlyoffice-document-server/server_fix-makefile.patch
Normal file
41
user/onlyoffice-document-server/server_fix-makefile.patch
Normal file
|
@ -0,0 +1,41 @@
|
|||
diff --git a/server/Makefile.orig b/server/Makefile
|
||||
index e8e1308..cd01a39 100644
|
||||
--- a/server/Makefile.orig
|
||||
+++ b/server/Makefile
|
||||
@@ -141,7 +141,6 @@ clean:
|
||||
|
||||
install:
|
||||
mkdir -pv ${DESTDIR}/var/www/onlyoffice
|
||||
- if ! id -u onlyoffice > /dev/null 2>&1; then useradd -m -d /var/www/onlyoffice -r -U onlyoffice; fi
|
||||
|
||||
mkdir -p ${DESTDIR}${DOCUMENT_ROOT}/fonts
|
||||
mkdir -p ${DESTDIR}/var/log/onlyoffice/documentserver
|
||||
@@ -151,10 +150,6 @@ install:
|
||||
mkdir -p ${DESTDIR}/etc/onlyoffice/documentserver
|
||||
mv ${DESTDIR}${DOCUMENT_ROOT}/server/Common/config/* ${DESTDIR}/etc/onlyoffice/documentserver
|
||||
|
||||
- chown onlyoffice:onlyoffice -R ${DESTDIR}/var/www/onlyoffice
|
||||
- chown onlyoffice:onlyoffice -R ${DESTDIR}/var/log/onlyoffice
|
||||
- chown onlyoffice:onlyoffice -R ${DESTDIR}/var/lib/onlyoffice
|
||||
-
|
||||
# Make symlinks for shared libs
|
||||
find \
|
||||
${DESTDIR}${DOCUMENT_ROOT}/server/FileConverter/bin \
|
||||
@@ -162,7 +157,7 @@ install:
|
||||
-name *$(SHARED_EXT) \
|
||||
-exec sh -c 'ln -sf {} ${DESTDIR}/lib/$$(basename {})' \;
|
||||
|
||||
- sudo -u onlyoffice "${DESTDIR}${DOCUMENT_ROOT}/server/tools/allfontsgen"\
|
||||
+ "${DESTDIR}${DOCUMENT_ROOT}/server/tools/allfontsgen"\
|
||||
--input="${DESTDIR}${DOCUMENT_ROOT}/core-fonts"\
|
||||
--allfonts-web="${DESTDIR}${DOCUMENT_ROOT}/sdkjs/common/AllFonts.js"\
|
||||
--allfonts="${DESTDIR}${DOCUMENT_ROOT}/server/FileConverter/bin/AllFonts.js"\
|
||||
@@ -171,7 +166,7 @@ install:
|
||||
--output-web="${DESTDIR}${DOCUMENT_ROOT}/fonts"\
|
||||
--use-system="true"
|
||||
|
||||
- sudo -u onlyoffice "${DESTDIR}${DOCUMENT_ROOT}/server/tools/allthemesgen"\
|
||||
+ "${DESTDIR}${DOCUMENT_ROOT}/server/tools/allthemesgen"\
|
||||
--converter-dir="${DESTDIR}${DOCUMENT_ROOT}/server/FileConverter/bin"\
|
||||
--src="${DESTDIR}${DOCUMENT_ROOT}/sdkjs/slide/themes"\
|
||||
--output="${DESTDIR}${DOCUMENT_ROOT}/sdkjs/common/Images"
|
|
@ -0,0 +1,90 @@
|
|||
diff --git a/server/DocService/sources/server.js b/server/DocService/sources/server.js
|
||||
index 5c744f6..edfb423 100644
|
||||
--- a/server/DocService/sources/server.js
|
||||
+++ b/server/DocService/sources/server.js
|
||||
@@ -110,7 +110,6 @@ if (!(cfgTokenEnableBrowser && cfgTokenEnableRequestInbox && cfgTokenEnableReque
|
||||
|
||||
if (!tenantManager.isMultitenantMode()) {
|
||||
updateLicense();
|
||||
- fs.watchFile(cfgLicenseFile, updateLicense);
|
||||
setInterval(updateLicense, 86400000);
|
||||
}
|
||||
|
||||
diff --git a/server/Makefile b/server/Makefile
|
||||
index e8e1308..23f7e2e 100644
|
||||
--- a/server/Makefile
|
||||
+++ b/server/Makefile
|
||||
@@ -87,7 +87,7 @@ DEBUG = $(BRANDING_DIR)/debug.js
|
||||
.PHONY: all clean install uninstall build-date
|
||||
|
||||
.NOTPARALLEL:
|
||||
-all: $(SPELLCHECKER_DICTIONARIES) $(TOOLS) $(SCHEMA) $(CORE_FONTS) $(DOCUMENT_TEMPLATES) $(LICENSE) $(WELCOME) $(INFO) build-date
|
||||
+all: $(SCHEMA) $(LICENSE) $(WELCOME) $(INFO) build-date
|
||||
|
||||
build-date: $(GRUNT_FILES)
|
||||
sed "s|\(const buildVersion = \).*|\1'${PRODUCT_VERSION}';|" -i $(COMMON_DEFINES_JS)
|
||||
diff --git a/server/Common/sources/constants.js.orig b/server/Common/sources/constants.js
|
||||
index b9c2906..4124680 100644
|
||||
--- a/server/Common/sources/constants.js.orig
|
||||
+++ b/server/Common/sources/constants.js
|
||||
@@ -84,7 +84,7 @@ exports.LICENSE_RESULT = {
|
||||
UsersViewCountOS: 15
|
||||
};
|
||||
|
||||
-exports.LICENSE_CONNECTIONS = 20;
|
||||
+exports.LICENSE_CONNECTIONS = 9999;
|
||||
exports.LICENSE_EXPIRE_USERS_ONE_DAY = 24 * 60 * 60; // day in seconds
|
||||
|
||||
exports.AVS_OFFICESTUDIO_FILE_UNKNOWN = 0x0000;
|
||||
diff --git a/server/Common/sources/license.js.orig b/server/Common/sources/license.js
|
||||
index 1b617c6..fc72302 100644
|
||||
--- a/server/Common/sources/license.js.orig
|
||||
+++ b/server/Common/sources/license.js
|
||||
@@ -45,24 +45,24 @@ exports.readLicense = function*() {
|
||||
count: 1,
|
||||
type: c_LR.Success,
|
||||
light: false,
|
||||
- packageType: constants.PACKAGE_TYPE_OS,
|
||||
+ packageType: constants.PACKAGE_TYPE_I,
|
||||
mode: constants.LICENSE_MODE.None,
|
||||
- branding: false,
|
||||
+ branding: true,
|
||||
connections: constants.LICENSE_CONNECTIONS,
|
||||
connectionsView: constants.LICENSE_CONNECTIONS,
|
||||
- customization: false,
|
||||
- advancedApi: false,
|
||||
- usersCount: 0,
|
||||
- usersViewCount: 0,
|
||||
+ customization: true,
|
||||
+ advancedApi: true,
|
||||
+ usersCount: constants.LICENSE_CONNECTIONS,
|
||||
+ usersViewCount: constants.LICENSE_CONNECTIONS,
|
||||
usersExpire: constants.LICENSE_EXPIRE_USERS_ONE_DAY,
|
||||
- hasLicense: false,
|
||||
- plugins: false,
|
||||
+ hasLicense: true,
|
||||
+ plugins: true,
|
||||
buildDate: oBuildDate,
|
||||
startDate: startDate,
|
||||
- endDate: null,
|
||||
+ endDate: new Date("2099-01-01T23:59:59.000Z"),
|
||||
customerId: "",
|
||||
- alias: ""
|
||||
+ alias: "community"
|
||||
}, null];
|
||||
};
|
||||
|
||||
-exports.packageType = constants.PACKAGE_TYPE_OS;
|
||||
+exports.packageType = constants.PACKAGE_TYPE_I;
|
||||
diff --git a/server/FileConverter/sources/convertermaster.js.orig b/server/FileConverter/sources/convertermaster.js
|
||||
index 2a0b366..96468f9 100644
|
||||
--- a/server/FileConverter/sources/convertermaster.js.orig
|
||||
+++ b/server/FileConverter/sources/convertermaster.js
|
||||
@@ -93,7 +93,6 @@ if (cluster.isMaster) {
|
||||
updateLicense();
|
||||
|
||||
if (!tenantManager.isMultitenantMode()) {
|
||||
- fs.watchFile(cfgLicenseFile, updateLicense);
|
||||
setInterval(updateLicense, 86400000);
|
||||
}
|
||||
} else {
|
|
@ -0,0 +1,51 @@
|
|||
From 692bef4561ef9978c6b8663dd618211bf526b69f Mon Sep 17 00:00:00 2001
|
||||
From: Beeant <huangxb0512@gmail.com>
|
||||
Date: Sat, 24 Sep 2022 21:39:36 +0800
|
||||
Subject: [PATCH] build: license
|
||||
|
||||
---
|
||||
apps/documenteditor/mobile/src/lib/web-apps/patch.jsx | 2 +-
|
||||
apps/presentationeditor/mobile/src/lib/web-apps/patch.jsx | 2 +-
|
||||
apps/spreadsheeteditor/mobile/src/lib/web-apps/patch.jsx | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/web-apps/apps/documenteditor/mobile/src/lib/web-apps/patch.jsx b/apps/documenteditor/mobile/src/lib/patch.jsx
|
||||
index 963aca451..1ee48e856 100644
|
||||
--- a/web-apps/apps/documenteditor/mobile/src/lib/web-apps/patch.jsx
|
||||
+++ b/web-apps/apps/documenteditor/mobile/src/lib/patch.jsx
|
||||
@@ -4,7 +4,7 @@ const EditorUIController = () => {
|
||||
};
|
||||
|
||||
EditorUIController.isSupportEditFeature = () => {
|
||||
- return false
|
||||
+ return true
|
||||
};
|
||||
|
||||
EditorUIController.getToolbarOptions = () => {
|
||||
diff --git a/web-apps/apps/presentationeditor/mobile/src/lib/web-apps/patch.jsx b/apps/presentationeditor/mobile/src/lib/patch.jsx
|
||||
index ec7b37a2c..bfd879583 100644
|
||||
--- a/web-apps/apps/presentationeditor/mobile/src/lib/web-apps/patch.jsx
|
||||
+++ b/web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
const EditorUIController = () => null;
|
||||
|
||||
-EditorUIController.isSupportEditFeature = () => false;
|
||||
+EditorUIController.isSupportEditFeature = () => true;
|
||||
|
||||
export default EditorUIController;
|
||||
diff --git a/web-apps/apps/spreadsheeteditor/mobile/src/lib/web-apps/patch.jsx b/apps/spreadsheeteditor/mobile/src/lib/patch.jsx
|
||||
index ec7b37a2c..bfd879583 100644
|
||||
--- a/web-apps/apps/spreadsheeteditor/mobile/src/lib/web-apps/patch.jsx
|
||||
+++ b/web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
const EditorUIController = () => null;
|
||||
|
||||
-EditorUIController.isSupportEditFeature = () => false;
|
||||
+EditorUIController.isSupportEditFeature = () => true;
|
||||
|
||||
export default EditorUIController;
|
||||
--
|
||||
2.31.1.windows.1
|
||||
|
Loading…
Reference in a new issue