SHA256
1
0
forked from pool/gromox
gromox/debian.rules

32 lines
1.4 KiB
Makefile

#!/usr/bin/make -f
export DH_VERBOSE=1
phpdir := $(shell readlink -f $$(php-config --ini-path)/..)
INSTDIR := debian/gromox
%:
dh $@ --parallel --with autoreconf
override_dh_auto_install:
dh_auto_install
find ${INSTDIR} -type f -name "*.la" -print -delete
find ${INSTDIR} -type f -name "*.service" -exec \
perl -i -lpe 's{Type=simple}{Type=simple\nRestart=on-failure}' {} +
for i in /etc/gromox /var/lib/gromox /var/lib/gromox/domain \
/var/lib/gromox/queue \
/var/lib/gromox/queue/mess /var/lib/gromox/queue/save \
/var/lib/gromox/queue/cache \
/var/lib/gromox/queue/timer /var/lib/gromox/user \
/var/log/gromox /run/gromox \
/usr/lib/sysctl.d; do \
mkdir -pv debian/gromox/$$i; \
done
mkdir -pv debian/gromox${phpdir}/fpm/pool.d
cp -av debian/gromox/usr/share/gromox/fpm-gromox.conf.sample debian/gromox${phpdir}/fpm/pool.d/gromox.conf
sed -i 's#/run/php-fpm/php-gromox-fpm.sock#/run/php/php-gromox-fpm.sock#g' debian/gromox${phpdir}/fpm/pool.d/gromox.conf
mkdir -pv debian/gromox${phpdir}/mods-available debian/gromox${phpdir}/cli/conf.d debian/gromox${phpdir}/fpm/conf.d
mv -v debian/gromox${phpdir}/cli/conf.d/mapi.ini debian/gromox${phpdir}/mods-available/
ln -s ${phpdir}/mods-available/mapi.ini debian/gromox${phpdir}/cli/conf.d/mapi.ini
ln -s ${phpdir}/mods-available/mapi.ini debian/gromox${phpdir}/fpm/conf.d/mapi.ini