Jan Engelhardt 2023-01-12 11:54:01 +00:00 committed by Git OBS Bridge
parent e839a8e262
commit 891a1aa3d2
3 changed files with 41 additions and 12 deletions

View File

@ -1,4 +1,4 @@
gromox (1.28) unstable; urgency=low gromox (1.36.23.3447095) unstable; urgency=low
* Initial package. * Initial package.

View File

@ -1,10 +1,24 @@
#!/bin/sh #!/bin/sh
# %files set -e
chown root:gromox /etc/gromox || : . /usr/share/debconf/confmodule
chmod 0770 /etc/gromox || :
vd="/var/lib/gromox \ set_perms()
/var/lib/gromox/domain \ {
USER="$1"
GROUP="$2"
MODE="$3"
FILE="$4"
if ! dpkg-statoverride --list "$FILE" >/dev/null 2>&1; then
chown -R "$USER:$GROUP" "$FILE"
chmod -R $MODE "$FILE"
fi
}
xpostinst()
{
set_perms root gromox 0770 /etc/gromox || :
for i in /var/lib/gromox \
/var/lib/gromox/queue \ /var/lib/gromox/queue \
/var/lib/gromox/queue/cache \ /var/lib/gromox/queue/cache \
/var/lib/gromox/queue/clone \ /var/lib/gromox/queue/clone \
@ -12,11 +26,9 @@ vd="/var/lib/gromox \
/var/lib/gromox/queue/mess \ /var/lib/gromox/queue/mess \
/var/lib/gromox/queue/save \ /var/lib/gromox/queue/save \
/var/lib/gromox/queue/timer \ /var/lib/gromox/queue/timer \
/var/lib/gromox/user \ /var/log/gromox; do
/var/log/gromox" set_perms gromox gromox 0770 "$i" || :
chown gromox:gromox $vd || : done
chmod 0770 $vd || :
chmod 0770 /var/lib/gromox /var/log/gromox || :
# %post # %post
if test -x /usr/bin/systemd-tmpfiles; then if test -x /usr/bin/systemd-tmpfiles; then
@ -32,5 +44,20 @@ if test -x /usr/bin/systemctl; then
gromox-pop3.service gromox-timer.service gromox-zcore.service \ gromox-pop3.service gromox-timer.service gromox-zcore.service \
grommunio-chat.service \ grommunio-chat.service \
php7.4-fpm.service php8.0-fpm.service php8.1-fpm.service \ php7.4-fpm.service php8.0-fpm.service php8.1-fpm.service \
php8.2-fpm.service \
saslauthd.service 2>/dev/null || : saslauthd.service 2>/dev/null || :
fi fi
}
case "$1" in
configure|reconfigure)
xpostinst
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \"$1\"" >&2
exit 1
;;
esac

View File

@ -1,13 +1,15 @@
#!/usr/bin/make -f #!/usr/bin/make -f
export DH_VERBOSE=1 export DH_VERBOSE=1
phpdir := $(shell readlink -f $$(php-config --ini-path)/..) phpdir := $(shell readlink -f $$(php-config --ini-path)/..)
INSTDIR := debian/gromox
%: %:
dh $@ --parallel --with autoreconf dh $@ --parallel --with autoreconf
override_dh_auto_install: override_dh_auto_install:
dh_auto_install dh_auto_install
find ${INSTDIR} -type f -name "*.la" -delete find ${INSTDIR} -type f -name "*.la" -print -delete
perl -i -lpe 's{Type=simple}{Type=simple\nRestart=on-failure}' ${INSTDIR}/lib/systemd/system/*.service
for i in /etc/gromox /var/lib/gromox /var/lib/gromox/domain \ for i in /etc/gromox /var/lib/gromox /var/lib/gromox/domain \
/var/lib/gromox/queue /var/lib/gromox/queue/clone \ /var/lib/gromox/queue /var/lib/gromox/queue/clone \
/var/lib/gromox/queue/mess /var/lib/gromox/queue/save \ /var/lib/gromox/queue/mess /var/lib/gromox/queue/save \