2021-09-30 12:05:43 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
export DH_VERBOSE=1
|
|
|
|
export DH_OPTIONS=-v
|
|
|
|
|
|
|
|
%:
|
|
|
|
dh $@ --with=systemd
|
|
|
|
|
2022-09-01 18:10:34 +00:00
|
|
|
PRODUCT={{product}}
|
2021-09-30 12:05:43 +00:00
|
|
|
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
|
2023-02-01 08:06:03 +00:00
|
|
|
rm -rf ${CURRENT_PATH}/debian/*.lintian-overrides
|
2021-09-30 12:05:43 +00:00
|
|
|
rm -rf ${SRC_PATH}/build/install/${PRODUCT}*
|
|
|
|
|
|
|
|
override_dh_auto_configure:
|
|
|
|
@echo "RULES.$@"
|
|
|
|
dh_testdir
|
|
|
|
dh_auto_configure
|
2023-02-01 08:06:03 +00:00
|
|
|
dh_lintian
|
2021-09-30 12:05:43 +00:00
|
|
|
|
|
|
|
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}; \
|
2023-02-01 08:06:03 +00:00
|
|
|
bash publish-backend.sh -sp ${SRC_PATH} -ar "-r linux-x64"
|
2021-09-30 12:05:43 +00:00
|
|
|
|
2023-02-01 08:06:03 +00:00
|
|
|
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
|
2021-09-30 12:05:43 +00:00
|
|
|
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
|
2022-09-01 18:10:34 +00:00
|
|
|
|
2022-12-05 11:54:22 +00:00
|
|
|
json -I -f ${SRC_PATH}/config/appsettings.services.json -e "this.logPath=\"/var/log/onlyoffice/${PRODUCT}\"" -e "this.socket={ 'path': '../ASC.Socket.IO/' }" \
|
2022-09-01 18:10:34 +00:00
|
|
|
-e "this.ssoauth={ 'path': '../ASC.SsoAuth/' }" -e "this.core={ 'products': { 'folder': '/var/www/${PRODUCT}/products', 'subfolder': 'server'} }"
|
2023-02-01 08:06:03 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-04-28 10:15:22 +00:00
|
|
|
execute_after_dh_fixperms:
|
|
|
|
chmod o-rwx debian/${PRODUCT}-common/etc/onlyoffice/${PRODUCT}/*
|
2022-03-14 08:26:24 +00:00
|
|
|
|
2021-09-30 12:05:43 +00:00
|
|
|
override_dh_auto_install:
|
2022-06-10 10:11:33 +00:00
|
|
|
dh_systemd_enable --no-enable
|
2022-03-14 08:26:24 +00:00
|
|
|
dh_systemd_start --no-start
|
2021-09-30 12:05:43 +00:00
|
|
|
|
|
|
|
override_dh_strip:
|
2023-02-01 08:06:03 +00:00
|
|
|
dh_strip -Xarm --no-automatic-dbgsym
|
2021-09-30 12:05:43 +00:00
|
|
|
|
|
|
|
override_dh_shlibdeps:
|
2023-02-01 08:06:03 +00:00
|
|
|
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"
|