From nobody Tue Nov 12 09:49:43 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnhTg2SGhz5cHBm; Tue, 12 Nov 2024 09:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnhTg23crz4rw6; Tue, 12 Nov 2024 09:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731404983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHc2PobCptwmFeQwkuDEh4IoxvlQRjY9xuRs0h7HNA0=; b=idrwZKSq1vs5l8EsewYKD8lHUgDQR08p9kzgz55gAr7iC60o47QqCMw1oPRLuuf+vbHY67 yPWlSZPeSRyG1Uh/RvDdUXPMOa7Lx1RSeFyUXND40uyM0LEytlr2vbZzR3AcPVYGBOPPkc b4kLUcaqmaKbpnS4kgB9UwErnCFHkx2wwODVrtsQs7dlOid2ySHkp0UPUcTK20qKqWzoAv HapNCUgHKGjIhJE1EV5gR3pTyxA/eqxLq+D/V9qwBmD5ffOWO1zsOn7aASr0TEyGbxqsQM 7g6FfckJS1EBev/lvJ7rBlV0kUCz6HZLOFqCudYqO06bjUjNN55C0DNW4+BJ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731404983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHc2PobCptwmFeQwkuDEh4IoxvlQRjY9xuRs0h7HNA0=; b=DnE/4adR+/sqxrjPsdbF45/0wUCoky2cAdQ+RxdO/JGqcvKLYE3r95VajeEMUBlRaeIrCv F3ymN3IOXdQAw5+l/81Z9CeA1wc73TE0RrLMDEgpGQtwSXpB/tsVyWPnnkL+x3Ropbyijr pCnLfP3Ybr1IZDckupknz5hyYevBeErrnWzc34sEJv9HoJkthqaXww9vb8LML0Ss3nXUXR VSPXcHfijhn+XaNlHix/0copASbdMM1lg1yWbNSRhkQ08kuJuLDezgzSSqNpXr74wv1pne xYAar4xk49wTd7hDSOjhwHObId7vBROVG5RNTbw7YA5jsqBGbQqq6aB0vwwlEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731404983; a=rsa-sha256; cv=none; b=qkU/VxLjoY7sTcSIdR/owquDTF+dKhL2gxLOvFgXRNexkD6RYBnOU2NkxzUceoaBfk27dR VGJHaVY4UM0Tr7oEi+08qxgNOzksmBLEX602+nmcouijowEVB1Bm/BJpxOp/+BaJ+FaS9Y FdADQiAinnoF+oSI0mDjnK1x1wqo+IdkjCAJlmGgGOw+h1Iu2tw6a/5D/UYQLI6T3a4qIQ z8upn48D+bo1rpoOcqCnWSeYplfqdWSomw8xH1bZhuvi6ZekCzJEMkM2vhjvXbvI5eymju yvFvJQviK22p6Ymy3spyxtTCJEwJjM+ucQrrxyKIuraw5P7Tg4UJqVm7+AOJJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XnhTg1bN5z14RG; Tue, 12 Nov 2024 09:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AC9nhIL082503; Tue, 12 Nov 2024 09:49:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AC9nhPg082500; Tue, 12 Nov 2024 09:49:43 GMT (envelope-from git) Date: Tue, 12 Nov 2024 09:49:43 GMT Message-Id: <202411120949.4AC9nhPg082500@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Mikael Urankar Subject: git: f690c1a6f491 - main - www/onlyoffice-documentserver: Fix patch List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mikael X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f690c1a6f491dca7ace703f17699742a44d7f125 Auto-Submitted: auto-generated The branch main has been updated by mikael: URL: https://cgit.FreeBSD.org/ports/commit/?id=f690c1a6f491dca7ace703f17699742a44d7f125 commit f690c1a6f491dca7ace703f17699742a44d7f125 Author: Mikael Urankar AuthorDate: 2024-11-12 09:49:24 +0000 Commit: Mikael Urankar CommitDate: 2024-11-12 09:49:39 +0000 www/onlyoffice-documentserver: Fix patch --- .../patch-core_Common_3dParty_openssl_openssl.pri | 4 +- .../files/patch-document-server-package_Makefile | 314 ++++++++++----------- 2 files changed, 159 insertions(+), 159 deletions(-) diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_openssl_openssl.pri b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_openssl_openssl.pri index dc322326cf8e..b8ab7f52a282 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_openssl_openssl.pri +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_openssl_openssl.pri @@ -6,8 +6,8 @@ } else { - LIBS += $$OPENSSL_LIBS_DIRECTORY/libssl.a - LIBS += $$OPENSSL_LIBS_DIRECTORY/libcrypto.a -+ LIBS += %%LOCALBASE%%/lib/libssl.a -+ LIBS += %%LOCALBASE%%/lib/libcrypto.a ++ LIBS += /usr/local/lib/libssl.a ++ LIBS += /usr/local/lib/libcrypto.a } INCLUDEPATH += $$OPENSSL_LIBS_DIRECTORY/../include diff --git a/www/onlyoffice-documentserver/files/patch-document-server-package_Makefile b/www/onlyoffice-documentserver/files/patch-document-server-package_Makefile index 8c61f53eb53e..bd67e4e74edf 100644 --- a/www/onlyoffice-documentserver/files/patch-document-server-package_Makefile +++ b/www/onlyoffice-documentserver/files/patch-document-server-package_Makefile @@ -1,160 +1,160 @@ --- document-server-package/Makefile.orig 2024-02-12 13:46:57.000000000 +0100 +++ document-server-package/Makefile 2024-03-01 10:49:36.212407000 +0100 -@@ -23,6 +23,7 @@ PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER) - PACKAGE_NAME := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW) - PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER) - -+UNAME_P ?= $(shell uname -p) - UNAME_M ?= $(shell uname -m) - ifeq ($(UNAME_M),x86_64) - RPM_ARCH := x86_64 -@@ -142,6 +143,22 @@ else - DS_EXAMLE := /var/www/$(DS_PREFIX)-example - DEV_NULL := /dev/null - endif -+ ifeq ($(UNAME_S),FreeBSD) -+ PLATFORM := freebsd -+ SHARED_EXT := .so* -+ SHELL_EXT := .sh -+ ARCH_EXT := .zip -+ AR := 7z a -y -+ PACKAGES = tar -+ DS_PREFIX := $(COMPANY_NAME_LOW)/$(PRODUCT_SHORT_NAME_LOW) -+ NGINX_CONF := %%ETCDIR%%/documentserver/nginx/includes -+ NGINX_LOG := /var/log/$(DS_PREFIX) -+ DS_ROOT := %%LOCALBASE%%/www/$(DS_PREFIX) -+ DS_FILES := /var/db/$(DS_PREFIX) -+ DS_EXAMLE := %%LOCALBASE%%/www/$(DS_PREFIX)-example -+ DEV_NULL := /dev/null -+ PKG_TARGET := node18 -+ endif - ifeq ($(UNAME_S),Darwin) - PLATFORM := mac - SHARED_EXT := .dylib -@@ -159,6 +176,12 @@ else - ifeq ($(UNAME_M),x86_64) - ARCHITECTURE := 64 - endif -+ ifeq ($(UNAME_P),amd64) -+ ARCHITECTURE := 64 -+ endif -+ ifeq ($(UNAME_P),aarch64) -+ ARCHITECTURE := 64 -+ endif - ifneq ($(filter %86,$(UNAME_M)),) - ARCHITECTURE := 32 - endif -@@ -320,7 +343,7 @@ documentserver: - - documentserver: - mkdir -p $(DOCUMENTSERVER_FILES) -- cp -rf -t $(DOCUMENTSERVER) ../build_tools/out/$(TARGET)/$(COMPANY_NAME_LOW)/$(PRODUCT_SHORT_NAME_LOW)/* -+ cp -rf ../build_tools/out/$(TARGET)/$(COMPANY_NAME_LOW)/$(PRODUCT_SHORT_NAME_LOW)/* $(DOCUMENTSERVER) - - mkdir -p $(DOCUMENTSERVER_CONFIG) - mkdir -p $(DOCUMENTSERVER_CONFIG)/log4js -@@ -329,25 +352,25 @@ documentserver: - mv -f $(DOCUMENTSERVER)/server/Common/config/log4js/*.json $(DOCUMENTSERVER_CONFIG)/log4js/ - - # rename product specific folders -- sed "s|onlyoffice\/documentserver|"$(DS_PREFIX)"|" -i $(DOCUMENTSERVER_CONFIG)/*.json -+ sed -i '' "s|onlyoffice\/documentserver|"$(DS_PREFIX)"|" $(DOCUMENTSERVER_CONFIG)/*.json - - # rename db account params -- sed 's|\("db.*": "\)onlyoffice\("\)|\1'$(ONLYOFFICE_VALUE)'\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json -+ sed -i '' 's|\("db.*": "\)onlyoffice\("\)|\1'$(ONLYOFFICE_VALUE)'\2|' $(DOCUMENTSERVER_CONFIG)/*.json - - # rename db schema name -- sed 's|onlyoffice|'$(ONLYOFFICE_VALUE)'|' -i $(DOCUMENTSERVER)/server/schema/**/*.sql -+ sed -i '' 's|onlyoffice|'$(ONLYOFFICE_VALUE)'|' $(DOCUMENTSERVER)/server/schema/**/*.sql - - # ignore CREATE DATABASE commands in MySQL -- sed -r "s/^(CREATE DATABASE|USE)/-- \1/" -i $(DOCUMENTSERVER)/server/schema/mysql/*.sql -+ sed -i '' -r "s/^(CREATE DATABASE|USE)/-- \1/" $(DOCUMENTSERVER)/server/schema/mysql/*.sql - - # rename product in license -- sed 's|ONLYOFFICE|'$(COMPANY_NAME)'|' -i $(DOCUMENTSERVER)/server/3rd-Party.txt -- sed 's|DocumentServer|'$(PRODUCT_NAME)'|' -i $(DOCUMENTSERVER)/server/3rd-Party.txt -+ sed -i '' 's|ONLYOFFICE|'$(COMPANY_NAME)'|' $(DOCUMENTSERVER)/server/3rd-Party.txt -+ sed -i '' 's|DocumentServer|'$(PRODUCT_NAME)'|' $(DOCUMENTSERVER)/server/3rd-Party.txt - - # Prevent for modification original config - chmod ug=r $(DOCUMENTSERVER_CONFIG)/*.json - -- cp -fr -t $(DOCUMENTSERVER) $(3RD_PARTY_LICENSE_FILES) -+ cp -fr $(3RD_PARTY_LICENSE_FILES) $(DOCUMENTSERVER) - rm -fr $(3RD_PARTY_LICENSE_FILES) - - ifeq ($(PLATFORM),win) -@@ -357,34 +380,34 @@ endif - endif - - [ -f $(LICENSE_FILE) ] \ -- && cp -f -t $(DOCUMENTSERVER) $(LICENSE_FILE) \ -- || cp -f -t $(DOCUMENTSERVER) LICENSE.txt -+ && cp -f $(LICENSE_FILE) $(DOCUMENTSERVER) \ -+ || cp -f LICENSE.txt $(DOCUMENTSERVER) - - chmod u+x $(DOCUMENTSERVER)/server/FileConverter/bin/x2t$(EXEC_EXT) - #chmod u+x $(DOCUMENTSERVER)/server/FileConverter/bin/docbuilder$(EXEC_EXT) - [ -f $(HTMLFILEINTERNAL)$(EXEC_EXT) ] && chmod u+x $(HTMLFILEINTERNAL)$(EXEC_EXT) || true - chmod u+x $(DOCUMENTSERVER)/server/tools/allfontsgen$(EXEC_EXT) - -- sed "s|\(_dc=\)0|\1"$(PACKAGE_VERSION)"|" -i $(DOCUMENTSERVER)/web-apps/apps/api/documents/api.js.tpl -+ sed -i '' "s|\(_dc=\)0|\1"$(PACKAGE_VERSION)"|" $(DOCUMENTSERVER)/web-apps/apps/api/documents/api.js.tpl - - ifeq ($(PRODUCT_NAME_LOW), documentserver) -- sed 's|\("packageType": \)[0-9]\+\(.*\)|\10\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json -- sed 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataMemory\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json -+ sed -i '' 's|\("packageType": \)[0-9]\+\(.*\)|\10\2|' $(DOCUMENTSERVER_CONFIG)/*.json -+ sed -i '' 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataMemory\2|' $(DOCUMENTSERVER_CONFIG)/*.json - endif - - ifeq ($(PRODUCT_NAME_LOW), $(filter $(PRODUCT_NAME_LOW),documentserver-ee documentserver-ie)) -- sed 's|\("packageType": \)[0-9]\+\(.*\)|\11\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json -- sed 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataRedis\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json -+ sed -i '' 's|\("packageType": \)[0-9]\+\(.*\)|\11\2|' $(DOCUMENTSERVER_CONFIG)/*.json -+ sed -i '' 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataRedis\2|' $(DOCUMENTSERVER_CONFIG)/*.json - endif - - ifeq ($(PRODUCT_NAME_LOW), documentserver-de) -- sed 's|\("packageType": \)[0-9]\+\(.*\)|\12\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json -- sed 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataRedis\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json -+ sed -i '' 's|\("packageType": \)[0-9]\+\(.*\)|\12\2|' $(DOCUMENTSERVER_CONFIG)/*.json -+ sed -i '' 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataRedis\2|' $(DOCUMENTSERVER_CONFIG)/*.json - endif - - cd $(DOCUMENTSERVER)/npm && \ - npm install && \ -- pkg ./node_modules/json $(PKG_TARGET:%=-t %) -o json -+ env PKG_CACHE_PATH=%%WRKDIR%%/.pkg-cache "%%WRKSRC%%/yao-pkg/node_modules/.bin/pkg" ./node_modules/json $(PKG_TARGET:%=-t %) -o json - - ifeq ($(PLATFORM),win) - cd $(DOCUMENTSERVER)/npm && \ -@@ -398,7 +421,7 @@ documentserver-example: - - documentserver-example: - mkdir -p $(DOCUMENTSERVER_EXAMPLE) -- cp -rf -t $(DOCUMENTSERVER_EXAMPLE) ../build_tools/out/$(TARGET)/$(COMPANY_NAME_LOW)/$(PRODUCT_SHORT_NAME_LOW)-example/* common/documentserver-example/welcome -+ cp -rf ../build_tools/out/$(TARGET)/$(COMPANY_NAME_LOW)/$(PRODUCT_SHORT_NAME_LOW)-example/* common/documentserver-example/welcome $(DOCUMENTSERVER_EXAMPLE) - - mkdir -p $(DOCUMENTSERVER_EXAMPLE_CONFIG) - -@@ -407,7 +430,7 @@ documentserver-example: - # Prevent for modification original config - chmod ug=r $(DOCUMENTSERVER_EXAMPLE_CONFIG)/*.json - -- sed "s|{{OFFICIAL_PRODUCT_NAME}}|"$(OFFICIAL_PRODUCT_NAME)"|" -i $(DOCUMENTSERVER_EXAMPLE)/welcome/*.html -+ sed -i '' "s|{{OFFICIAL_PRODUCT_NAME}}|"$(OFFICIAL_PRODUCT_NAME)"|" $(DOCUMENTSERVER_EXAMPLE)/welcome/*.html - - /usr/bin/find $(DOCUMENTSERVER_EXAMPLE)/welcome -depth -type f -exec sed -i "s_{{year}}_$(shell date +"%Y")_g" {} \; - +@@ -23,6 +23,7 @@ PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER) + PACKAGE_NAME := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW) + PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER) + ++UNAME_P ?= $(shell uname -p) + UNAME_M ?= $(shell uname -m) + ifeq ($(UNAME_M),x86_64) + RPM_ARCH := x86_64 +@@ -142,6 +143,22 @@ else + DS_EXAMLE := /var/www/$(DS_PREFIX)-example + DEV_NULL := /dev/null + endif ++ ifeq ($(UNAME_S),FreeBSD) ++ PLATFORM := freebsd ++ SHARED_EXT := .so* ++ SHELL_EXT := .sh ++ ARCH_EXT := .zip ++ AR := 7z a -y ++ PACKAGES = tar ++ DS_PREFIX := $(COMPANY_NAME_LOW)/$(PRODUCT_SHORT_NAME_LOW) ++ NGINX_CONF := /usr/local/etc/onlyoffice/documentserver/nginx/includes ++ NGINX_LOG := /var/log/$(DS_PREFIX) ++ DS_ROOT := /usr/local/www/$(DS_PREFIX) ++ DS_FILES := /var/db/$(DS_PREFIX) ++ DS_EXAMLE := /usr/local/www/$(DS_PREFIX)-example ++ DEV_NULL := /dev/null ++ PKG_TARGET := node18 ++ endif + ifeq ($(UNAME_S),Darwin) + PLATFORM := mac + SHARED_EXT := .dylib +@@ -159,6 +176,12 @@ else + ifeq ($(UNAME_M),x86_64) + ARCHITECTURE := 64 + endif ++ ifeq ($(UNAME_P),amd64) ++ ARCHITECTURE := 64 ++ endif ++ ifeq ($(UNAME_P),aarch64) ++ ARCHITECTURE := 64 ++ endif + ifneq ($(filter %86,$(UNAME_M)),) + ARCHITECTURE := 32 + endif +@@ -320,7 +343,7 @@ documentserver: + + documentserver: + mkdir -p $(DOCUMENTSERVER_FILES) +- cp -rf -t $(DOCUMENTSERVER) ../build_tools/out/$(TARGET)/$(COMPANY_NAME_LOW)/$(PRODUCT_SHORT_NAME_LOW)/* ++ cp -rf ../build_tools/out/$(TARGET)/$(COMPANY_NAME_LOW)/$(PRODUCT_SHORT_NAME_LOW)/* $(DOCUMENTSERVER) + + mkdir -p $(DOCUMENTSERVER_CONFIG) + mkdir -p $(DOCUMENTSERVER_CONFIG)/log4js +@@ -329,25 +352,25 @@ documentserver: + mv -f $(DOCUMENTSERVER)/server/Common/config/log4js/*.json $(DOCUMENTSERVER_CONFIG)/log4js/ + + # rename product specific folders +- sed "s|onlyoffice\/documentserver|"$(DS_PREFIX)"|" -i $(DOCUMENTSERVER_CONFIG)/*.json ++ sed -i '' "s|onlyoffice\/documentserver|"$(DS_PREFIX)"|" $(DOCUMENTSERVER_CONFIG)/*.json + + # rename db account params +- sed 's|\("db.*": "\)onlyoffice\("\)|\1'$(ONLYOFFICE_VALUE)'\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json ++ sed -i '' 's|\("db.*": "\)onlyoffice\("\)|\1'$(ONLYOFFICE_VALUE)'\2|' $(DOCUMENTSERVER_CONFIG)/*.json + + # rename db schema name +- sed 's|onlyoffice|'$(ONLYOFFICE_VALUE)'|' -i $(DOCUMENTSERVER)/server/schema/**/*.sql ++ sed -i '' 's|onlyoffice|'$(ONLYOFFICE_VALUE)'|' $(DOCUMENTSERVER)/server/schema/**/*.sql + + # ignore CREATE DATABASE commands in MySQL +- sed -r "s/^(CREATE DATABASE|USE)/-- \1/" -i $(DOCUMENTSERVER)/server/schema/mysql/*.sql ++ sed -i '' -r "s/^(CREATE DATABASE|USE)/-- \1/" $(DOCUMENTSERVER)/server/schema/mysql/*.sql + + # rename product in license +- sed 's|ONLYOFFICE|'$(COMPANY_NAME)'|' -i $(DOCUMENTSERVER)/server/3rd-Party.txt +- sed 's|DocumentServer|'$(PRODUCT_NAME)'|' -i $(DOCUMENTSERVER)/server/3rd-Party.txt ++ sed -i '' 's|ONLYOFFICE|'$(COMPANY_NAME)'|' $(DOCUMENTSERVER)/server/3rd-Party.txt ++ sed -i '' 's|DocumentServer|'$(PRODUCT_NAME)'|' $(DOCUMENTSERVER)/server/3rd-Party.txt + + # Prevent for modification original config + chmod ug=r $(DOCUMENTSERVER_CONFIG)/*.json + +- cp -fr -t $(DOCUMENTSERVER) $(3RD_PARTY_LICENSE_FILES) ++ cp -fr $(3RD_PARTY_LICENSE_FILES) $(DOCUMENTSERVER) + rm -fr $(3RD_PARTY_LICENSE_FILES) + + ifeq ($(PLATFORM),win) +@@ -357,34 +380,34 @@ endif + endif + + [ -f $(LICENSE_FILE) ] \ +- && cp -f -t $(DOCUMENTSERVER) $(LICENSE_FILE) \ +- || cp -f -t $(DOCUMENTSERVER) LICENSE.txt ++ && cp -f $(LICENSE_FILE) $(DOCUMENTSERVER) \ ++ || cp -f LICENSE.txt $(DOCUMENTSERVER) + + chmod u+x $(DOCUMENTSERVER)/server/FileConverter/bin/x2t$(EXEC_EXT) + #chmod u+x $(DOCUMENTSERVER)/server/FileConverter/bin/docbuilder$(EXEC_EXT) + [ -f $(HTMLFILEINTERNAL)$(EXEC_EXT) ] && chmod u+x $(HTMLFILEINTERNAL)$(EXEC_EXT) || true + chmod u+x $(DOCUMENTSERVER)/server/tools/allfontsgen$(EXEC_EXT) + +- sed "s|\(_dc=\)0|\1"$(PACKAGE_VERSION)"|" -i $(DOCUMENTSERVER)/web-apps/apps/api/documents/api.js.tpl ++ sed -i '' "s|\(_dc=\)0|\1"$(PACKAGE_VERSION)"|" $(DOCUMENTSERVER)/web-apps/apps/api/documents/api.js.tpl + + ifeq ($(PRODUCT_NAME_LOW), documentserver) +- sed 's|\("packageType": \)[0-9]\+\(.*\)|\10\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json +- sed 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataMemory\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json ++ sed -i '' 's|\("packageType": \)[0-9]\+\(.*\)|\10\2|' $(DOCUMENTSERVER_CONFIG)/*.json ++ sed -i '' 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataMemory\2|' $(DOCUMENTSERVER_CONFIG)/*.json + endif + + ifeq ($(PRODUCT_NAME_LOW), $(filter $(PRODUCT_NAME_LOW),documentserver-ee documentserver-ie)) +- sed 's|\("packageType": \)[0-9]\+\(.*\)|\11\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json +- sed 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataRedis\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json ++ sed -i '' 's|\("packageType": \)[0-9]\+\(.*\)|\11\2|' $(DOCUMENTSERVER_CONFIG)/*.json ++ sed -i '' 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataRedis\2|' $(DOCUMENTSERVER_CONFIG)/*.json + endif + + ifeq ($(PRODUCT_NAME_LOW), documentserver-de) +- sed 's|\("packageType": \)[0-9]\+\(.*\)|\12\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json +- sed 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataRedis\2|' -i $(DOCUMENTSERVER_CONFIG)/*.json ++ sed -i '' 's|\("packageType": \)[0-9]\+\(.*\)|\12\2|' $(DOCUMENTSERVER_CONFIG)/*.json ++ sed -i '' 's|\("editorDataStorage": "\).\+\(".*\)|\1editorDataRedis\2|' $(DOCUMENTSERVER_CONFIG)/*.json + endif + + cd $(DOCUMENTSERVER)/npm && \ + npm install && \ +- pkg ./node_modules/json $(PKG_TARGET:%=-t %) -o json ++ env PKG_CACHE_PATH=%%WRKDIR%%/.pkg-cache "%%WRKSRC%%/yao-pkg/node_modules/.bin/pkg" ./node_modules/json $(PKG_TARGET:%=-t %) -o json + + ifeq ($(PLATFORM),win) + cd $(DOCUMENTSERVER)/npm && \ +@@ -398,7 +421,7 @@ documentserver-example: + + documentserver-example: + mkdir -p $(DOCUMENTSERVER_EXAMPLE) +- cp -rf -t $(DOCUMENTSERVER_EXAMPLE) ../build_tools/out/$(TARGET)/$(COMPANY_NAME_LOW)/$(PRODUCT_SHORT_NAME_LOW)-example/* common/documentserver-example/welcome ++ cp -rf ../build_tools/out/$(TARGET)/$(COMPANY_NAME_LOW)/$(PRODUCT_SHORT_NAME_LOW)-example/* common/documentserver-example/welcome $(DOCUMENTSERVER_EXAMPLE) + + mkdir -p $(DOCUMENTSERVER_EXAMPLE_CONFIG) + +@@ -407,7 +430,7 @@ documentserver-example: + # Prevent for modification original config + chmod ug=r $(DOCUMENTSERVER_EXAMPLE_CONFIG)/*.json + +- sed "s|{{OFFICIAL_PRODUCT_NAME}}|"$(OFFICIAL_PRODUCT_NAME)"|" -i $(DOCUMENTSERVER_EXAMPLE)/welcome/*.html ++ sed -i '' "s|{{OFFICIAL_PRODUCT_NAME}}|"$(OFFICIAL_PRODUCT_NAME)"|" $(DOCUMENTSERVER_EXAMPLE)/welcome/*.html + + /usr/bin/find $(DOCUMENTSERVER_EXAMPLE)/welcome -depth -type f -exec sed -i "s_{{year}}_$(shell date +"%Y")_g" {} \; + @@ -500,6 +523,8 @@ $(DEB): $(DEB_DEPS) $(COMMON_DEPS) $(LINUX_DEPS) docum - - %.exe: - cd $(@D) && $(ISCC) $(ISCC_PARAMS) common.iss -+ -+freebsd: $(COMMON_DEPS) $(LINUX_DEPS) documentserver - - $(EXE): $(COMMON_DEPS) documentserver documentserver-example $(NGINX) $(PSQL) $(WINSW) - + + %.exe: + cd $(@D) && $(ISCC) $(ISCC_PARAMS) common.iss ++ ++freebsd: $(COMMON_DEPS) $(LINUX_DEPS) documentserver + + $(EXE): $(COMMON_DEPS) documentserver documentserver-example $(NGINX) $(PSQL) $(WINSW) +