DocSpace-buildtools/build/install/deb/debian/rules
Evgeniy Antonyuk 66ed2b6372
Bugfix/lintian error (#1158)
* Correction of systemd-service-file-references-to-obsolete-target error

* Correction of the changelog format

* Correction of package-uses-deprecated-debhelper-compat-version

* Correction of maintainer-script-needs-depends-on-adduser

* Correction of missing-debconf-dependency

* Correction of extended-description-is-probably-too-short

* Correction of various license format errors

* Correction of maintainer-script-lacks-home-in-adduser error

* Correction of duplicate-updaterc.d-calls-in-postinst error

* Correction of init.d-script-not-included-in-package error

* Correction of the error of missing the onlyoffice-login.conf file

* Correction of binary-from-other-architecture error

* Correction of missing-debian-source-format error

* Temporarily correct descriptions

* Correction of debhelper-but-no-misc-depends error

* Correct of missing-dependency-on-line error

* Correct of unstripped-binary-or-object error

* Correct of maintainer-script-lacks-debhelper-token error

* Change templates description

* Correction of untranslatable-debconf-templates error

* Fix configuration according to po-debconf recommendations

* Fix configuration according to po-debconf recommendations

* Fix condition for detecting existence of file

* Correct of script-with-language-extension error

* Correct of script-with-language-extension error

* Remove linux-arm runtimes packaging

* Add lintian-overrides

* Fix lintian-overrides creation condition

* Fix lintian-overrides creation condition

* Add overrides for the main package

* Add ignoring untranslatable-debconf-templates errors

* Errors correction: package-contains-eslint-config-file, package-contains-npm-ignore-file, package-contains-vcs-control-file

* Correction of node_modules error output

* Fix backup-file-in-package and macos-ds-store-file-in-package errors

* Add a override of the unusual-interpreter error

* Fix removing files that cause errors
2023-02-01 13:06:03 +05:00

67 lines
2.1 KiB
Makefile
Executable File

#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v
%:
dh $@ --with=systemd
PRODUCT={{product}}
CURRENT_PATH=${CURDIR}
SRC_PATH=$(shell cd ../../../; pwd)
SCRIPT_PATH=build/install/common
override_dh_auto_clean:
@echo "RULES.$@"
dh_testdir
rm -rf ${CURRENT_PATH}/debian/*.service
rm -rf ${CURRENT_PATH}/debian/*.lintian-overrides
rm -rf ${SRC_PATH}/build/install/${PRODUCT}*
override_dh_auto_configure:
@echo "RULES.$@"
dh_testdir
dh_auto_configure
dh_lintian
override_dh_auto_build:
cd ${SRC_PATH}/${SCRIPT_PATH}/systemd; \
bash build.sh -bp "${CURRENT_PATH}/debian/"; \
cd ${SRC_PATH}/${SCRIPT_PATH}; \
bash build-frontend.sh -sp ${SRC_PATH}; \
bash build-backend.sh -sp ${SRC_PATH}; \
bash publish-backend.sh -sp ${SRC_PATH} -ar "-r linux-x64"
find ${SRC_PATH}/publish/ \
-depth -type f -regex '.*\(eslintrc.*\|npmignore\|gitignore\|gitattributes\|gitmodules\|un~\|DS_Store\)' -exec rm -f {} \;
rm -rf ${SRC_PATH}/ASC.Migration.Runner/service/runtimes/linux-arm*
rm -f ${SRC_PATH}/config/nginx/onlyoffice-login.conf
sed -i "s@var/www@var/www/${PRODUCT}@g" ${SRC_PATH}/config/nginx/*.conf
sed -i "s@var/www@var/www/${PRODUCT}@g" ${SRC_PATH}/config/nginx/includes/*.conf
json -I -f ${SRC_PATH}/config/appsettings.services.json -e "this.logPath=\"/var/log/onlyoffice/${PRODUCT}\"" -e "this.socket={ 'path': '../ASC.Socket.IO/' }" \
-e "this.ssoauth={ 'path': '../ASC.SsoAuth/' }" -e "this.core={ 'products': { 'folder': '/var/www/${PRODUCT}/products', 'subfolder': 'server'} }"
for i in ${PRODUCT} $$(ls ${CURRENT_PATH}/debian/*.install | grep -oP 'debian/\K.*' | grep -o '^[^.]*'); do \
cp ${CURRENT_PATH}/debian/source/lintian-overrides ${CURRENT_PATH}/debian/$$i.lintian-overrides; \
done
override_dh_fixperms:
dh_fixperms
override_dh_auto_install:
dh_systemd_enable --no-enable
dh_systemd_start --no-start
override_dh_strip:
dh_strip -Xarm --no-automatic-dbgsym
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -Xarm -Xkafka
override_dh_installinit:
# don't do anything, silences lintian warnings "init.d-script-not-included-in-package"