* Apache config package added
authorWilfried Göesgens <willi@citadel.org>
Mon, 21 Nov 2005 16:13:29 +0000 (16:13 +0000)
committerWilfried Göesgens <willi@citadel.org>
Mon, 21 Nov 2005 16:13:29 +0000 (16:13 +0000)
* make recursive examples
* automatization of the upstream version

14 files changed:
webcit/debian/changelog
webcit/debian/citadel-webcit-apache.config [new file with mode: 0644]
webcit/debian/citadel-webcit-apache.postinst [new file with mode: 0644]
webcit/debian/citadel-webcit-apache.postrm [new file with mode: 0644]
webcit/debian/citadel-webcit-apache.postrm.debhelper [new file with mode: 0644]
webcit/debian/citadel-webcit-apache.substvars [new file with mode: 0644]
webcit/debian/citadel-webcit-apache.templates [new file with mode: 0644]
webcit/debian/citadel-webcit.postinst
webcit/debian/citadel-webcit.postrm
webcit/debian/citadel-webcit.substvars
webcit/debian/citadel-webcit.templates
webcit/debian/control
webcit/debian/files [deleted file]
webcit/debian/rules

index 902f4cdcc88a358b65dd40cb5bd15f0957260560..b396c11c60271bfed202eca15e9d6cae9ac33342 100644 (file)
@@ -1,3 +1,9 @@
+webcit (6.31-2) unstable; urgency=low
+       
+  * update to actual Citadel SVN. many new features. see Packages changelog.
+
+ -- Wilfried Goesgens <w.goesgens@chaosindustries.de>  Tue, 01 Nov 2005 18:06:00 +0100
+       
 webcit (6.21-1) unstable; urgency=low
 
   * Initial release Closes: #nnnn  (nnnn is the bug number of your ITP)
diff --git a/webcit/debian/citadel-webcit-apache.config b/webcit/debian/citadel-webcit-apache.config
new file mode 100644 (file)
index 0000000..6050001
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+PACKAGE="citadel"
+SOURCE="citadel"
+VERSION="4:2.6.4-pl3-1"
+
+. /usr/share/debconf/confmodule
+db_version 2.0 || [ 0 -lt 30 ]
+
+# Package maintainer's commands follow:
+if test -n "$2"; then
+ if test "`echo $2 | sed -e 's/[.-]//g'`" -lt 127 \
+         -o $1 = reconfigure
+ then
+        db_input medium citadel/reconfigure-webserver || true
+        db_go
+# End of package maintainer's commands
+ fi
+fi
+exit 0
diff --git a/webcit/debian/citadel-webcit-apache.postinst b/webcit/debian/citadel-webcit-apache.postinst
new file mode 100644 (file)
index 0000000..0d3edb9
--- /dev/null
@@ -0,0 +1,100 @@
+#! /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
+. /usr/share/debconf/confmodule
+
+
+uninclude() {
+       if [ ! -a /etc/$server/conf.d/webcit     ]; then
+               if [ -f /etc/$server/httpd.conf \
+                       -a -f /usr/share/wwwconfig-common/apache-uninclude_all.sh ]
+               then
+                       includefile=$1
+                       . /usr/share/wwwconfig-common/apache-uninclude_all.sh
+               fi
+       fi
+}
+
+
+case "$1" in
+  configure)
+    # Configure this package.  If the package must prompt the user for
+    # information, do it here.
+               . /usr/share/debconf/confmodule
+               db_version 2.0
+               db_get "citadel/baseurl" && baseurl="$RET"
+               if echo "$baseurl"|grep -q "http"; then
+                       if echo "$baseurl"|grep -q "https"; then
+                               HOSTNAME=    ServerName `echo "$baseurl" |sed "s;https://\(.*\)/.*;\1;"`
+                               BASEURL=`echo "$baseurl" |sed "s;http://.*\..*/.*;\1;"`
+                       else
+                               HOSTNAME=    ServerName `echo "$baseurl" |sed "s;https://\(.*\)/.*;\1;"`
+                               BASEURL=`echo "$baseurl" |sed "s;https://.*\..*/.*;\1;"`
+                       fi
+               else
+                       HOSTNAME="ServerName *"
+                       BASEURL="$baseurl"
+               fi
+               echo "
+<VirtualHost *>
+${SERVERNAME}
+       DocumentRoot /var/www/
+#    ProxyPass /dotskip http://127.0.0.1:2000/dotskip
+#    ProxyPassReverse /dotskip http://127.0.0.1:2000/dotskip
+    ProxyPass /webcit/ http://127.0.0.1:2000/
+    ProxyPassReverse /webcit/ http://127.0.0.1:2000/
+    ProxyPass /listsub/ http://127.0.0.1:2000/listsub/
+    ProxyPassReverse /listsub/ http://127.0.0.1:2000/listsub/
+    ProxyPass /groupdav/ http://127.0.0.1:2000/groupdav/
+    ProxyPassReverse /groupdav/ http://127.0.0.1:2000/groupdav/
+</VirtualHost>
+" >/tmp/apache.conf
+        ucf /tmp/apache.conf /etc/citadel/apache.conf
+               db_get "citadel/webserver" && webserver="$RET"
+               case "$webserver" in
+                       Apache)         webservers="apache";;
+                       Apache-SSL)     webservers="apache-ssl";;
+                       Apache-Perl)    webservers="apache-perl";;
+                       Apache2)                
+                               webservers="apache2"
+                               a2enmod proxy
+                               ;;
+                       
+                       *)                              webservers="";;
+               esac
+               
+               
+               
+               for server in $webservers; do
+                       test -d /etc/$server || continue
+                       
+                       if [ -n "$2" ]; then
+                               uninclude 
+                       fi
+                       
+                       if [ ! -e /etc/$server/conf.d/webcit ]
+                               then
+                               ln -s /etc/citadel/apache.conf /etc/$server/conf.d/webcit
+                       fi
+                       restart=$server
+                       servers=$webservers
+                       . /usr/share/wwwconfig-common/restart.sh
+               done
+
+               ;;
+
+       abort-upgrade|abort-remove|abort-deconfigure)
+
+       ;;
+
+       *)
+               echo "postinst called with unknown argument \`$1'" >&2
+               exit 1
+       ;;
+esac
+
+exit 0
diff --git a/webcit/debian/citadel-webcit-apache.postrm b/webcit/debian/citadel-webcit-apache.postrm
new file mode 100644 (file)
index 0000000..de0073f
--- /dev/null
@@ -0,0 +1,89 @@
+#! /bin/sh
+# postrm.skeleton
+# Skeleton maintainer script showing all the possible cases.
+# Written by Charles Briscoe-Smith, March-June 1998.  Public Domain.
+. /usr/share/debconf/confmodule
+
+# Abort if any command returns an error value
+set -e
+
+# This script is called twice during the removal of the package; once
+# after the removal of the package's files from the system, and as
+# the final step in the removal of this package, after the package's
+# conffiles have been removed.
+
+# Ensure the menu system is updated
+: [ ! -x /usr/bin/update-menus ] || /usr/bin/update-menus
+
+case "$1" in
+  remove)
+    # This package is being removed, but its configuration has not yet
+    # been purged.
+       
+    ;;
+  purge)
+    # This package has previously been removed and is now having
+    # its configuration purged from the system.
+       # remove the gunzipped setup executable.
+       db_purge 'citadel/webserver'
+       db_purge 'citadel/baseurl'
+       ### TODO: remove citadel from inittab!
+    ;;
+  disappear)
+    if test "$2" != overwriter; then
+      echo "$0: undocumented call to \`postrm $*'" 1>&2
+      exit 0
+    fi
+    # This package has been completely overwritten by package $3
+    # (version $4).  All our files are already gone from the system.
+    # This is a special case: neither "prerm remove" nor "postrm remove"
+    # have been called, because dpkg didn't know that this package would
+    # disappear until this stage.
+    :
+
+    ;;
+  upgrade)
+    # About to upgrade FROM THIS VERSION to version $2 of this package.
+    # "prerm upgrade" has been called for this version, and "preinst
+    # upgrade" has been called for the new version.  Last chance to
+    # clean up.
+    :
+
+    ;;
+  failed-upgrade)
+    # About to upgrade from version $2 of this package TO THIS VERSION.
+    # "prerm upgrade" has been called for the old version, and "preinst
+    # upgrade" has been called for this version.  This is only used if
+    # the previous version's "postrm upgrade" couldn't handle it and
+    # returned non-zero. (Fix old postrm bugs here.)
+    :
+
+    ;;
+  abort-install)
+    # Back out of an attempt to install this package.  Undo the effects of
+    # "preinst install...".  There are two sub-cases.
+    :
+
+    if test "${2+set}" = set; then
+      # When the install was attempted, version $2's configuration
+      # files were still on the system.  Undo the effects of "preinst
+      # install $2".
+      :
+
+    else
+      # We were being installed from scratch.  Undo the effects of
+      # "preinst install".
+      :
+
+    fi ;;
+  abort-upgrade)
+    # Back out of an attempt to upgrade this package from version $2
+    # TO THIS VERSION.  Undo the effects of "preinst upgrade $2".
+    :
+
+    ;;
+  *) echo "$0: didn't understand being called with \`$1'" 1>&2
+     exit 0;;
+esac
+
+exit 0
diff --git a/webcit/debian/citadel-webcit-apache.postrm.debhelper b/webcit/debian/citadel-webcit-apache.postrm.debhelper
new file mode 100644 (file)
index 0000000..bc035b9
--- /dev/null
@@ -0,0 +1,6 @@
+# Automatically added by dh_installdebconf
+if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
+       . /usr/share/debconf/confmodule
+       db_purge
+fi
+# End automatically added section
diff --git a/webcit/debian/citadel-webcit-apache.substvars b/webcit/debian/citadel-webcit-apache.substvars
new file mode 100644 (file)
index 0000000..a8fe3cf
--- /dev/null
@@ -0,0 +1 @@
+misc:Depends=debconf (>= 0.5) | debconf-2.0
diff --git a/webcit/debian/citadel-webcit-apache.templates b/webcit/debian/citadel-webcit-apache.templates
new file mode 100644 (file)
index 0000000..1fae6ef
--- /dev/null
@@ -0,0 +1,21 @@
+
+Template: citadel/webserver
+Type: multiselect
+Choices: Apache, Apache-SSL, Apache-Perl, Apache2, None
+Default: Apache2
+Description: Select Server
+  Integrates Citadel with your Webserver.
+  Please select one or more Webservers, you want webcit to
+  be visible under. Webcit can run under any Proxy enabled
+  Webserver but this automatic configuration process only 
+  supports Apache servers.
+
+Template: citadel/baseurl
+Type: string
+Default: /webcit
+Description: HTTP Location
+  Please specify the way you want to make Webcit visible 
+  through your Webserver. Just enter a path, if you want 
+  to make it visible under that path at any of your vhosts.
+  Alternate enter a FQDN of the VHost you want to use, like
+  http://webcit.yoursite.net
\ No newline at end of file
index 3bbc468f8203d039d53aca8a45e4de29b0bd7b2b..b38eea2cb3dc94ec4c4ed36f90da9b929e8934d4 100644 (file)
@@ -61,31 +61,49 @@ case "$1" in
     # maintainer version, and let it handle how to manage the real
     # confuguration file in /etc. This is how a static configuration
     # file can be handled:
-       cd /var/lib/citadel/www/static; md5sum * |grep -v ".gz" |grep -v md5sums>/tmp/md5sums
-       gunzip -c /usr/share/doc/citadel-webcit/examples/static/md5sums  > /tmp/newsums
+       rm -f /tmp/md5sums
+       touch /tmp/md5sums
+       cd /var/lib/citadel/www/; 
+       for i in `find -type f `; do 
+               md5sum "$i" >>/tmp/md5sums
+       done
+
+       cd /usr/share/doc/citadel-webcit/examples/
+       # if target dirs don't exist, create them.
+       for i in `find -type d` ; do 
+               if test ! -d /var/lib/citadel/www/$i; then
+                       mkdir -p /var/lib/citadel/www/$i 
+               fi
+       done
+
+       gunzip -c md5sums  > /tmp/newsums
        if diff /tmp/newsums /tmp/md5sums >/dev/null; then
-               echo >/dev/null
+               echo ''>/dev/null
        else
-               cd /usr/share/doc/citadel-webcit/examples/static; for i in `echo *|sed "s;md5sums.gz;;"`; do 
-                       case $i in 
-                               *.gz)
-                                       j=`echo $i|sed "s;.gz;;"`
-                                       gunzip -c  "/usr/share/doc/citadel-webcit/examples/static/$i" >"/tmp/$j"
-                                       i=$j
-                                       ;;
-                               *)
-                                       cp "/usr/share/doc/citadel-webcit/examples/static/$i" "/tmp"
-                                       ;;
-                       esac
-                       origsum=`grep " $i" /tmp/md5sums |sed "s; .*;;"`
-                       newsum=`grep " $i" /tmp/newsums |sed "s; .*;;"`
-                       if test -z "$origsum"; then
-                               ucf "/tmp/$i" "/var/lib/citadel/www/static/$i"
+               cd /usr/share/doc/citadel-webcit/examples/
+               for i in `cat /tmp/newsums |sed "s;.* \./;;"`; do 
+                       if test -f $i.gz; then 
+                               j=`basename $i|sed -e "s;.gz;;" `
+                               gunzip -c  "/usr/share/doc/citadel-webcit/examples$REL_PATH/$i" >"/tmp/$j"
+                               i=`dirname $i`/$j
                        else
-                               if test "$origsum" != "$newsum"; then
-                                       ucf "/tmp/$i" "/var/lib/citadel/www/static/$i"
+                               j=`basename $i`
+                               cp "/usr/share/doc/citadel-webcit/examples/$i" "/tmp"
+                       fi
+                       if test -f /var/lib/citadel/www/$i; then
+                               origsum=`grep "$i" /tmp/md5sums |sed "s; .*;;"`
+                               newsum=`grep "$i" /tmp/newsums |sed "s; .*;;"`
+                               if test -z "$origsum"; then
+                                       ucf "/tmp/$j" "/var/lib/citadel/www/$i"
+                               else
+                                       if test "$origsum" != "$newsum"; then
+                                               ucf "/tmp/$j" "/var/lib/citadel/www/$i"
+                                       fi
                                fi
+                       else
+                               ucf "/tmp/$j" "/var/lib/citadel/www/$i"
                        fi
+                       rm -f "/tmp/$j"
                done
        fi
        rm -f /tmp/newsums /tmp/md5sums
@@ -109,6 +127,14 @@ No
 127.0.0.1
 504
 "|/usr/lib/citadel-webcit/setup -q
+               echo "/usr/sbin
+Yes
+$http_port
+$https_port
+No
+127.0.0.1
+504
+/usr/lib/citadel-webcit/setup -q" >>/tmp/foo
        else 
                echo "/usr/sbin
 " |/usr/lib/citadel-webcit/setup -q
@@ -163,7 +189,7 @@ No
     ###:
 
     ;;
-  *) echo "$0: didn't understand being called with \`$1'" 1>&2
+  *) echo "$0: didn't understand being called with '$1'" 1>&2
      exit 0;;
 esac
 
index 1b834a654a6ebba773979ddd6dbd29cfcc5f15ba..63e9d9fc7c804bd3431a8b0631e2cbddc576fac9 100644 (file)
@@ -5,6 +5,7 @@
 
 # Abort if any command returns an error value
 set -e
+. /usr/share/debconf/confmodule
 
 # This script is called twice during the removal of the package; once
 # after the removal of the package's files from the system, and as
@@ -18,7 +19,7 @@ case "$1" in
   remove)
     # This package is being removed, but its configuration has not yet
     # been purged.
-    
+    # TODO:  remove from inittab.
 
     # Remove diversion
     #: dpkg-divert --package foo --remove --rename \
@@ -35,11 +36,18 @@ case "$1" in
     # 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:
-       cd /usr/share/doc/citadel-webcit/examples/static; for i in *; do 
-               i=`echo $i|sed "s;.gz;;"`
-               ucf --purge "/var/lib/citadel/www/static/$i"
-               rm -f "/var/lib/citadel/www/static/$i"
-       done
+       if test -d /var/lib/citadel/www/static; then 
+               cd /var/lib/citadel/www/static; for i in *; do 
+                       i=`echo $i|sed "s;.gz;;"`
+                       ucf --purge "/var/lib/citadel/www/static/$i"
+                       rm -f "/var/lib/citadel/www/static/$i"
+               done
+       fi
+       #rmdir /var/lib/citadel/www/static
+       echo "/var/lib/citadel/www/keys not removed. "
+       db_purge 'citadel/WebcitHttpsPort'
+       db_purge 'citadel/WebcitHttpPort'
+       db_purge 'citade/WebcitInstallnote'
        ### TODO: remove citadel from inittab!
     ;;
   disappear)
index 6a583f0e78557762d3fd23b9b6e111fbb76c100c..552c6985f53d6147aeea759b0f7b2695fa41aee1 100644 (file)
@@ -1,2 +1,2 @@
 misc:Depends=debconf (>= 0.5) | debconf-2.0
-shlibs:Depends=libc6 (>= 2.3.2.ds1-21), libssl0.9.7, zlib1g (>= 1:1.2.1)
+shlibs:Depends=libc6 (>= 2.3.5-1), libssl0.9.8, zlib1g (>= 1:1.2.1)
index 71a2152555e7dad141912cc870ac8125b7a3c953..1208a9441b001f56a08d324134bf8fc75377c22e 100644 (file)
@@ -20,4 +20,5 @@ Description: Citadel/UX
   specified as the Administrator, and
   review the Points under the Administration menu. If you have further
   questions review www.citadel.org, specialy the FAQ and Documentation
-  section.
\ No newline at end of file
+  section.
+
index a3ab22e3015f74b40e660984f13dbe8a07694c4f..dca2d215be1973af6aaca9a458d36f82f19da72b 100644 (file)
@@ -15,3 +15,9 @@ Description: Webcit, the Webfrontend to the Citadel.
  FireFox, simply the best web browser on the market. 
  It's the best, it's secure, and it's free, so if you 
  haven't switched yet, why not do so now? 
+
+Package: citadel-webcit-apache
+Architecture: any
+Depends: citadel-webcit, apache2 | httpd, debconf
+Description: Integrates Webcit with your local Apache
+
diff --git a/webcit/debian/files b/webcit/debian/files
deleted file mode 100644 (file)
index 742f72c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-citadel-webcit_6.21-1_i386.deb unknown optional
index deb4b2d8c7325d9cdb2efffe42331caaf5e22408..9ce903b6caa2acf5a05299286c504f121cc731dc 100755 (executable)
 
 
 
-CFLAGS = -Wall -g
+CFLAGS = -Wall -g -ggdb
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
 else
-       CFLAGS += -O2
+       CFLAGS += -O0 -ggdb
 endif
 
 configure: configure-stamp
@@ -31,7 +31,7 @@ configure-stamp:
                --with-spooldir=/var/spool/citadel \
                --with-datadir=/var/lib/citadel \
                --with-rundir=/var/run/citadel \
-               --with-ical --with-db --with-ldap --with-zlib --with-ssl --with-libiconf --with-newt
+               --with-ical --with-db --with-ldap --with-zlib --with-ssl --with-libiconf --with-newt --with-included-gettext
 
        touch configure-stamp
 
@@ -73,7 +73,14 @@ install: build
        mkdir -p $(CURDIR)/debian/citadel-webcit/usr/lib/citadel-webcit/
        mv $(CURDIR)/debian/webcit/var/lib/citadel/www/static \
                $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/
-       cd $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/static; md5sum *|grep -v ".gz"|grep -v md5sums >md5sums
+       mv $(CURDIR)/debian/webcit/var/lib/citadel/www/tiny_mce \
+               $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/
+# TODO: locale -> /usr/share/locale
+       mv $(CURDIR)/debian/webcit/var/lib/citadel/www/locale \
+               $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/
+
+       cd $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/; \
+                               md5sum `find -type f |grep -v md5sums `>md5sums; 
        mv $(CURDIR)/debian/webcit/var/lib/citadel/www/setup \
                $(CURDIR)/debian/citadel-webcit/usr/lib/citadel-webcit/
        mv $(CURDIR)/debian/webcit/var/lib/citadel/www/webserver \