Prva inacica paketa za Debian squeeze distribuciju.
authorDragan Dosen <ddosen@ffzg.hr>
Thu, 28 Apr 2011 19:52:28 +0000 (21:52 +0200)
committerDragan Dosen <ddosen@ffzg.hr>
Thu, 28 Apr 2011 19:52:28 +0000 (21:52 +0200)
17 files changed:
README.CARNet [moved from debian/README.CARNet with 88% similarity]
TODO.CARNet [moved from debian/TODO.CARNet with 100% similarity]
debian/changelog
debian/changelog.CARNet [deleted symlink]
debian/compat
debian/config
debian/control
debian/copyright [new file with mode: 0644]
debian/docs
debian/lintian-overrides [new file with mode: 0644]
debian/po/POTFILES.in [new file with mode: 0644]
debian/po/templates.pot [new file with mode: 0644]
debian/postinst
debian/postrm
debian/prerm
debian/rules
debian/templates

similarity index 88%
rename from debian/README.CARNet
rename to README.CARNet
index c3a90ac..3badf50 100644 (file)
@@ -1,5 +1,5 @@
 squirrelmail-cn
----------------
+~~~~~~~~~~~~~~~
 
 Ovaj paket podesava tipicne vrijednosti u config.php datoteci i
 dodaje CARNet-ov logotip.  Ukoliko je potrebno, na sustavu se
@@ -15,4 +15,4 @@ zatim Zoran Dzelajlija <jelly+paketi@srce.hr>.
 Trenutno odrzava Dragan Dosen <ddosen@ffzg.hr>.
 
 
- -- Dragan Dosen <ddosen@ffzg.hr>  Thu, 18 Dec 2008 22:45:28 +0100
+ -- Dragan Dosen <ddosen@ffzg.hr>  Wed, 27 Apr 2011 23:32:52 +0200
similarity index 100%
rename from debian/TODO.CARNet
rename to TODO.CARNet
index 8af40f9..5abb1c0 100644 (file)
@@ -1,3 +1,14 @@
+squirrelmail-cn (2:1.4.21+1) stable; urgency=low
+
+  * Prva inacica paketa za Debian squeeze distribuciju.
+  * Nova debian/rules datoteka.
+  * Azurirane ovisnosti unutar debian/control.
+  * Razni Lintian popravci, dodan copyright, promjena inacice
+    paketa u Debian native.
+  * Koristenje invoke-rc.d za Apache2 reload.
+
+ -- Dragan Dosen <ddosen@ffzg.hr>  Wed, 27 Apr 2011 23:32:52 +0200
+
 squirrelmail-cn (2:1.4.15-2lenny1) stable; urgency=low
 
   * Upgrade paketa za Debian lenny.
@@ -239,4 +250,4 @@ squirrelmail-cn (1.2.5) stable; urgency=low
   * Initial release.
   * This entry was faked using README.CARNet notes.
 
- -- Albert Novak <Albert.Novak@pu.CARNet.hr>  Tue, Apr 30 2002 15:49:21 +0200
+ -- Albert Novak <Albert.Novak@pu.CARNet.hr>  Tue, 30 Apr 2002 15:49:21 +0200
diff --git a/debian/changelog.CARNet b/debian/changelog.CARNet
deleted file mode 120000 (symlink)
index 194579e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-changelog.Debian
\ No newline at end of file
index b8626c4..7f8f011 100644 (file)
@@ -1 +1 @@
-4
+7
index 866772f..ddea8a6 100644 (file)
@@ -6,12 +6,12 @@ set -e
 . /usr/share/debconf/confmodule
 
 if [ "$1" != reconfigure ]; then
-        for item in leftwidth themecss; do
-            db_fget squirrelmail-cn/${item} seen
-            if [ "$RET" = "true" ]; then
-                exit 0
-            fi
-        done
+    for item in leftwidth themecss; do
+        db_fget squirrelmail-cn/${item} seen
+        if [ "$RET" = "true" ]; then
+            exit 0
+        fi
+    done
 fi
 
 SMDIR="/etc/squirrelmail"
@@ -22,37 +22,35 @@ SMCONF="$SMDIR/config.php"
 #
 change_default=1
 if [ -f "$SMCONF" ]; then
-        if egrep -q "^[[:space:]]*\\\$default_left_size[[:space:]]*=[[:space:]]*'220'" "$SMCONF"; then
-            change_default=0
-        fi
+    if egrep -q "^[[:space:]]*\\\$default_left_size[[:space:]]*=[[:space:]]*'220'" "$SMCONF"; then
+        change_default=0
+    fi
 fi
 if [ $change_default -eq 1 ]; then
-
-        # Ask user for changing $default_left_size to '220'.
-        db_input critical squirrelmail-cn/leftwidth || true
-        db_go || true
+    # Ask user for changing $default_left_size to '220'.
+    db_input critical squirrelmail-cn/leftwidth || true
+    db_go || true
 else
-        db_set squirrelmail-cn/leftwidth false || true
-        db_fset squirrelmail-cn/leftwidth seen true
-        change_default=1
+    db_set squirrelmail-cn/leftwidth false || true
+    db_fset squirrelmail-cn/leftwidth seen true
+    change_default=1
 fi
 
 # Check $theme_css in SM's config.php
 #
 change_default=1
 if [ -f "$SMCONF" ]; then
-        if egrep -q "^[[:space:]]*\\\$theme_css[[:space:]]*=[[:space:]]*SM_PATH[[:space:]]*\.[[:space:]]*'themes\/css\/squirrelmail-cn\.css'" "$SMCONF"; then
-            change_default=0
-        fi
+    if egrep -q "^[[:space:]]*\\\$theme_css[[:space:]]*=[[:space:]]*SM_PATH[[:space:]]*\.[[:space:]]*'themes\/css\/squirrelmail-cn\.css'" "$SMCONF"; then
+        change_default=0
+    fi
 fi
 if [ $change_default -eq 1 ]; then
-
-        # Ask user for changing $theme_css to 'squirrelmail-cn.css'.
-        db_input critical squirrelmail-cn/themecss || true
-        db_go || true
+    # Ask user for changing $theme_css to 'squirrelmail-cn.css'.
+    db_input critical squirrelmail-cn/themecss || true
+    db_go || true
 else
-        db_set squirrelmail-cn/themecss false || true
-        db_fset squirrelmail-cn/themecss seen true
+    db_set squirrelmail-cn/themecss false || true
+    db_fset squirrelmail-cn/themecss seen true
 fi
 
 exit 0
index 2f6bf37..202e2b6 100644 (file)
@@ -2,15 +2,15 @@ Source: squirrelmail-cn
 Section: web
 Priority: optional
 Maintainer: Dragan Dosen <ddosen@ffzg.hr>
-Build-Depends: debhelper (>= 4.0.0)
-Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 7), po-debconf
+Standards-Version: 3.9.1
 
 Package: squirrelmail-cn
 Architecture: all
 Pre-Depends: apache2-cn (>= 2.2), php5-cn
-Depends: squirrelmail (>= 2:1.4.15-4), squirrelmail-locales (>= 1.4.13-20071220-1), carnet-tools-cn (>= 2.8.1), hostname, locales, ${misc:Depends}
+Depends: squirrelmail (>= 2:1.4.21-1), squirrelmail-locales (>= 1.4.18-20090526-1), carnet-tools-cn (>= 3.0.0), hostname (>= 2.98), locales, ${misc:Depends}
 Recommends: dovecot-cn | imap-server
-Description: Webmail for nuts (CARNet configuration)
+Description: Webmail for nuts
  SquirrelMail is a standards-based webmail package written in PHP. It
  includes built-in pure PHP support for the IMAP and SMTP protocols, and
  is designed for maximum compatibility across browsers. SquirrelMail has
@@ -20,6 +20,5 @@ Description: Webmail for nuts (CARNet configuration)
  SquirrelMail has all the functionality you would want from an email client,
  including strong MIME support, address books and folder manipulation.
  .
- Homepage: http://www.squirrelmail.org/
- .
  This package contains additional CARNet configuration.
+Homepage: http://www.squirrelmail.org/
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..5350ae7
--- /dev/null
@@ -0,0 +1,7 @@
+Copyright 2011 CARNet 
+
+You are free to distribute this software package under the terms of the
+GNU General Public License.
+
+On Debian systems, the complete text of the GNU General Public
+License can be found in the file /usr/share/common-licenses/GPL.
index 6fb313a..b5dd805 100644 (file)
@@ -1,3 +1,2 @@
-debian/README.CARNet
-debian/TODO.CARNet
-debian/changelog.CARNet
+README.CARNet
+TODO.CARNet
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
new file mode 100644 (file)
index 0000000..e2e6066
--- /dev/null
@@ -0,0 +1 @@
+squirrelmail-cn: latest-debian-changelog-entry-changed-to-native
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644 (file)
index 0000000..cef83a3
--- /dev/null
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
new file mode 100644 (file)
index 0000000..09e4975
--- /dev/null
@@ -0,0 +1,61 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: squirrelmail-cn@packages.debian.org\n"
+"POT-Creation-Date: 2011-04-28 20:01+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#. Type: boolean
+#. Description
+#: ../templates:1001 ../templates:2001
+msgid "Zelite li aktivirati preporucenu postavku za Squirrelmail?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"Provjerom trenutne Squirrelmail konfiguracije (konfiguracijska datoteka /etc/"
+"squirrelmail/config.php), ustanovljeno je da sirina liste pretinaca unutar "
+"Squirrelmail web sucelja nije 220 piksela."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"Kako bi Squirrelmail web sucelje korisnicima bilo preglednije, preporucamo "
+"da postavite sirinu liste pretinaca na 220 piksela."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"Provjerom trenutne Squirrelmail konfiguracije (konfiguracijska datoteka /etc/"
+"squirrelmail/config.php), ustanovljeno je da trenutno ne koristite "
+"preporucenu CSS datoteku (squirrelmail-cn.css)."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"Unutar CSS datoteke (squirrelmail-cn.css) dodatno su podeseni fontovi i "
+"njihova velicina kako bi Squirrelmail web sucelje korisnicima bilo "
+"preglednije."
+msgstr ""
index 1f77371..ac161dc 100644 (file)
@@ -2,24 +2,24 @@
 
 set -e
 
-[ "$DEBIAN_SCRIPT_DEBUG" ] && set -x 
+[ "$DEBIAN_SCRIPT_DEBUG" ] && set -x
 
 # Source debconf library.
 . /usr/share/debconf/confmodule
 
 case "$1" in
-       configure)
-               # continue below
-               ;;
-
-       abort-upgrade|abort-remove|abort-deconfigure)
-               exit 0
-               ;;
-
-       *)
-               echo "postinst called with unknown argument \`$1'" >&2
-               exit 0
-               ;;
+    configure)
+        # continue below
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+        exit 0
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+        ;;
 esac
 
 
@@ -32,18 +32,17 @@ FQDN=`hostname --fqdn`
 unset CP_ECHO_RETURN
 
 mv_old_backups () {
-
-       # Clean up /etc, nove old jun^H^H^Hbackups where they belong
-       glob="$1.old.*-*-*.*:*:*"
-       
-       # ${glob%/*} (dirname $glob) does not work for files in root
-       if [ -n "$(find ${glob%/*} -name ${glob##*/})" ]; then
-               for i in $(find ${glob%/*} -name ${glob##*/})
-               do
-                       cp_backup_conffile "$i" "$2"
-                       rm -f "$i"
-               done
-       fi
+    # Clean up /etc, nove old jun^H^H^Hbackups where they belong
+    glob="$1.old.*-*-*.*:*:*"
+
+    # ${glob%/*} (dirname $glob) does not work for files in root
+    if [ -n "$(find ${glob%/*} -name ${glob##*/})" ]; then
+        for i in $(find ${glob%/*} -name ${glob##*/})
+        do
+            cp_backup_conffile "$i" "$2"
+            rm -f "$i"
+        done
+    fi
 }
 
 # listconffiles ()
@@ -52,15 +51,14 @@ mv_old_backups () {
 #   Returns all configfiles so defined.
 #
 listconffiles () {
-
-        local i incs
-
-        incs=`awk 'tolower($1) == "include" { sub("/$","/*",$2); print $2; }' $1`
-        if [ -n "$incs" ]; then
-            for i in $incs; do
-                if [ -e "$i" ]; then echo "$i"; listconffiles "$i"; fi
-            done
-        fi
+    local i incs
+
+    incs=`awk 'tolower($1) == "include" { sub("/$","/*",$2); print $2; }' $1`
+    if [ -n "$incs" ]; then
+        for i in $incs; do
+            if [ -e "$i" ]; then echo "$i"; listconffiles "$i"; fi
+        done
+    fi
 }
 
 # genlocales ()
@@ -69,12 +67,11 @@ listconffiles () {
 #   is not installed.
 #
 genlocales () {
-
-        if [ -f /usr/lib/locales-all/supported.tar.lzma ] ; then
-            cp_echo "CN: locales-all installed, skipping locales generation."
-        else
-            /usr/sbin/locale-gen
-        fi
+    if [ -f /usr/lib/locales-all/supported.tar.lzma ] ; then
+        cp_echo "CN: locales-all installed, skipping locales generation."
+    else
+        locale-gen
+    fi
 }
 
 
@@ -90,50 +87,49 @@ mv_old_backups $CONF $backup_name
 #
 if [ -f "$CONF" ]; then
 
-       # Backup first.
-       if cp_check_and_backup "$CONF" "$backup_name"; then
-               cp_echo "CN: Old $CONF saved as \"/var/backups/$backup_name.bak\"."
-       fi
-
-       # Check if we already modified apache.conf
-       if ! egrep -q "^[       ]+RewriteRule \. https" "$CONF"; then
-               
-               echo -n "CN: Updating Apache2 configuration for Squirrelmail"
-               perl -n -e 'print if ! m|^Alias\s*/webmail|' "$CONF" > $CONF.tmp
-               
-               cp-update -t squirrelmail-cn $CONF.tmp <<-EOF
-       # Force SSL for /webmail -> you can still use /squirrelmail
-       Alias /webmail /usr/share/squirrelmail
-       
-       <IfModule mod_rewrite.c>
-         <IfModule mod_ssl.c>
-           <Location /webmail>
-             RewriteEngine on
-             RewriteCond %{HTTPS} !=on
-             RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI}  [L]
-           </Location>
-         </IfModule>
-       </IfModule>
-       
-       #
-       # WARNING: This file is automatically included in each VirtualHost
-       # entry you might have.  Do not enable the VirtualHost example provided
-       # in this file, it WILL break your Apache configuration. Copy the
-       # VirtualHost section to the standard webserver configuration file
-       # instead.
-       #
-       EOF
-               cp_mv $CONF.tmp $CONF
-
-               # This will break if cp_backup_conffile ever changes destination path
-               if ! cmp -s "$CONF" "/var/backups/$backup_name.bak"; then
-                       echo "."
-                       cp_echo "CN: Updated Apache2 configuration for Squirrelmail."
-                       need_restart=1
-               else
-                       echo "... no changes."
-               fi
+    # Backup first.
+    if cp_check_and_backup "$CONF" "$backup_name"; then
+        cp_echo "CN: Old $CONF saved as \"/var/backups/$backup_name.bak\"."
+    fi
+
+    # Check if we already modified apache.conf
+    if ! egrep -q "^[  ]+RewriteRule \. https" "$CONF"; then
+        echo -n "CN: Updating Apache2 configuration for Squirrelmail"
+        perl -n -e 'print if ! m|^Alias\s*/webmail|' "$CONF" > $CONF.tmp
+
+        cp-update -t squirrelmail-cn $CONF.tmp <<-EOF
+# Force SSL for /webmail -> you can still use /squirrelmail
+Alias /webmail /usr/share/squirrelmail
+
+<IfModule mod_rewrite.c>
+  <IfModule mod_ssl.c>
+    <Location /webmail>
+      RewriteEngine on
+      RewriteCond %{HTTPS} !=on
+      RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI}  [L]
+    </Location>
+  </IfModule>
+</IfModule>
+
+#
+# WARNING: This file is automatically included in each VirtualHost
+# entry you might have.  Do not enable the VirtualHost example provided
+# in this file, it WILL break your Apache configuration. Copy the
+# VirtualHost section to the standard webserver configuration file
+# instead.
+#
+EOF
+        cp_mv $CONF.tmp $CONF
+
+        # This will break if cp_backup_conffile ever changes destination path
+        if ! cmp -s "$CONF" "/var/backups/$backup_name.bak"; then
+            echo "."
+            cp_echo "CN: Updated Apache2 configuration for Squirrelmail."
+            need_restart=1
+        else
+            echo "... no changes."
         fi
+    fi
 fi
 
 
@@ -152,8 +148,8 @@ apache2listconf=`listconffiles "$hconf" | grep "$CONF"` || true
 apache2squirrel=`ls -l /etc/apache2/conf.d/ | grep "$CONF"` || true
 
 if [ -z "$apache2listconf" -a -z "$apache2squirrel" ]; then
-       ln -s "$CONF" /etc/apache2/conf.d/squirrelmail-cn.conf
-       need_restart=1
+    ln -s "$CONF" /etc/apache2/conf.d/squirrelmail-cn.conf
+    need_restart=1
 fi
 
 
@@ -163,30 +159,30 @@ CONF="$CONFDIR/config.php"
 TMPL="$CONFDIR/config_default.php"
 mv_old_backups "$CONF" "`basename $CONF`"
 if cp_check_and_backup "$CONF"; then
-       cp_echo "CN: Old $CONF saved as \"/var/backups/${CONF##*/}.bak\"."
+    cp_echo "CN: Old $CONF saved as \"/var/backups/${CONF##*/}.bak\"."
 fi
 
 # We use sed to replace old defaults with ours.
 # Must escape \$ because of shell expansion.
 #
 seddef="/^[    ]*\\\$org_logo[         ]*=/s/sm_logo\.jpg/sm_carnet_logo.png/;
-       /^[     ]*\\\$org_logo[         ]*=/s/sm_logo\.png/sm_carnet_logo.png/;
-       /^[     ]*\\\$org_logo[         ]*=/s/sm_carnet_logo\.jpg/sm_carnet_logo.png/;
-       /^[     ]*\\\$domain[   ]*=/s/mydomain\.com/$domainname/;
-       /^[     ]*\\\$default_charset[  ]*=/s/iso-8859-1/iso-8859-2/;
-       /^[     ]*\\\$org_logo_width[   ]*=/s/308/0/;
-       /^[     ]*\\\$org_logo_height[  ]*=/s/111/0/;
-       /^[     ]*\\\$squirrelmail_default_language[    ]*=/s/en_US/hr_HR/;
-       /^[     ]*\\\$data_dir[         ]*=/s/\.\.\/data\//\/var\/lib\/squirrelmail\/data\//;
-       "
+        /^[    ]*\\\$org_logo[         ]*=/s/sm_logo\.png/sm_carnet_logo.png/;
+        /^[    ]*\\\$org_logo[         ]*=/s/sm_carnet_logo\.jpg/sm_carnet_logo.png/;
+        /^[    ]*\\\$domain[   ]*=/s/mydomain\.com/$domainname/;
+        /^[    ]*\\\$default_charset[  ]*=/s/iso-8859-1/iso-8859-2/;
+        /^[    ]*\\\$org_logo_width[   ]*=/s/308/0/;
+        /^[    ]*\\\$org_logo_height[  ]*=/s/111/0/;
+        /^[    ]*\\\$squirrelmail_default_language[    ]*=/s/en_US/hr_HR/;
+        /^[    ]*\\\$data_dir[         ]*=/s/\.\.\/data\//\/var\/lib\/squirrelmail\/data\//;
+        "
 
 # Left frame size to 220px.
 # $default_left_size = '220';
 #
 db_get squirrelmail-cn/leftwidth || true
 if [ "$RET" = "true" ]; then
-  seddef="$seddef/^[   ]*\\\$default_left_size[        ]*=/s/'[0-9]*'/'220'/;
-       "
+    seddef="$seddef/^[         ]*\\\$default_left_size[        ]*=/s/'[0-9]*'/'220'/;
+        "
 fi
 
 # Change CSS file for Squirrelmail.
@@ -194,8 +190,8 @@ fi
 #
 db_get squirrelmail-cn/themecss || true
 if [ "$RET" = "true" ]; then
-  seddef="$seddef/^[   ]*\\\$theme_css[        ]*=/s/=.*/= SM_PATH . 'themes\/css\/squirrelmail-cn.css';/;
-       "
+    seddef="$seddef/^[         ]*\\\$theme_css[        ]*=/s/=.*/= SM_PATH . 'themes\/css\/squirrelmail-cn.css';/;
+        "
 fi
 
 db_stop || true
@@ -203,14 +199,14 @@ db_stop || true
 # Check for our dovecot package; if it is installed, assume it's used.
 #
 if dpkg -l dovecot-cn 2>/dev/null | grep -q '^ii'; then
-  seddef="$seddef/^[   ]*\\\$imap_server_type[         ]*=/ {s/cyrus/dovecot/;s/other/dovecot/;s/uw/dovecot/}
-       "
+    seddef="$seddef/^[         ]*\\\$imap_server_type[         ]*=/ {s/cyrus/dovecot/;s/other/dovecot/;s/uw/dovecot/}
+        "
 fi
 
 # Would there be any changes, perhaps?
 #
 if cp_check_and_sed '.' "$seddef" "$CONF"; then
-       need_restart=1
+    need_restart=1
 fi
 
 
@@ -226,49 +222,50 @@ grep -q '\.' /etc/hostname || nodots=1
 # Check for hr_HR locale.
 #
 if [ -f /etc/locale.gen ]; then
-        if ! egrep -q '^hr_HR ISO-8859-2\b' /etc/locale.gen; then
-            echo "hr_HR ISO-8859-2" >> /etc/locale.gen
-            cp_echo "CN: Added hr_HR locale to /etc/locale.gen."
-            genlocales
-            need_restart=1
-        fi
-else
-        echo "hr_HR ISO-8859-2" > /etc/locale.gen
-        cp_echo "CN: /etc/locale.gen created."
+    if ! egrep -q '^hr_HR ISO-8859-2\b' /etc/locale.gen; then
+        echo "hr_HR ISO-8859-2" >> /etc/locale.gen
+        cp_echo "CN: Added hr_HR locale to /etc/locale.gen."
         genlocales
         need_restart=1
+    fi
+else
+    echo "hr_HR ISO-8859-2" > /etc/locale.gen
+    cp_echo "CN: /etc/locale.gen created."
+    genlocales
+    need_restart=1
 fi
 
 
 # Check Apache2 web server for restart.
 #
 if [ $need_restart -eq 1 ]; then
-
-       # Restart Apache2 web server.
-       if [ -x "/etc/init.d/apache2" ]; then
-               if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-                    invoke-rc.d apache2 restart || exit $?
-               else
-                    /etc/init.d/apache2 restart || exit $?
-               fi
-       fi
+    if apache2ctl configtest 2>/dev/null; then
+        invoke-rc.d apache2 force-reload || true
+    else
+        cp_echo "CN: Your Apache2 configuration is either broken or nonexistant."
+    fi
 fi
 
 
 # Mailname info...
 #
 if [ "$nodots" -o "$nomailname" ]; then
-       cp_echo
-       cp_echo "CN: Make sure that /etc/mailname contains a fully qualified domain name"
-       cp_echo "CN  of this machine!  Sending mail via squirrelmail might fail if the FQDN"
-       cp_echo "CN  cannot be found in either /etc/mailname or /etc/hostname."
-       cp_echo "CN  Read mailname(5) man page for details."
-       cp_echo -mailonly "CN  If this machine receives mail for both user@`hostname -f` and "
-       cp_echo -mailonly "CN  user@`hostname -d`, you can also put just the domain in there."
+    cp_echo
+    cp_echo "CN: Make sure that /etc/mailname contains a fully qualified domain name"
+    cp_echo "CN  of this machine!  Sending mail via squirrelmail might fail if the FQDN"
+    cp_echo "CN  cannot be found in either /etc/mailname or /etc/hostname."
+    cp_echo "CN  Read mailname(5) man page for details."
+    cp_echo -mailonly "CN  If this machine receives mail for both user@`hostname -f` and "
+    cp_echo -mailonly "CN  user@`hostname -d`, you can also put just the domain in there."
 fi
 
 # Mail root
 #
 cp_mail "$PKG"
 
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
 exit 0
index 9a66c71..b30cc52 100644 (file)
@@ -2,13 +2,9 @@
 
 set -e
 
-# Debconf
-. /usr/share/debconf/confmodule
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
 
-if [ "$1" = purge ]; then
-        db_purge
-fi
-
-db_stop
+#DEBHELPER#
 
 exit 0
index 459bac8..80f154e 100644 (file)
@@ -5,33 +5,36 @@ set -e
 case "$1" in
   remove|deconfigure)
 
-       cp-update -r squirrelmail-cn /etc/squirrelmail/apache.conf
-
-       if [ -f /etc/apache2/conf.d/squirrelmail-cn.conf ]; then
-               rm -f /etc/apache2/conf.d/squirrelmail-cn.conf
-       fi
-
-       # Restart Apache2 web server.
-       #
-       if [ -x "/etc/init.d/apache2" ]; then
-               if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-                    invoke-rc.d apache2 restart || exit $?
-               else
-                    /etc/init.d/apache2 restart || exit $?
-               fi
-       fi
-
-       break
-       ;;
+    cp-update -r squirrelmail-cn /etc/squirrelmail/apache.conf
+
+    if [ -f /etc/apache2/conf.d/squirrelmail-cn.conf ]; then
+        rm -f /etc/apache2/conf.d/squirrelmail-cn.conf
+    fi
+
+    # Restart Apache2 web server.
+    #
+    if apache2ctl configtest 2>/dev/null; then
+        invoke-rc.d apache2 force-reload || true
+    else
+        echo "CN: Your Apache2 configuration is either broken or nonexistant."
+    fi
+
+    break
+    ;;
   upgrade)
-       :
-       ;;
+    :
+    ;;
   failed-upgrade)
-       ;;
+    ;;
   *)
-       echo "prerm called with unknown argument \$1'" >&2
-       exit 0
-       ;;
+    echo "prerm called with unknown argument \$1'" >&2
+    exit 0
+    ;;
 esac
 
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
 exit 0
index e7f422a..cbe925d 100755 (executable)
@@ -1,68 +1,3 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-#export DH_VERBOSE=1
-
-configure: configure-stamp
-configure-stamp:
-       dh_testdir
-       touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp 
-       dh_testdir
-       touch build-stamp
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp configure-stamp
-       dh_clean 
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k 
-       dh_installdirs
-
-binary-indep: build install
-
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs 
-       dh_installdocs
-       dh_install -X.svn
-#      dh_installexamples
-#      dh_install
-#      dh_installmenu
-       dh_installdebconf
-#      dh_installlogrotate
-#      dh_installemacsen
-#      dh_installpam
-#      dh_installmime
-#      dh_installinit
-#      dh_installcron
-#      dh_installinfo
-       dh_installman
-       dh_link
-#      dh_strip
-       dh_compress
-       dh_fixperms
-#      dh_perl
-#      dh_python
-#      dh_makeshlibs
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+%:
+       dh $@
index 485f245..c30e551 100644 (file)
@@ -1,7 +1,7 @@
 Template: squirrelmail-cn/leftwidth
 Type: boolean
 Default: true
-Description: Zelite li aktivirati preporucenu postavku za Squirrelmail?
+_Description: Zelite li aktivirati preporucenu postavku za Squirrelmail?
  Provjerom trenutne Squirrelmail konfiguracije (konfiguracijska datoteka
  /etc/squirrelmail/config.php), ustanovljeno je da sirina liste pretinaca
  unutar Squirrelmail web sucelja nije 220 piksela.
@@ -12,7 +12,7 @@ Description: Zelite li aktivirati preporucenu postavku za Squirrelmail?
 Template: squirrelmail-cn/themecss
 Type: boolean
 Default: true
-Description: Zelite li aktivirati preporucenu postavku za Squirrelmail?
+_Description: Zelite li aktivirati preporucenu postavku za Squirrelmail?
  Provjerom trenutne Squirrelmail konfiguracije (konfiguracijska datoteka
  /etc/squirrelmail/config.php), ustanovljeno je da trenutno ne koristite
  preporucenu CSS datoteku (squirrelmail-cn.css).