From 878d338493decbf22249698a8cfe1268924c2210 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Wed, 3 Jan 2007 14:31:20 +0000 Subject: [PATCH] * more changes towards the debian.org packaging. --- citadel/debian/citadel-client.install | 8 +- citadel/debian/citadel-client.postinst | 9 +- citadel/debian/citadel-doc.install | 4 +- citadel/debian/citadel-mta.install | 2 +- citadel/debian/citadel-mta.postinst | 100 +-------------------- citadel/debian/citadel-server.config | 2 + citadel/debian/citadel-server.install | 28 +++--- citadel/debian/citadel-server.postinst | 13 --- citadel/debian/citadel-server.postrm | 9 +- citadel/debian/citadel.init | 5 +- citadel/debian/control | 10 +-- citadel/debian/copyright | 120 +++++++++++++++++++++++-- citadel/debian/rules | 74 +++++++-------- 13 files changed, 184 insertions(+), 200 deletions(-) diff --git a/citadel/debian/citadel-client.install b/citadel/debian/citadel-client.install index e9cdefc50..5f24fcd0d 100644 --- a/citadel/debian/citadel-client.install +++ b/citadel/debian/citadel-client.install @@ -1,4 +1,4 @@ -debian/tmp/usr/bin/citadel -debian/tmp/usr/bin/whobbs -debian/tmp/usr/bin/stress -debian/tmp/etc/citadel/citadel.rc +usr/bin/citadel +usr/bin/whobbs +usr/bin/stress +etc/citadel/citadel.rc diff --git a/citadel/debian/citadel-client.postinst b/citadel/debian/citadel-client.postinst index 4e26edc6c..eeee37f7c 100644 --- a/citadel/debian/citadel-client.postinst +++ b/citadel/debian/citadel-client.postinst @@ -1,15 +1,9 @@ #! /bin/sh -# postinst.skeleton -# Skeleton maintainer script showing all the possible cases. -# Written by Charles Briscoe-Smith, March-June 1998. Public Domain. - # Abort if any command returns an error value set -e case "$1" in configure) - # Configure this package. If the package must prompt the user for - # information, do it here. if ! getent group citadel >/dev/null; then groupadd citadel fi @@ -24,7 +18,8 @@ case "$1" in abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "$0: didn't understand being called with \`$1'" 1>&2 - exit 0;; + exit 1;; esac +#DEBHELPER# exit 0 diff --git a/citadel/debian/citadel-doc.install b/citadel/debian/citadel-doc.install index 68efbf96f..1e1c5203f 100644 --- a/citadel/debian/citadel-doc.install +++ b/citadel/debian/citadel-doc.install @@ -1,2 +1,2 @@ -debian/tmp/usr/share/doc/citadel-doc/docs -debian/tmp/usr/share/doc/citadel-doc/techdoc +usr/share/doc/citadel-doc/docs +usr/share/doc/citadel-doc/techdoc diff --git a/citadel/debian/citadel-mta.install b/citadel/debian/citadel-mta.install index a445beb5c..430a0e8fc 100644 --- a/citadel/debian/citadel-mta.install +++ b/citadel/debian/citadel-mta.install @@ -1 +1 @@ -debian/tmp/usr/sbin/sendmail \ No newline at end of file +usr/sbin/sendmail diff --git a/citadel/debian/citadel-mta.postinst b/citadel/debian/citadel-mta.postinst index 076d3df76..1191b5d56 100644 --- a/citadel/debian/citadel-mta.postinst +++ b/citadel/debian/citadel-mta.postinst @@ -1,112 +1,16 @@ #! /bin/sh -# postinst.skeleton -# Skeleton maintainer script showing all the possible cases. -# Written by Charles Briscoe-Smith, March-June 1998. Public Domain. - -# Abort if any command returns an error value set -e -# This script is called as the last step of the installation of the -# package. All the package's files are in place, dpkg has already done -# its automatic conffile handling, and all the packages we depend of -# are already fully installed and configured. - case "$1" in configure) - # Configure this package. If the package must prompt the user for - # information, do it here. - : - - #ln -s /usr/sbin/citmail /usr/sbin/sendmail - chown root:citadel /usr/sbin/sendmail chmod 04755 /usr/sbin/sendmail - ### We could also do this on the fly. The following is from Tore - ### Anderson: - - #. /usr/share/debconf/confmodule - - ### find out what the user answered. - # db_get foo/run_on_boot - # run_on_boot=$RET - # db_stop - - ### safely create a temporary file to generate our suggested - ### configuration file. - # tempfile=`tempfile` - # cat << _eof > $tempfile - ### Configuration file for Foo. - - ### this was answered by you, the user in a debconf dialogue - # RUNONBOOT=$run_on_boot - - ### this was not, as it has a sane default value. - # COLOUROFSKY=blue - - #_eof - - ### Note that some versions of debconf do not release stdin, so - ### the following invocation of ucf may not work, since the stdin - ### is never coneected to ucfr. - - ### now, invoke ucf, which will take care of the rest, and ask - ### the user if he wants to update his file, if it is modified. - #ucf $tempfile /etc/foo.conf - - ### done! now we'll just clear up our cruft. - #rm -f $tempfile - - - #### There are three sub-cases: - ###if test "${2+set}" != set; then - ### # We're being installed by an ancient dpkg which doesn't remember - ### # which version was most recently configured, or even whether - ### # there is a most recently configured version. - ### : - ### - ###elif test -z "$2" -o "$2" = ""; then - ### # The package has not ever been configured on this system, or was - ### # purged since it was last configured. - ### : - ### - ###else - ### # Version $2 is the most recently configured version of this - ### # package. - ### : - ### - ###fi ;; - abort-upgrade) - # Back out of an attempt to upgrade this package FROM THIS VERSION - # to version $2. Undo the effects of "prerm upgrade $2". - : - - ;; - abort-remove) - ###if test "$2" != in-favour; then - ### echo "$0: undocumented call to \`postinst $*'" 1>&2 - ### exit 0 - ###fi - #### Back out of an attempt to remove this package, which was due to - #### a conflict with package $3 (version $4). Undo the effects of - #### "prerm remove in-favour $3 $4". - ###: - - ;; - abort-deconfigure) - ###if test "$2" != in-favour -o "$5" != removing; then - ### echo "$0: undocumented call to \`postinst $*'" 1>&2 - ### exit 0 - ###fi - #### Back out of an attempt to deconfigure this package, which was - #### due to package $6 (version $7) which we depend on being removed - #### to make way for package $3 (version $4). Undo the effects of - #### "prerm deconfigure in-favour $3 $4 removing $6 $7". - ###: - + abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "$0: didn't understand being called with \`$1'" 1>&2 exit 0;; esac +#DEBHELPER# exit 0 diff --git a/citadel/debian/citadel-server.config b/citadel/debian/citadel-server.config index 41e59429f..ab1fa6207 100755 --- a/citadel/debian/citadel-server.config +++ b/citadel/debian/citadel-server.config @@ -2,6 +2,8 @@ set -e . /usr/share/debconf/confmodule +db_version 2.0 + if test -n "$2"; then if test "`echo $2 | sed -e 's/[.-]//g'`" -lt 127 \ -o $1 = reconfigure diff --git a/citadel/debian/citadel-server.install b/citadel/debian/citadel-server.install index 412689261..de6960898 100644 --- a/citadel/debian/citadel-server.install +++ b/citadel/debian/citadel-server.install @@ -1,15 +1,15 @@ -debian/tmp/usr/sbin/citserver -debian/tmp/usr/sbin/aidepost -debian/tmp/usr/sbin/msgform -debian/tmp/usr/sbin/citmail -debian/tmp/usr/sbin/userlist -debian/tmp/usr/sbin/sendcommand -debian/tmp/usr/sbin/base64 -debian/tmp/usr/lib/citadel-server/setup -debian/tmp/usr/sbin/chkpwd -debian/tmp/etc/citadel/mail.aliases -debian/tmp/etc/citadel/public_clients -debian/tmp/etc/citadel/messages/ -debian/tmp/etc/citadel/help/ -debian/tmp/usr/share/doc/citadel-doc/database_cleanup.sh +usr/sbin/citserver +usr/sbin/aidepost +usr/sbin/msgform +usr/sbin/citmail +usr/sbin/userlist +usr/sbin/sendcommand +usr/sbin/base64 +usr/lib/citadel-server/setup +usr/sbin/chkpwd +etc/citadel/mail.aliases +etc/citadel/public_clients +etc/citadel/messages/ +etc/citadel/help/ +usr/share/doc/citadel-server/database_cleanup.sh diff --git a/citadel/debian/citadel-server.postinst b/citadel/debian/citadel-server.postinst index 5b10ff3f0..ac5aa2d07 100644 --- a/citadel/debian/citadel-server.postinst +++ b/citadel/debian/citadel-server.postinst @@ -21,19 +21,6 @@ case "$1" in mkdir -p /etc/citadel chown citadel:citadel /etc/citadel - #: !TODO: should network/systems go to /etc/citadel? - mkdir -p \ - /var/lib/citadel/data/ \ - /var/lib/citadel/bio/ \ - /var/lib/citadel/bitbucket/ \ - /var/lib/citadel/files/ \ - /var/lib/citadel/images/ \ - /var/lib/citadel/info/ \ - /var/lib/citadel/userpics/ \ - /var/spool/citadel/network/spoolin \ - /var/spool/citadel/network/spoolout \ - /var/spool/citadel/network/spoolsystems - chown -R citadel:citadel /var/lib/citadel /var/spool/citadel chown root:root /usr/sbin/chkpwd diff --git a/citadel/debian/citadel-server.postrm b/citadel/debian/citadel-server.postrm index 39d2c3d5f..8c40fefd3 100644 --- a/citadel/debian/citadel-server.postrm +++ b/citadel/debian/citadel-server.postrm @@ -2,6 +2,7 @@ . /usr/share/debconf/confmodule set -e +. /usr/share/debconf/confmodule db_version 2.0 case "$1" in @@ -11,14 +12,6 @@ case "$1" in rmdir "/etc/citadel/help" rmdir "/etc/citadel/messages" - # we mimic dpkg as closely as possible, so we remove configuration - # files with dpkg backup extensions too: - ### Some of the following is from Tore Anderson: - for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do - rm -f /etc/citadel/*$ext - rm -f /etc/citadel/messages/*$ext - rm -f /etc/citadel/help/*$ext - done echo "/var/lib/citadel/data not removed, as it may contain your personal data." db_purge db_go diff --git a/citadel/debian/citadel.init b/citadel/debian/citadel.init index 866d57ff9..5a5b0be3c 100644 --- a/citadel/debian/citadel.init +++ b/citadel/debian/citadel.init @@ -1,11 +1,12 @@ -#! /bin/sh +#!/bin/sh ### BEGIN INIT INFO # Provides: citadel-server # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: Citadel initscript +# Short-Description: control citadel server start at boot time +# Description: control citadel server start at boot time ### END INIT INFO # Author: Wilfried Goesgens diff --git a/citadel/debian/control b/citadel/debian/control index 453ad2cbe..c4d8c5a45 100644 --- a/citadel/debian/control +++ b/citadel/debian/control @@ -4,17 +4,17 @@ Priority: extra Maintainer: Wilfried Goesgens Uploaders: Fathi Boudra Build-Depends: debhelper (>= 4.0.0), po-debconf, bison, autotools-dev, - libdb4.4-dev|libdb4.3-dev, libical-dev, libssl-dev, + libdb4.4-dev | libdb4.3-dev, libical-dev, libssl-dev, libncurses5-dev, libldap2-dev, libpam0g-dev, libsieve2-dev Standards-Version: 3.7.2.2 Package: citadel-server Architecture: any -Provides: pop3-server, imap-server -Conflicts: pop3-server, imap-server -Depends: ${shlibs:Depends}, ${misc:Depends}, debconf -Recommends: db4.4-util|db4.3-util +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser +Recommends: db4.4-util | db4.3-util Suggests: citadel-mta +Conflicts: pop3-server, imap-server +Provides: pop3-server, imap-server Description: complete and feature-rich groupware server Citadel is a complete and feature-rich open source groupware platform. * Email, calendaring/scheduling, address books diff --git a/citadel/debian/copyright b/citadel/debian/copyright index fe9412f61..b075cf8bb 100644 --- a/citadel/debian/copyright +++ b/citadel/debian/copyright @@ -1,10 +1,118 @@ -This package was debianized by Wilfried Goesgens on -Sat, 23 Jul 2005 12:23:15 +0200. +This package was debianized by Fathi Boudra on +Wed, 27 Dec 2006 17:30:35 +0100. -It was downloaded from citadel.org +It was downloaded from http://www.citadel.org -Copyright Holder: Copyright ©1987-2005 by the Citadel development team, see http://easyinstall.citadel.org/citadel/docs/citadel.html +Upstream Authors (the citadel development team): + Clint Adams + Steven M. Bellovin + Nathan Bryant + Art Cancro + Brian Costello + Nick Georbit + David Given + Wilfried Goesgens + Michael Hampton + Andru Luvisi + Daniel Malament + Stu Mark + Edward S. Marshall + Ben Mehlman + Matt Pfleger + Ari Samson + Trey Van Riper + John Walker + Steve Williams + Ethan Young -License: GPL +Copyright: (C) 1987-2006 Citadel development team -see http://www.gnu.org/copyleft/gpl.html or /usr/share/common-licenses/GPL +Copyright for CRC16: (C) 2002-2003 Indigo Systems Corporation + +Copyright for MD5 implementation: (C) 1993 Colin Plumb + +Copyright for RFC 2739 openldap schema: + (C) 2000 The Internet Society + (C) 2004 Martin Konold + (C) 2006 Art Cancro + +CRC16 license: + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + Neither the name of the Indigo Systems Corporation nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + +MD5 license: + + This code was written by Colin Plumb in 1993, no copyright is claimed. + This code is in the public domain; do with it what you wish. + +RFC 2739 openldap schema license: + + This document and translations of it may be copied and furnished to + others, and derivative works that comment on or otherwise explain it + or assist in its implementation may be prepared, copied, published + and distributed, in whole or in part, without restriction of any + kind, provided that the above copyright notice and this paragraph are + included on all such copies and derivative works. However, this + document itself may not be modified in any way, such as by removing + the copyright notice or references to the Internet Society or other + Internet organizations, except as needed for the purpose of + developing Internet standards in which case the procedures for + copyrights defined in the Internet Standards process must be + followed, or as required to translate it into languages other than + English. + + The limited permissions granted above are perpetual and will not be + revoked by the Internet Society or its successors or assigns. + + This document and the information contained herein is provided on an + "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING + TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION + HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +citadel license: + + This package 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 package 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 package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2006, Fathi Boudra and +is licensed under the GPL, see above. diff --git a/citadel/debian/rules b/citadel/debian/rules index 609b58439..1d15f6e16 100755 --- a/citadel/debian/rules +++ b/citadel/debian/rules @@ -5,12 +5,7 @@ # This has to be exported to make some magic below work. export DH_OPTIONS - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - +DEB_DESTDIR = $(CURDIR)/debian/tmp CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) @@ -19,47 +14,44 @@ else CFLAGS += -O2 endif -config.status: configure +configure: configure-stamp +configure-stamp: dh_testdir CFLAGS="$(CFLAGS)" ./configure \ - --host=$(DEB_HOST_GNU_TYPE) \ - --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr/sbin \ - --with-sysconfdir=/etc/citadel \ - --with-spooldir=/var/spool/citadel \ --with-datadir=/var/lib/citadel \ + --with-spooldir=/var/spool/citadel \ + --with-sysconfdir=/etc/citadel \ --with-rundir=/var/run/citadel \ --with-docdir=/usr/share/doc/citadel-doc/ \ --with-pam \ - --with-libical \ - --with-libsieve \ --with-db \ --with-zlib \ - --with-ldap + --with-ldap \ + --with-libical \ + --with-libsieve + touch configure-stamp #Architecture build: build-arch build-indep build-arch: build-arch-stamp -build-arch-stamp: config.status - touch build-arch-stamp +build-arch-stamp: configure-stamp + + $(MAKE) + touch $@ build-indep: build-indep-stamp -build-indep-stamp: config.status - touch build-indep-stamp +build-indep-stamp: configure-stamp + touch $@ clean: dh_testdir dh_testroot rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP# -$(MAKE) distclean -ifneq "$(wildcard /usr/share/misc/config.sub)" "" - cp -f /usr/share/misc/config.sub config.sub -endif -ifneq "$(wildcard /usr/share/misc/config.guess)" "" - cp -f /usr/share/misc/config.guess config.guess -endif + dh_clean install: install-indep install-arch @@ -68,34 +60,36 @@ install-indep: dh_testroot dh_clean -k -i dh_installdirs -i - $(MAKE) -C . install-new DESTDIR="$(CURDIR)/debian/tmp" install-doc-new prefix=$(CURDIR)/debian/citadel-doc/ - + $(MAKE) DESTDIR=$(DEB_DESTDIR) install-doc-new + dh_install -i --sourcedir=debian/tmp install-arch: dh_testdir dh_testroot dh_clean -k -s dh_installdirs -s - mkdir -p $(CURDIR)/debian/tmp/ - $(MAKE) -C . install-new DESTDIR="$(CURDIR)/debian/tmp/" install-exec-new install-data-new + $(MAKE) DESTDIR=$(DEB_DESTDIR) install-exec-new install-data-new + + + mkdir -p $(DEB_DESTDIR)/usr/lib/citadel-server + mv $(DEB_DESTDIR)/usr/sbin/setup \ + $(DEB_DESTDIR)/usr/lib/citadel-server/ + cp $(DEB_DESTDIR)/usr/sbin/citmail \ + $(DEB_DESTDIR)/usr/sbin/sendmail - mkdir -p $(CURDIR)/debian/tmp/usr/lib/citadel-server - mv \ - $(CURDIR)/debian/tmp/usr/sbin/setup \ - $(CURDIR)/debian/tmp/usr/lib/citadel-server/ - cp \ - $(CURDIR)/debian/tmp/usr/sbin/citmail \ - $(CURDIR)/debian/tmp/usr/sbin/sendmail + mkdir -p $(DEB_DESTDIR)/usr/share/doc/citadel-server/ + mv $(DEB_DESTDIR)/usr/share/doc/citadel-doc/database_cleanup.sh \ + $(DEB_DESTDIR)/usr/share/doc/citadel-server/ - dh_install + dh_install -s --sourcedir=debian/tmp binary-common: dh_testdir dh_testroot + dh_installchangelogs dh_installdocs - dh_installexamples dh_installdebconf - dh_installinit --name=citadel + dh_installinit --name=citadel dh_installman dh_strip dh_compress @@ -113,7 +107,7 @@ binary-indep: build-indep install-indep # Build architecture dependant packages using the common target. binary-arch: build-arch install-arch - $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common binary: binary-arch binary-indep -.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure -- 2.30.2