From 648743a0675e248924797b252338adf0847632df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sat, 28 Feb 2009 10:41:32 +0000 Subject: [PATCH] * resync with pkg-citadel, fix package build --- webcit/debian/citadel-webcit.config | 65 +++++++++++---------------- webcit/debian/citadel-webcit.postinst | 24 +++++++++- webcit/debian/control | 4 +- webcit/debian/po/templates.pot | 12 ++--- webcit/debian/rules | 6 ++- webcit/debian/webcit.init | 4 +- 6 files changed, 63 insertions(+), 52 deletions(-) diff --git a/webcit/debian/citadel-webcit.config b/webcit/debian/citadel-webcit.config index b266d2cb6..21158acbc 100755 --- a/webcit/debian/citadel-webcit.config +++ b/webcit/debian/citadel-webcit.config @@ -10,9 +10,7 @@ DO_CONFIGURE=no if test -n "$2"; then # do we want to reconfigure? - if test "`echo $2 | sed -e 's/[.-]//g'`" -lt 127 \ - -o "$1" = reconfigure - then + if test "$1" = reconfigure; then DO_CONFIGURE=yes fi else @@ -23,42 +21,48 @@ else fi if test "$DO_CONFIGURE" = "yes"; then - if test -e /etc/default/webcit; then - . /etc/default/webcit - else - export WEBCIT_CITADEL_IP=127.0.0.1 - export WEBCIT_CITADEL_PORT=504 - fi - STATE=1 - LASTSTATE=5 - while [ "$STATE" != 0 -a "$STATE" -le "$LASTSTATE" ]; do + if test -e /etc/default/webcit; then + . /etc/default/webcit + else + WEBCIT_APACHEFLAG=" " + WEBCIT_HTTP_PORT=8504 + WEBCIT_HTTPS_PORT=-1 + WEBCIT_LANG=UNLIMITED + fi + + if test "$WEBCIT_APACHEFLAG" = "-f"; then + db_set citadel/WebcitApacheIntegration Apache2 + else + db_set citadel/WebcitApacheIntegration Internal + fi + db_set citadel/WebcitHttpPort $WEBCIT_HTTP_PORT + db_set citadel/WebcitHttpsPort $WEBCIT_HTTPS_PORT + db_set citadel/WebcitOfferLang $WEBCIT_LANG + + STATE=1 + LASTSTATE=5 + while [ "$STATE" != 0 -a "$STATE" -le "$LASTSTATE" ]; do case "$STATE" in 1) db_input high citadel/WebcitApacheIntegration || true - db_go ;; 2) db_get citadel/WebcitApacheIntegration if test "$RET" = "Internal"; then + db_set citadel/WebcitHttpPort 80 db_input high citadel/WebcitHttpPort || true - else - db_set citadel/WebcitHttpPort 8504 || true fi ;; - 3) - db_get citadel/WebcitApacheIntegration || true + 3) + db_get citadel/WebcitApacheIntegration if test "$RET" = "Internal"; then + db_set citadel/WebcitHttpsPort 443 db_input high citadel/WebcitHttpsPort || true - export WEBCIT_LISTEN_IP=0.0.0.0 - else - db_set citadel/WebcitHttpsPort -1 - export WEBCIT_LISTEN_IP=127.0.0.1 fi ;; 4) db_input high citadel/WebcitOfferLang || true - db_go ;; 5) db_input high citadel/WebcitInstallnote||true @@ -69,24 +73,9 @@ if test "$DO_CONFIGURE" = "yes"; then else STATE=$(($STATE - 1)) fi - - done - db_go - db_get citadel/WebcitHttpPort && WEBCIT_HTTP_PORT="$RET" - db_get citadel/WebcitHttpsPort && WEBCIT_HTTPS_PORT="$RET" - db_get citadel/WebcitBindIp && WEBCIT_LISTEN_IP="$RET" - db_get citadel/WebcitOfferLang && WEBCIT_LANG="$RET" - - db_get ciatdel/WebcitWebserver &&WWWTYPE="$RET" - if test "$WWWTYPE" = "Internal"; then - WEBCIT_APACHEFLAG=" " - else - WEBCIT_APACHEFLAG="-f" - fi + done set |grep WEBCIT |sed "s;^;export ;;" >/etc/default/webcit fi - - exit 0 diff --git a/webcit/debian/citadel-webcit.postinst b/webcit/debian/citadel-webcit.postinst index fcc3a08b2..58799807d 100644 --- a/webcit/debian/citadel-webcit.postinst +++ b/webcit/debian/citadel-webcit.postinst @@ -14,7 +14,29 @@ case "$1" in mkdir -p /var/run/citadel/keys fi - db_get citadel/WebcitApacheIntegration &&WWWTYPE="$RET" + if test -e /etc/default/webcit; then + . /etc/default/webcit + else + WEBCIT_CITADEL_IP=127.0.0.1 + WEBCIT_CITADEL_PORT=504 + fi + + db_get citadel/WebcitApacheIntegration && WWWTYPE="$RET" + if test "$WWWTYPE" = "Internal"; then + echo 'export WEBCIT_APACHEFLAG=" "' > /etc/default/webcit + echo "export WEBCIT_LISTEN_IP=${WEBCIT_LISTEN_IP:-0.0.0.0}" >> /etc/default/webcit + else + echo 'export WEBCIT_APACHEFLAG="-f"' > /etc/default/webcit + echo "export WEBCIT_LISTEN_IP=${WEBCIT_LISTEN_IP:-127.0.0.1}" >> /etc/default/webcit + fi + + db_get citadel/WebcitHttpPort && echo "export WEBCIT_HTTP_PORT=$RET" >> /etc/default/webcit + db_get citadel/WebcitHttpsPort && echo "export WEBCIT_HTTPS_PORT=$RET" >> /etc/default/webcit + db_get citadel/WebcitOfferLang && echo "export WEBCIT_LANG=$RET" >> /etc/default/webcit + + echo "export WEBCIT_CITADEL_PORT=$WEBCIT_CITADEL_PORT" >> /etc/default/webcit + echo "export WEBCIT_CITADEL_IP=$WEBCIT_CITADEL_IP" >> /etc/default/webcit + db_stop #DEBHELPER# diff --git a/webcit/debian/control b/webcit/debian/control index 5c14567cf..2a647aa3c 100644 --- a/webcit/debian/control +++ b/webcit/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.8.0 Package: citadel-webcit Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, debconf, tinymce, citadel-common, openssl, locales, libjs-prototype +Depends: ${shlibs:Depends}, ${misc:Depends}, debconf, tinymce, citadel-common, openssl, locales, libjs-prototype, libjs-scriptaculous Suggests: citadel-server, apache2 | apache, localepurge, gnome-icon-theme Recommends: shared-mime-info Description: web-based frontend to Citadel groupware server @@ -17,6 +17,4 @@ Description: web-based frontend to Citadel groupware server By combining WebCit and Citadel, you can have a versatile online environment with many users concurrently accessing the same system using the user interface of their choice (text, web, or downloaded client software). - . - Homepage: http://www.citadel.org diff --git a/webcit/debian/po/templates.pot b/webcit/debian/po/templates.pot index cbbf7dc09..28a4d829d 100644 --- a/webcit/debian/po/templates.pot +++ b/webcit/debian/po/templates.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: webcit@packages.debian.org\n" -"POT-Creation-Date: 2009-02-23 23:41+0100\n" +"POT-Creation-Date: 2009-02-28 11:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -66,25 +66,25 @@ msgid "" "1 to disable it." msgstr "" -#. Type: string +#. Type: select #. Choices #: ../citadel-webcit.templates:4001 msgid "UNLIMITED, da_DA, de_DE, en_GB, es_ES, fr_FR, it_IT, nl_NL, pt_BR" msgstr "" -#. Type: string +#. Type: select #. Description #: ../citadel-webcit.templates:4002 msgid "Limit Webcits Login language selection" msgstr "" -#. Type: string +#. Type: select #. Description #: ../citadel-webcit.templates:4002 msgid "" "Select language for the Webcit should run in; select UNLIMITED to leave " -"this choice to your user at the login prompt. (hint: localeconf has to " -"enable the locale so webcit can use it)" +"this choice to your user at the login prompt. hint: localeconf has to " +"enable the locale so webcit can use it" msgstr "" #. Type: note diff --git a/webcit/debian/rules b/webcit/debian/rules index e045af13e..34ce33f21 100755 --- a/webcit/debian/rules +++ b/webcit/debian/rules @@ -70,8 +70,8 @@ build-stamp: configure-stamp touch build-stamp -clean: - dh_testconfigure-stampdir +clean: configure-stamp + dh_testdir dh_testroot rm -f build-stamp configure-stamp @@ -87,6 +87,8 @@ install: build dh_clean -k dh_installdirs $(MAKE) install-bin install-locale install-wwwdata DESTDIR=$(DESTDIR) + chmod a-x -R $(DESTDIR)/usr/share/citadel-webcit/static/* + find $(DESTDIR)/usr/share/locale/ -name webcit.mo -exec chmod a-x {} \; rm $(DESTDIR)/usr/share/citadel-webcit/static/prototype.js # mkdir -p $(DESTDIR)/etc/citadel; cp webcit.conf $(DESTDIR)/etc/citadel/ diff --git a/webcit/debian/webcit.init b/webcit/debian/webcit.init index f867e8ad7..2ec76b621 100644 --- a/webcit/debian/webcit.init +++ b/webcit/debian/webcit.init @@ -54,7 +54,6 @@ unset LANGUAGE unset LC_ALL unset LOCALE - if test -z "$TZ"; then if test -e /etc/timezone; then TZ=`cat /etc/timezone` @@ -110,7 +109,8 @@ do_stop() do_reload() { do_stop - do_start + do_start $WEBCIT_HTTP_PORT $WEBCIT_CITADEL_IP $WEBCIT_CITADEL_PORT "" "$LISTEN" "$WEBCIT_APACHEFLAG" + do_start $WEBCIT_HTTPS_PORT $WEBCIT_CITADEL_IP $WEBCIT_CITADEL_PORT -s "$LISTEN" "$WEBCIT_APACHEFLAG" return 0 } -- 2.30.2