diff --git a/packaging/debian-multiarch/changelog b/packaging/debian-multiarch/changelog new file mode 100644 index 000000000..82a72fc5b --- /dev/null +++ b/packaging/debian-multiarch/changelog @@ -0,0 +1,48 @@ +sogo (1.3.5) unstable; urgency=low + + * New upstream release. + + -- Inverse Support Wed, 25 January 2011 12:00:00 -0500 + +sogo (1.2.2) unstable; urgency=low + + * New upstream release. + + -- Inverse Support Tue, 04 May 2010 16:45:59 -0400 + +sogo (1.2.1) unstable; urgency=low + + * New upstream release. + * SOGo-debian.conf installed as /etc/apache2/conf.d/ + * SOGo.conf removed from documentation examples. + + -- Inverse Support Wed, 17 Feb 2010 11:06:41 -0500 + +sogo (1.2.0) unstable; urgency=low + + * New upstream release. + + -- Inverse Support Tue, 26 Jan 2010 08:34:20 -0500 + +sogo (1.1.0) unstable; urgency=low + + * New release + * Install a default Apache 2 configuration file. + * Added a dependency on sope4.9-libxmlsaxdriver, sope4.9-db-connector + + -- Inverse Support Wed, 28 Oct 2009 17:06:03 -0400 + +sogo (1.0.4) unstable; urgency=low + + * New release + * debian/control: + - bumped standards-version + - updated dependencies + + -- Inverse Support Tue, 11 Aug 2009 18:22:41 -0400 + +sogo (1.0.3) UNRELEASED; urgency=low + + * Initial package + + -- Cyril Robert Tue, 23 Dec 2008 00:49:45 +0100 diff --git a/packaging/debian-multiarch/compat b/packaging/debian-multiarch/compat new file mode 100644 index 000000000..45a4fb75d --- /dev/null +++ b/packaging/debian-multiarch/compat @@ -0,0 +1 @@ +8 diff --git a/packaging/debian-multiarch/control b/packaging/debian-multiarch/control new file mode 100644 index 000000000..919a6ee69 --- /dev/null +++ b/packaging/debian-multiarch/control @@ -0,0 +1,73 @@ +Source: sogo +Priority: optional +Maintainer: Inverse Support +Build-Depends: debhelper (>= 8.0.0), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libmapi-dev, libmapistore-dev, libmapiproxy-dev, libwbxml2-dev (>= 0.11.2), liblasso3-dev (>= 2.3.5) +Section: web +Standards-Version: 3.9.2 + +Package: sogo +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +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 +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. + The Inverse edition of this project has many feature enhancements: + * CalDAV and GroupDAV compliance + * full handling of vCard as well as vCalendar/iCalendar formats + * support for folder sharing and ACLs + . + The Web interface has been rewritten in an AJAX fashion to provide a faster + UI for the users, consistency in look and feel with the Mozilla applications, + and to reduce the load of the transactions on the server. + +Package: sogo-dev +Section: devel +Architecture: any +Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Replaces: sogo (<< ${binary:Version}) +Description: a modern and scalable groupware - development files + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package contains the development files for developing SOGo modules. + +Package: sogo-openchange +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Section: net +Priority: extra +Architecture: any +Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: a modern and scalable groupware - OpenChange backend + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package contains the backend plugin for using SOGo as a backend + to OpenChange. + +Package: sogo-activesync +Section: web +Priority: extra +Architecture: any +Depends: sogo (= ${binary:Version}), libwbxml2-0 (>= 0.11.2), ${shlibs:Depends}, ${misc:Depends} +Description: a modern and scalable groupware - ActiveSync module + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package provides Microsoft EAS support for SOGo. + +Package: sogo-dbg +Section: debug +Priority: extra +Architecture: any +Depends: sogo (= ${binary:Version}), ${misc:Depends} +Description: a modern and scalable groupware - debugging symbols + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package contains the debugging symbols for SOGo. diff --git a/packaging/debian-multiarch/control-no-openchange b/packaging/debian-multiarch/control-no-openchange new file mode 100644 index 000000000..eb5a32520 --- /dev/null +++ b/packaging/debian-multiarch/control-no-openchange @@ -0,0 +1,59 @@ +Source: sogo +Priority: optional +Maintainer: Inverse Support +Build-Depends: debhelper (>= 8.0.0), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libwbxml2-dev (>= 0.11.2), liblasso3-dev (>= 2.3.5) +Section: web +Standards-Version: 3.9.2 + +Package: sogo +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +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 +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. + The Inverse edition of this project has many feature enhancements: + * CalDAV and GroupDAV compliance + * full handling of vCard as well as vCalendar/iCalendar formats + * support for folder sharing and ACLs + . + The Web interface has been rewritten in an AJAX fashion to provide a faster + UI for the users, consistency in look and feel with the Mozilla applications, + and to reduce the load of the transactions on the server. + +Package: sogo-dev +Section: devel +Architecture: any +Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Replaces: sogo (<< ${binary:Version}) +Description: a modern and scalable groupware - development files + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package contains the development files for developing SOGo modules. + +Package: sogo-activesync +Section: web +Priority: extra +Architecture: any +Depends: sogo (= ${binary:Version}), libwbxml2-0 (>= 0.11.2), ${shlibs:Depends}, ${misc:Depends} +Description: a modern and scalable groupware - ActiveSync module + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package provides Microsoft EAS support for SOGo. + +Package: sogo-dbg +Section: debug +Priority: extra +Architecture: any +Depends: sogo (= ${binary:Version}), ${misc:Depends} +Description: a modern and scalable groupware - debugging symbols + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package contains the debugging symbols for SOGo. diff --git a/packaging/debian-multiarch/copyright b/packaging/debian-multiarch/copyright new file mode 100644 index 000000000..8c26684c5 --- /dev/null +++ b/packaging/debian-multiarch/copyright @@ -0,0 +1,31 @@ +This package was debianized by Inverse on +Mon, 27 Jul 2009 10:57:51 -0400. + +It was downloaded from http://www.sogo.nu/downloads/backend.html + +Upstream Authors: + + Inverse inc. + +Copyright: + + Copyright (C) 2006-2010 Inverse inc. + +License: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +The Debian packaging is (c) 2009, Inverse and +is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. diff --git a/packaging/debian-multiarch/rules b/packaging/debian-multiarch/rules new file mode 100755 index 000000000..bdf71b21f --- /dev/null +++ b/packaging/debian-multiarch/rules @@ -0,0 +1,117 @@ +#!/usr/bin/make -f +# -*- makefile -*- +export DH_VERBOSE=1 +# export DH_OPTIONS="-p sogo" + +DESTDIR=$(CURDIR)/debian/tmp +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +SAML2_CONFIG=--enable-saml2 + +include /etc/GNUstep/GNUstep.conf +include /usr/share/GNUstep/Makefiles/common.make + +config.make: configure + dh_testdir + ./configure --prefix=$(GNUSTEP_SYSTEM_ROOT) $(SAML2_CONFIG) + +#Architecture +build: build-arch + +build-arch: build-arch-stamp +build-arch-stamp: config.make +# Add here commands to compile the arch part of the package. + $(MAKE) + if pkg-config --atleast-version=1.0 libmapi; \ + then (cd OpenChange; $(MAKE)); \ + fi + (cd ActiveSync && $(MAKE)) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-arch-stamp + ( cd Tests/Integration; make clean ) + rm -f Tests/Integration/config.py + -find Tests -name "*.pyc" -exec rm -f {} \; + if [ -f config.make ]; \ + then \ +# if pkg-config --atleast-version=1.0 libmapi; \ +# then \ +# (cd OpenChange; make clean); \ +# fi; \ + make clean; \ + fi +# -rm -f OpenChange/MAPIStorePropertySelectors.* + -rm -f config.make + (cd ActiveSync; make clean); \ + dh_clean + +install: install-arch + dh_testdir + dh_testroot +# dh_prep -i +# dh_installdirs -i +# dh_install -i + +install-arch: build-arch + dh_testdir + dh_testroot + dh_prep +# dh_installdirs -s + + $(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install +# if pkg-config --atleast-version=1.0 libmapi; \ +# then \ +# (cd OpenChange; \ +# $(MAKE) \ +# DESTDIR=$(DESTDIR) \ +# GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ +# install); \ +# rm -f $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/libMAPIStoreSOGo.so.1; \ +# rm -f $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/libMAPIStoreSOGo.so; \ +# mv -f $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/libMAPIStoreSOGo.so.1.0.0 \ +# $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/SOGo.so; \ +# fi + (cd ActiveSync; $(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install) + + 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-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/ + install -D -m 640 Scripts/sogo.conf debian/tmp/etc/sogo/sogo.conf + +# Build architecture dependant packages using the common target. +binary-arch: build-arch install-arch + dh_testdir + dh_testroot + dh_installinit -R + dh_installcron + dh_installchangelogs ChangeLog + dh_installdocs +# dh_installexamples + dh_installman + dh_install + dh_link + dh_strip --dbg-package=sogo-dbg +# workaround for http://sourceware.org/bugzilla/show_bug.cgi?id=9538 +# to let gdb find the symbols for libSOGo + ( cd debian/sogo-dbg/usr/lib/debug/usr/lib/; \ + ln -s GNUstep/Frameworks/SOGo.framework/Versions/*/libSOGo* ./ ) + dh_compress -X.py -X.sh + dh_fixperms + dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends + dh_shlibdeps + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: build install +# We have nothing to do by default. + +binary: binary-arch binary-indep +.PHONY: build clean binary-arch binary install install-arch diff --git a/packaging/debian-multiarch/sogo-activesync.docs b/packaging/debian-multiarch/sogo-activesync.docs new file mode 100644 index 000000000..b864d5011 --- /dev/null +++ b/packaging/debian-multiarch/sogo-activesync.docs @@ -0,0 +1,2 @@ +ActiveSync/README +ActiveSync/LICENSE diff --git a/packaging/debian-multiarch/sogo-activesync.install b/packaging/debian-multiarch/sogo-activesync.install new file mode 100644 index 000000000..7f0e316d8 --- /dev/null +++ b/packaging/debian-multiarch/sogo-activesync.install @@ -0,0 +1 @@ +usr/lib/GNUstep/SOGo/ActiveSync.SOGo diff --git a/packaging/debian-multiarch/sogo-dev.install b/packaging/debian-multiarch/sogo-dev.install new file mode 100644 index 000000000..43e84abbb --- /dev/null +++ b/packaging/debian-multiarch/sogo-dev.install @@ -0,0 +1,2 @@ +usr/include/GNUstep/* +usr/lib/sogo/lib*.so diff --git a/packaging/debian-multiarch/sogo-openchange.install b/packaging/debian-multiarch/sogo-openchange.install new file mode 100644 index 000000000..d3f119d33 --- /dev/null +++ b/packaging/debian-multiarch/sogo-openchange.install @@ -0,0 +1,2 @@ +usr/lib/*/mapistore_backends/* +usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore diff --git a/packaging/debian-multiarch/sogo.cron.daily b/packaging/debian-multiarch/sogo.cron.daily new file mode 100644 index 000000000..989191b2f --- /dev/null +++ b/packaging/debian-multiarch/sogo.cron.daily @@ -0,0 +1,7 @@ +#!/bin/sh + +# SOGOSPOOL must match the value of the configuration parameter SOGoMailSpoolPath +SOGOSPOOL=/var/spool/sogo + +find "$SOGOSPOOL" -type f -user sogo -atime +23 -delete > /dev/null +find "$SOGOSPOOL" -mindepth 1 -type d -user sogo -empty -delete > /dev/null diff --git a/packaging/debian-multiarch/sogo.dirs b/packaging/debian-multiarch/sogo.dirs new file mode 100644 index 000000000..77877b7bd --- /dev/null +++ b/packaging/debian-multiarch/sogo.dirs @@ -0,0 +1,3 @@ +etc +var +usr diff --git a/packaging/debian-multiarch/sogo.docs b/packaging/debian-multiarch/sogo.docs new file mode 100644 index 000000000..fb22e65a1 --- /dev/null +++ b/packaging/debian-multiarch/sogo.docs @@ -0,0 +1,4 @@ +NEWS +Scripts/*.sh +Scripts/updates.php +Apache/SOGo-apple-ab.conf diff --git a/packaging/debian-multiarch/sogo.init b/packaging/debian-multiarch/sogo.init new file mode 100644 index 000000000..c296ba8b7 --- /dev/null +++ b/packaging/debian-multiarch/sogo.init @@ -0,0 +1,100 @@ +#!/bin/bash +### BEGIN INIT INFO +# Provides: sogo +# Required-Start: $remote_fs $network +# Required-Stop: $remote_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: SOGo server +### END INIT INFO + +# SOGo init script for Debian GNU/Linux +# +# Copyright (C) 2007-2010 Inverse inc. +# +# Author: Wolfgang Sourdeau +# Ludovic Marcotte +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +NAME=sogo +DAEMON=/usr/sbin/sogod +DESC="SOGo" + +USER=$NAME +PREFORK=3 + +PIDFILE=/var/run/$NAME/$NAME.pid +LOGFILE=/var/log/$NAME/$NAME.log + +if [ -f /etc/default/$NAME ]; then + . /etc/default/$NAME +fi + +. /lib/lsb/init-functions + +if [ ! -x $DAEMON ]; then + log_failure_msg "$DAEMON is not executable." + exit 1 +fi + +set -e + +. /usr/share/GNUstep/Makefiles/GNUstep.sh + +DAEMON_OPTS="-WOWorkersCount $PREFORK -WOPidFile $PIDFILE -WOLogFile $LOGFILE" + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + + # Enforce directory existence and permissions + install -o $USER -g $USER -m 755 -d /var/run/$NAME + install -o $USER -g $USER -m 750 -d /var/spool/$NAME + install -o $USER -g $USER -m 750 -d /var/log/$NAME + + if ! start-stop-daemon -c $USER --quiet --start --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS + then + log_progress_msg "already running" + fi + log_end_msg 0 + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + start-stop-daemon --stop --pidfile $PIDFILE --retry=TERM/20/KILL/5 --oknodo + log_end_msg 0 + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + start-stop-daemon --stop --pidfile $PIDFILE --retry=TERM/20/KILL/5 --oknodo + # Ensure directory's existence and permissions + install -o $USER -g adm -m 755 -d /var/run/$NAME + install -o $USER -g adm -m 750 -d /var/spool/$NAME + install -o $USER -g adm -m 750 -d /var/log/$NAME + start-stop-daemon -c $USER --quiet --start --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS + log_end_msg 0 + ;; + status) + status_of_proc -p $PIDFILE "$DAEMON" $NAME && exit 0 || exit $? + ;; + *) + echo "Usage: $NAME {start|stop|restart|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/packaging/debian-multiarch/sogo.install b/packaging/debian-multiarch/sogo.install new file mode 100644 index 000000000..e6de0eda6 --- /dev/null +++ b/packaging/debian-multiarch/sogo.install @@ -0,0 +1,27 @@ +etc/apache2/conf-available/SOGo.conf +etc/cron.d/sogo +etc/default/sogo +etc/logrotate.d/sogo +etc/sogo/sogo.conf +usr/sbin/* +usr/lib/GNUstep/Frameworks/* +usr/lib/GNUstep/Libraries/* +usr/lib/GNUstep/OCSTypeModels/* +usr/lib/GNUstep/SaxDrivers-4.9/* +usr/lib/GNUstep/SaxMappings/* +usr/lib/GNUstep/WOxElemBuilders-4.9/* +usr/lib/GNUstep/SOGo/Templates +usr/lib/GNUstep/SOGo/WebServerResources +usr/lib/sogo/lib*.so.* +usr/share/lintian/* +usr/lib/GNUstep/SOGo/AdministrationUI.SOGo +usr/lib/GNUstep/SOGo/Appointments.SOGo +usr/lib/GNUstep/SOGo/CommonUI.SOGo +usr/lib/GNUstep/SOGo/Contacts.SOGo +usr/lib/GNUstep/SOGo/ContactsUI.SOGo +usr/lib/GNUstep/SOGo/MailPartViewers.SOGo +usr/lib/GNUstep/SOGo/Mailer.SOGo +usr/lib/GNUstep/SOGo/MailerUI.SOGo +usr/lib/GNUstep/SOGo/MainUI.SOGo +usr/lib/GNUstep/SOGo/PreferencesUI.SOGo +usr/lib/GNUstep/SOGo/SchedulerUI.SOGo diff --git a/packaging/debian-multiarch/sogo.overrides b/packaging/debian-multiarch/sogo.overrides new file mode 100644 index 000000000..d5dad073b --- /dev/null +++ b/packaging/debian-multiarch/sogo.overrides @@ -0,0 +1,4 @@ +sogo: embedded-javascript-library usr/lib/GNUstep/SOGo/WebServerResources/prototype.js +sogo: extra-license-file usr/lib/GNUstep/SOGo/WebServerResources/scriptaculous/MIT-LICENSE +sogo: embedded-javascript-library usr/lib/GNUstep/SOGo/WebServerResources/scriptaculous/scriptaculous.js +sogo: package-name-doesnt-match-sonames libGDLContentStore4.9 libNGCards4.9 libSOGoUI1.0 diff --git a/packaging/debian-multiarch/sogo.postinst b/packaging/debian-multiarch/sogo.postinst new file mode 100644 index 000000000..dfc86ca21 --- /dev/null +++ b/packaging/debian-multiarch/sogo.postinst @@ -0,0 +1,70 @@ +#!/bin/bash + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +PATH=/bin:/sbin:/usr/bin:/usr/sbin + +case "$1" in + configure) + # update timestamp on imgs,css,js to let apache know the files changed + find /usr/lib/GNUstep/SOGo/WebServerResources -exec touch {} \; + + # Make example scripts in /usr/share/doc/sogo/ executable + # (they do not really belong there, we are violating Debian + # packaging guidelines, but OTOH moving these files now would + # break lots of setups) + chmod a+x /usr/share/doc/sogo/*.sh + + # Enforce owner+mode on configuration + chmod 750 /etc/sogo + chown root:sogo /etc/sogo + chmod 640 /etc/sogo/sogo.conf + chown root:sogo /etc/sogo/sogo.conf + cat << EOF +======= Important SOGo post-installation note ======= + +SOGo database schemas are _not_ automatically upgraded by +the packaging system. + +Please check the list of database schema upgrade scripts +inside /usr/share/doc/sogo/ and apply them if needed. + +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) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/packaging/debian-multiarch/sogo.postrm b/packaging/debian-multiarch/sogo.postrm new file mode 100644 index 000000000..9bed33fa5 --- /dev/null +++ b/packaging/debian-multiarch/sogo.postrm @@ -0,0 +1,35 @@ +#!/bin/bash + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + if test "x$1" == "xpurge" + then + userdel -r sogo || true + rm -rf /var/spool/sogo + rm -rf /var/log/sogo + rm -rf /var/run/sogo + fi + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 +esac + +#DEBHELPER# + +exit 0 diff --git a/packaging/debian-multiarch/sogo.preinst b/packaging/debian-multiarch/sogo.preinst new file mode 100644 index 000000000..3a63d612d --- /dev/null +++ b/packaging/debian-multiarch/sogo.preinst @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +if [ "$1" == "install" ] || [ "$1" == "upgrade" ]; then + + getent group sogo >& /dev/null || groupadd -f -r sogo + if ! id sogo 1> /dev/null 2>&1; then + useradd -d /var/lib/sogo -g sogo -c "SOGo daemon" -s /usr/sbin/nologin -r -g sogo sogo + fi + + # create mandatory dirs and enforce owner+mode + for dir in lib log run spool; do + install -m 750 -o sogo -g sogo -d /var/$dir/sogo + done +fi + +#DEBHELPER# + +exit 0 diff --git a/packaging/debian-multiarch/sogo.prerm b/packaging/debian-multiarch/sogo.prerm new file mode 100644 index 000000000..35f46aa4a --- /dev/null +++ b/packaging/debian-multiarch/sogo.prerm @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# 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 diff --git a/packaging/debian-multiarch/source/format b/packaging/debian-multiarch/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/packaging/debian-multiarch/source/format @@ -0,0 +1 @@ +3.0 (quilt)