Improve Debian packages wrt Apache2 configuration

This commit is contained in:
Francis Lachapelle
2018-10-29 10:48:25 -04:00
parent 956d8d5596
commit a7f5d759bf
5 changed files with 29 additions and 6 deletions
+1 -2
View File
@@ -9,8 +9,7 @@ Package: sogo
Section: web
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, sope4.9-libxmlsaxdriver, sope4.9-db-connector, gnustep-make, libcurl3 | libcurl4, zip, liblasso3 (>= 2.3.5)
Recommends: memcached
Suggests: nginx
Recommends: memcached, apache2 | nginx | httpd
Description: a modern and scalable groupware
SOGo is a groupware server built around OpenGroupware.org (OGo) and
the SOPE application server with focus on scalability.
+1 -1
View File
@@ -80,7 +80,7 @@ install-arch: build-arch
install -D -m 644 Scripts/sogo-default debian/tmp/etc/default/sogo
install -D -m 644 debian/sogo.overrides debian/tmp/usr/share/lintian/overrides/sogo
install -D -m 644 Apache/SOGo.conf debian/tmp/etc/apache2/conf.d/SOGo.conf
install -D -m 644 Apache/SOGo.conf debian/tmp/etc/apache2/conf-available/SOGo.conf
install -D -m 644 Scripts/sogo.cron debian/tmp/etc/cron.d/sogo
install -D -m 644 Scripts/logrotate debian/tmp/etc/logrotate.d/sogo
install -d -m 750 debian/tmp/etc/sogo
+1 -1
View File
@@ -1,4 +1,4 @@
etc/apache2/conf.d/SOGo.conf
etc/apache2/conf-available/SOGo.conf
etc/cron.d/sogo
etc/default/sogo
etc/logrotate.d/sogo
+14 -2
View File
@@ -41,10 +41,22 @@ the packaging system.
Please check the list of database schema upgrade scripts
inside /usr/share/doc/sogo/ and apply them if needed.
More details can be found in the Upgrading section in
http://sogo.nu/files/docs/SOGo%20Installation%20Guide.pdf
More details can be found in the Upgrading section:
https://sogo.nu/files/docs/SOGoInstallationGuide.html#_upgrading
EOF
# Apache 2.2 / 2.4 kungfu
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke enconf SOGo || exit $?
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
if [ -d /etc/apache2/conf.d/ -a ! -e /etc/apache2/conf.d/SOGo.conf ]; then
ln -s ../conf-available/SOGo.conf /etc/apache2/conf.d/SOGo.conf
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
+12
View File
@@ -13,5 +13,17 @@ set -e
# for details, see /usr/share/doc/packaging-manual/
#DEBHELPER#
if [ "$1" = "deconfigure" ] ; then
# Apache 2.2 / 2.4 kungfu
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke disconf SOGo || exit $?
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
[ ! -L /etc/apache2/conf.d/SOGo.conf ] || rm /etc/apache2/conf.d/SOGo.conf
fi
fi
exit 0