Prva inacica paketa za Debian squeeze distribuciju.
authorDragan Dosen <ddosen@ffzg.hr>
Fri, 29 Apr 2011 14:45:11 +0000 (16:45 +0200)
committerDragan Dosen <ddosen@ffzg.hr>
Fri, 29 Apr 2011 14:45:11 +0000 (16:45 +0200)
16 files changed:
README.CARNet [moved from debian/README.CARNet with 95% similarity]
debian/changelog
debian/changelog.CARNet [deleted symlink]
debian/compat
debian/config
debian/control
debian/copyright [new file with mode: 0644]
debian/dirs [deleted file]
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/rules
debian/templates

similarity index 95%
rename from debian/README.CARNet
rename to README.CARNet
index eefc613..35f7fd0 100644 (file)
@@ -1,5 +1,5 @@
 php5-cn
 php5-cn
--------
+~~~~~~~
 
 Ovaj paket sadrzi dodatne CARNetove postavke za php5 pakete iz 
 Debian lenny distribucije.  Povlaci za sobom instalaciju MySQL
 
 Ovaj paket sadrzi dodatne CARNetove postavke za php5 pakete iz 
 Debian lenny distribucije.  Povlaci za sobom instalaciju MySQL
@@ -52,4 +52,5 @@ Kako bi Vas Apache2 web server mogao normalno posluzivati
 stranice pisane u PHP-u, preporuca se da NE brisete i da ne 
 uredjujete navedene datoteke, osim ako znate sto cinite.
 
 stranice pisane u PHP-u, preporuca se da NE brisete i da ne 
 uredjujete navedene datoteke, osim ako znate sto cinite.
 
- -- Dragan Dosen <ddosen@ffzg.hr>  Sat, 18 Apr 2009 19:42:19 +0200
+
+ -- Dragan Dosen <ddosen@ffzg.hr>  Fri, 29 Apr 2011 15:51:33 +0200
index 1b41907..a5743b7 100644 (file)
@@ -1,3 +1,14 @@
+php5-cn (5.3.3+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.
+  * Azurirana debian/templates datoteka.
+
+ -- Dragan Dosen <ddosen@ffzg.hr>  Fri, 29 Apr 2011 15:51:33 +0200
+
 php5-cn (5.2.6-1) stable; urgency=low
 
   * Upgrade paketa za Debian lenny.
 php5-cn (5.2.6-1) stable; urgency=low
 
   * Upgrade paketa za Debian lenny.
@@ -20,7 +31,7 @@ php5-cn (5.2.0-7) stable; urgency=low
   * debian/control datoteka:
     + dodana ovisnost o findutils paketu.
 
   * debian/control datoteka:
     + dodana ovisnost o findutils paketu.
 
- -- Dragan Dosen <ddosen@ffzg.hr>  Web, 11 Feb 2009 20:13:35 +0100
+ -- Dragan Dosen <ddosen@ffzg.hr>  Wed, 11 Feb 2009 20:13:35 +0100
 
 php5-cn (5.2.0-6) stable; urgency=low
 
 
 php5-cn (5.2.0-6) stable; urgency=low
 
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 6fb49e5..51ba28c 100755 (executable)
@@ -10,11 +10,11 @@ if [ "$1" != reconfigure ]; then
     php5_done=1
 
     for SAPI in apache2 cli; do
     php5_done=1
 
     for SAPI in apache2 cli; do
-       db_fget php5-cn/${SAPI} seen
-       if [ "$RET" != "true" ]; then
-           php5_done=0
-           break
-       fi
+        db_fget php5-cn/${SAPI} seen
+        if [ "$RET" != "true" ]; then
+            php5_done=0
+            break
+        fi
     done
 
     test $php5_done -eq 1 && exit 0
     done
 
     test $php5_done -eq 1 && exit 0
@@ -49,51 +49,51 @@ for SAPI in apache2 cli; do
     upload_max_filesize=
     post_max_size=
     memory_limit=
     upload_max_filesize=
     post_max_size=
     memory_limit=
-    
+
     phplimit="$(phpmemlimit)M"
 
     if [ -f "$ini_file" ]; then
 
         if egrep -q "^[[:space:]]*(upload_max_filesize|post_max_size|memory_limit)[[:space:]]*=" $ini_file; then
 
     phplimit="$(phpmemlimit)M"
 
     if [ -f "$ini_file" ]; then
 
         if egrep -q "^[[:space:]]*(upload_max_filesize|post_max_size|memory_limit)[[:space:]]*=" $ini_file; then
 
-           upload_max_filesize=`awk '$1 == "upload_max_filesize" { print $3; exit(0) }' $ini_file`
-           post_max_size=`awk '$1 == "post_max_size" { print $3; exit(0) }' $ini_file`
-           memory_limit=`awk '$1 == "memory_limit" { print $3; exit(0) }' $ini_file`
-
-           if [ "$upload_max_filesize" != "256M" ]; then ini_diff=1; fi
-           if [ "$post_max_size" != "$phplimit" ]; then ini_diff=1; fi
-           if [ "$memory_limit" != "$phplimit" ]; then ini_diff=1; fi
-       else
-       
-           ini_diff=1
-       fi
+            upload_max_filesize=`awk '$1 == "upload_max_filesize" { print $3; exit(0) }' $ini_file`
+            post_max_size=`awk '$1 == "post_max_size" { print $3; exit(0) }' $ini_file`
+            memory_limit=`awk '$1 == "memory_limit" { print $3; exit(0) }' $ini_file`
+
+            if [ "$upload_max_filesize" != "256M" ]; then ini_diff=1; fi
+            if [ "$post_max_size" != "$phplimit" ]; then ini_diff=1; fi
+            if [ "$memory_limit" != "$phplimit" ]; then ini_diff=1; fi
+        else
+
+            ini_diff=1
+        fi
     else
     else
-    
-       ini_diff=1
+
+        ini_diff=1
     fi
     fi
-    
+
     if [ $ini_diff -eq 1 ]; then
 
     if [ $ini_diff -eq 1 ]; then
 
-       # Configurations are not the same - ask user what to do.
-       test -z "$upload_max_filesize" && upload_max_filesize="2M"
-       test -z "$post_max_size" && post_max_size="8M"
-       test -z "$memory_limit" && memory_limit="16M"
-       
-       db_title php5-cn - konfiguracija za $(echo ${SAPI} | sed 's/a/A/;s/cli/CLI/')
-       db_subst php5-cn/${SAPI} ini_file "$ini_file"
-
-       db_subst php5-cn/${SAPI} upload_max_filesize "$upload_max_filesize"
-       db_subst php5-cn/${SAPI} post_max_size "$post_max_size"
-       db_subst php5-cn/${SAPI} memory_limit "$memory_limit"
-       
-       db_subst php5-cn/${SAPI} new_phplimit "$phplimit"
-
-       db_input critical php5-cn/${SAPI} || true
-       db_go || true
+        # Configurations are not the same - ask user what to do.
+        test -z "$upload_max_filesize" && upload_max_filesize="2M"
+        test -z "$post_max_size" && post_max_size="8M"
+        test -z "$memory_limit" && memory_limit="16M"
+
+        db_title php5-cn - konfiguracija za $(echo ${SAPI} | sed 's/a/A/;s/cli/CLI/')
+        db_subst php5-cn/${SAPI} ini_file "$ini_file"
+
+        db_subst php5-cn/${SAPI} upload_max_filesize "$upload_max_filesize"
+        db_subst php5-cn/${SAPI} post_max_size "$post_max_size"
+        db_subst php5-cn/${SAPI} memory_limit "$memory_limit"
+
+        db_subst php5-cn/${SAPI} new_phplimit "$phplimit"
+
+        db_input critical php5-cn/${SAPI} || true
+        db_go || true
     else
     else
-    
-       db_set php5-cn/${SAPI} false || true
-       db_fset php5-cn/${SAPI} seen true
+
+        db_set php5-cn/${SAPI} false || true
+        db_fset php5-cn/${SAPI} seen true
     fi
 
 done
     fi
 
 done
index e2192b1..55c4016 100644 (file)
@@ -1,22 +1,23 @@
 Source: php5-cn
 Source: php5-cn
-Section: web
+Section: php
 Priority: optional
 Maintainer: Dragan Dosen <ddosen@ffzg.hr>
 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: php5-cn
 Architecture: all
 
 Package: php5-cn
 Architecture: all
-Pre-Depends: findutils
-Depends: libapache2-mod-php5 (>= 5.2.6.dfsg.1-1+lenny2), php5-cli (>= 5.2.6.dfsg.1-1+lenny2), php5-mysql (>= 5.2.6.dfsg.1-1+lenny2), carnet-tools-cn (>= 2.8.1), ${misc:Depends}
-Suggests: php-apc
+Pre-Depends: findutils (>= 4.4)
+Depends: libapache2-mod-php5 (>= 5.3.3-7+squeeze1), php5-cli (>= 5.3.3-7+squeeze1), php5-mysql (>= 5.3.3-7+squeeze1), carnet-tools-cn (>= 3.0.0), php-apc-cn (>= 3.1.3p1+1), php-suhosin-cn (>= 0.9.32.2), ${misc:Depends}
 Conflicts: php4-cn
 Conflicts: php4-cn
-Description: server-side, HTML-embedded scripting language (CARNet configuration)
- PHP5 is an HTML-embedded scripting language. Much of its syntax is borrowed
- from C, Java and Perl with a couple of unique PHP-specific features thrown
- in. The goal of the language is to allow web developers to write dynamically
- generated pages quickly.
+Description: server-side, HTML-embedded scripting language
+ PHP5 is a widely-used general-purpose scripting language that is
+ especially suited for Web development and can be embedded into HTML.
+ The goal of the language is to allow web developers to write
+ dynamically generated pages quickly. This version of PHP5 was built
+ with the Suhosin patch.
  .
  This package is a meta-package that contains additional CARNet configuration.
  Removing this package won't remove PHP5 from your system, however it may
  remove other packages that depend on this one.
  .
  This package is a meta-package that contains additional CARNet configuration.
  Removing this package won't remove PHP5 from your system, however it may
  remove other packages that depend on this one.
+Homepage: http://www.php.net/
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.
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644 (file)
index e69de29..0000000
index 24d27ef..8f6e250 100644 (file)
@@ -1,2 +1 @@
-debian/README.CARNet
-debian/changelog.CARNet
+README.CARNet
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
new file mode 100644 (file)
index 0000000..ece51d0
--- /dev/null
@@ -0,0 +1 @@
+php5-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..9e486ad
--- /dev/null
@@ -0,0 +1,145 @@
+# 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: php5-cn@packages.debian.org\n"
+"POT-Creation-Date: 2011-04-29 16:26+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
+#: ../templates:1001
+msgid "Zelite li aktivirati preporucene PHP5 postavke za Apache2?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"Provjerom trenutne PHP5 konfiguracije za Apache2 (konfiguracijska  datoteka "
+"${ini_file}), ustanovljeno je da su sljedece postavke aktivne:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#. Type: boolean
+#. Description
+#: ../templates:1001 ../templates:2001
+msgid ""
+" upload_max_filesize = ${upload_max_filesize}\n"
+" post_max_size = ${post_max_size}\n"
+" memory_limit = ${memory_limit}\n"
+"\n"
+"Preporucamo sljedece:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#. Type: boolean
+#. Description
+#: ../templates:1001 ../templates:2001
+msgid ""
+" upload_max_filesize = 256M\n"
+" post_max_size = ${new_phplimit}\n"
+" memory_limit = ${new_phplimit}"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Zelite li aktivirati preporucene PHP5 postavke za CLI?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"Provjerom trenutne PHP5 konfiguracije za CLI (PHP interpreter za komandnu "
+"liniju, konfiguracijska datoteka ${ini_file}),  ustanovljeno je da su "
+"sljedece postavke aktivne:"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:3001
+msgid "Postavke unutar PHP5 konfiguracije nisu ispravne"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:3001
+msgid ""
+"Provjerom trenutne PHP5 konfiguracije za ${php5_sapi} (konfiguracijska "
+"datoteka ${ini_file}), ustanovljeno je da sljedece postavke nisu ispravne:"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:3001
+msgid "${php5_inivalues}"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:3001
+msgid ""
+"Vrijednosti za navedene postavke ne smiju zavrsavati sa 'B'.  Dozvoljene "
+"oznake su 'K' (kilo), 'M' (mega) i 'G' (giga), npr. 16K, 32M, 1G.  U "
+"protivnom, kao mjerna jedinica koristit ce se 'byte'. Molimo, svakako "
+"provjerite postavke unutar navedene datoteke kako bi aplikacije (kao sto je "
+"Squirrelmail) mogle normalno funkcionirati."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:4001
+msgid "Neki dodaci (extensions) za PHP5 nisu ukljuceni"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:4001
+msgid ""
+"Iako je PHP4 uklonjen sa sustava, ostala je njegova konfiguracija.  "
+"Usporedbom trenutnih PHP4 i PHP5 konfiguracijskih datoteka, ustanovljeno je "
+"da sljedeci PHP5 dodaci (extensions) nisu ukljuceni, iako su ukljuceni za "
+"PHP4:"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:4001
+msgid "${php5_extensions}"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:4001
+msgid ""
+"Kako su neki od dodataka ukljuceni u PHP4 konfiguraciji, postoji mogucnost "
+"da pojedine aplikacije zahtjevaju odgovarajuce dodatke za PHP5.  Primjerice, "
+"ako je u PHP4 konfiguraciji bio ukljucen dodatak za LDAP (php4-ldap), tada "
+"je u PHP5 konfiguraciji potrebno ukljuciti PHP5 dodatak za LDAP (php5-"
+"ldap).  Molimo, svakako provjerite PHP5 postavke kako bi PHP aplikacije koje "
+"se koriste na posluzitelju mogle normalno funkcionirati."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:4001
+msgid ""
+"Ako za neke od navedenih dodataka ne postoji odgovarajuca inacica za PHP5 "
+"ili ste sigurni da neke od navedenih dodatka vise ne trebate, slobodno "
+"ignorirajte ovu poruku."
+msgstr ""
index 14b691b..f9a78dc 100755 (executable)
@@ -5,18 +5,18 @@ set -e
 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
 
 case "$1" in
 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
 
 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
 
 
 esac
 
 
@@ -62,24 +62,24 @@ phpinivalidate () {
     ini_file="$1"
 
     awk -F'[[:space:]]*=[[:space:]]*' \
     ini_file="$1"
 
     awk -F'[[:space:]]*=[[:space:]]*' \
-       '/^[[:space:]]*[[:alpha:]_]+[[:space:]]*=[[:space:]]*[[:digit:]]+[MGK]B/ {print $1" = "$2}' \
-       "$ini_file"
+        '/^[[:space:]]*[[:alpha:]_]+[[:space:]]*=[[:space:]]*[[:digit:]]+[MGK]B/ {print $1" = "$2}' \
+        "$ini_file"
 }
 
 
 # Disable PHP4 module and enable Apache2 PHP5 module.
 #
 if [ -e /etc/apache2/apache2.conf ]; then
 }
 
 
 # Disable PHP4 module and enable Apache2 PHP5 module.
 #
 if [ -e /etc/apache2/apache2.conf ]; then
-       if [ -e "$A2MODEDIR/php4.load" ]; then
-               cp_echo "CN: Disabling PHP4 module for Apache2 web server"
-               a2dismod php4 >/dev/null || true
-               need_restart=1
-       fi
-       if [ ! -e "$A2MODEDIR/php5.load" ] || [ ! -e "$A2MODEDIR/php5.conf" ]; then
-               cp_echo "CN: Enabling PHP5 module for Apache2 web server"
-               a2enmod php5 >/dev/null || true
-               need_restart=1
-       fi
+    if [ -e "$A2MODEDIR/php4.load" ]; then
+        cp_echo "CN: Disabling PHP4 module for Apache2 web server"
+        a2dismod php4 >/dev/null || true
+        need_restart=1
+    fi
+    if [ ! -e "$A2MODEDIR/php5.load" ] || [ ! -e "$A2MODEDIR/php5.conf" ]; then
+        cp_echo "CN: Enabling PHP5 module for Apache2 web server"
+        a2enmod php5 >/dev/null || true
+        need_restart=1
+    fi
 fi
 
 
 fi
 
 
@@ -87,39 +87,39 @@ fi
 #
 for SAPI in apache2 cli; do
 
 #
 for SAPI in apache2 cli; do
 
-        if [ ! -d "$PHP5DIR/$SAPI" ]; then
-                cp_echo "CN: Creating configuration directory $PHP5DIR/$SAPI/"
-                mkdir -p $PHP5DIR/$SAPI/
-        fi
+    if [ ! -d "$PHP5DIR/$SAPI" ]; then
+        cp_echo "CN: Creating configuration directory $PHP5DIR/$SAPI/"
+        mkdir -p $PHP5DIR/$SAPI/
+    fi
 
 
-        ini_file="$PHP5DIR/$SAPI/php.ini"
+    ini_file="$PHP5DIR/$SAPI/php.ini"
+
+    if [ ! -f "$ini_file" ]; then
 
 
-        if [ ! -f "$ini_file" ]; then
-
-                cp_echo "CN: Generating configuration file $ini_file"
-
-                ini_file_tmp=`mktemp $ini_file.tmp.XXXXXX`
-                if [ "$SAPI" = "cli" ]; then
-                    if [ -f "/usr/share/php5/php.ini-dist.cli" ]; then
-                        cat /usr/share/php5/php.ini-dist.cli > $ini_file_tmp
-                    fi
-                else
-                    if [ -f "/usr/share/php5/php.ini-dist" ]; then
-                        cat /usr/share/php5/php.ini-dist > $ini_file_tmp
-                    fi
-                fi
-                cp_mv $ini_file_tmp $ini_file
-                need_restart=1
+        cp_echo "CN: Generating configuration file $ini_file"
+
+        ini_file_tmp=`mktemp $ini_file.tmp.XXXXXX`
+        if [ "$SAPI" = "cli" ]; then
+            if [ -f "/usr/share/php5/php.ini-dist.cli" ]; then
+                cat /usr/share/php5/php.ini-dist.cli > $ini_file_tmp
+            fi
+        else
+            if [ -f "/usr/share/php5/php.ini-dist" ]; then
+                cat /usr/share/php5/php.ini-dist > $ini_file_tmp
+            fi
         fi
         fi
-       chmod 644 $ini_file
+        cp_mv $ini_file_tmp $ini_file
+        need_restart=1
+    fi
+    chmod 644 $ini_file
 done
 
 
 # Check for /etc/php5/conf.d/ directory.
 #
 if [ ! -d "$PHP5CONFD" ]; then
 done
 
 
 # Check for /etc/php5/conf.d/ directory.
 #
 if [ ! -d "$PHP5CONFD" ]; then
-        cp_echo "CN: Creating configuration directory $PHP5CONFD"
-        mkdir -p $PHP5CONFD/
+    cp_echo "CN: Creating configuration directory $PHP5CONFD"
+    mkdir -p $PHP5CONFD/
 fi
 
 
 fi
 
 
@@ -127,55 +127,55 @@ fi
 #
 for php5ext in $EXTENSIONS; do
 
 #
 for php5ext in $EXTENSIONS; do
 
-        php5ext_re="^[[:space:]]*extension[[:space:]]*=[[:space:]]*$php5ext\.so"
-
-       # Remove extension entry from /etc/php5/(apache2|cli).ini
-       # configuration files.
-        for SAPI in apache2 cli; do
-
-               ini_file="$PHP5DIR/$SAPI/php.ini"
-
-               if [ -f "$ini_file" ]; then
-
-                       if egrep -q "$php5ext_re" "$ini_file"; then
-                               cp_echo "CN: Removing $php5ext extension from file $ini_file"
-                       fi
-
-                       cp_check_and_sed "$php5ext_re" \
-                               "/$php5ext_re/d" \
-                               "$ini_file" && need_restart=1 || true
-               fi
-        done
-
-       # Check extension configuration in /etc/php5/conf.d/ directory.
-       if [ ! -f "$PHP5CONFD/$php5ext.ini" ]; then
-
-               cp_echo "CN: Creating configuration file $PHP5CONFD/$php5ext.ini"
-               
-               php5ext_up=`echo $php5ext | tr [:lower:] [:upper:] | sed 's/Y/y/'`
-               INITMP=`mktemp $PHP5CONFD/$php5ext.ini.tmp.XXXXXX`
-
-               cp_echo "CN: Adding $php5ext extension to file $PHP5CONFD/$php5ext.ini"
-               
-               printf "# configuration for php %s module\nextension=%s.so\n" "${php5ext_up}" "${php5ext}" >> "$INITMP"
-               cp_mv "$INITMP" "$PHP5CONFD/$php5ext.ini"
-               
-               need_restart=1
-       else
-
-               if ! grep -q "$php5ext_re" "$PHP5CONFD/$php5ext.ini"; then
-
-                       cp_echo "CN: Adding $php5ext extension to file $PHP5CONFD/$php5ext.ini"
-                       
-                       INITMP=`mktemp $PHP5CONFD/$php5ext.ini.tmp.XXXXXX`
-                       cat "$PHP5CONFD/$php5ext.ini" > "$INITMP"
-                       echo "extension=$php5ext.so" >> "$INITMP"
-                       cp_mv "$INITMP" "$PHP5CONFD/$php5ext.ini"
-                       
-                       need_restart=1
-               fi
-       fi
-       chmod 644 $PHP5CONFD/$php5ext.ini
+    php5ext_re="^[[:space:]]*extension[[:space:]]*=[[:space:]]*$php5ext\.so"
+
+    # Remove extension entry from /etc/php5/(apache2|cli).ini
+    # configuration files.
+    for SAPI in apache2 cli; do
+
+        ini_file="$PHP5DIR/$SAPI/php.ini"
+
+        if [ -f "$ini_file" ]; then
+
+            if egrep -q "$php5ext_re" "$ini_file"; then
+                cp_echo "CN: Removing $php5ext extension from file $ini_file"
+            fi
+
+            cp_check_and_sed "$php5ext_re" \
+                "/$php5ext_re/d" \
+                "$ini_file" && need_restart=1 || true
+        fi
+    done
+
+    # Check extension configuration in /etc/php5/conf.d/ directory.
+    if [ ! -f "$PHP5CONFD/$php5ext.ini" ]; then
+
+        cp_echo "CN: Creating configuration file $PHP5CONFD/$php5ext.ini"
+
+        php5ext_up=`echo $php5ext | tr [:lower:] [:upper:] | sed 's/Y/y/'`
+        INITMP=`mktemp $PHP5CONFD/$php5ext.ini.tmp.XXXXXX`
+
+        cp_echo "CN: Adding $php5ext extension to file $PHP5CONFD/$php5ext.ini"
+
+        printf "# configuration for php %s module\nextension=%s.so\n" "${php5ext_up}" "${php5ext}" >> "$INITMP"
+        cp_mv "$INITMP" "$PHP5CONFD/$php5ext.ini"
+
+        need_restart=1
+    else
+
+        if ! grep -q "$php5ext_re" "$PHP5CONFD/$php5ext.ini"; then
+
+            cp_echo "CN: Adding $php5ext extension to file $PHP5CONFD/$php5ext.ini"
+
+            INITMP=`mktemp $PHP5CONFD/$php5ext.ini.tmp.XXXXXX`
+            cat "$PHP5CONFD/$php5ext.ini" > "$INITMP"
+            echo "extension=$php5ext.so" >> "$INITMP"
+            cp_mv "$INITMP" "$PHP5CONFD/$php5ext.ini"
+
+            need_restart=1
+        fi
+    fi
+    chmod 644 $PHP5CONFD/$php5ext.ini
 done
 
 
 done
 
 
@@ -187,111 +187,111 @@ done
 #
 for SAPI in apache2 cli; do
 
 #
 for SAPI in apache2 cli; do
 
-       if [ ! -d "$PHP5DIR/$SAPI" ]; then
-               continue
-       fi
-
-       ini_file="$PHP5DIR/$SAPI/php.ini"
-       db_get php5-cn/${SAPI} || true
-       if [ "$RET" = "true" ]; then
-
-           cp_echo "CN: Checking and enabling some specific parameters in file $ini_file"
-           
-           phplimit="$(phpmemlimit)M"
-       
-           if [ -f "$ini_file" ]; then
-
-               cp_check_and_sed "^[[:space:]]*upload_max_filesize[[:space:]]*=" \
-                       's/^[[:space:]]*upload_max_filesize[[:space:]]*=.*/upload_max_filesize = 256M/' \
-                       "$ini_file" && need_restart=1 || true
-
-               cp_check_and_sed "^[[:space:]]*post_max_size[[:space:]]*=" \
-                       "s/^[[:space:]]*post_max_size[[:space:]]*=.*/post_max_size = ${phplimit}/" \
-                       "$ini_file" && need_restart=1 || true
-
-               cp_check_and_sed "^[[:space:]]*memory_limit[[:space:]]*=" \
-                       "s/^[[:space:]]*memory_limit[[:space:]]*=.*/memory_limit = ${phplimit}/" \
-                       "$ini_file" && need_restart=1 || true
-           fi
-               
-           ini_file_tmp=`mktemp $ini_file.tmp.XXXXXX`
-           if [ -f "$ini_file" ]; then
-               cat $ini_file > $ini_file_tmp
-           fi
-
-           if ! egrep -q "^[[:space:]]*upload_max_filesize[[:space:]]*=" $ini_file_tmp; then
-               echo "upload_max_filesize = 256M" >> "$ini_file_tmp"
-               need_restart=1
-           fi
-           if ! egrep -q "^[[:space:]]*post_max_size[[:space:]]*=" $ini_file_tmp; then
-               echo "post_max_size = ${phplimit}" >> "$ini_file_tmp"
-               need_restart=1
-           fi
-           if ! egrep -q "^[[:space:]]*memory_limit[[:space:]]*=" $ini_file_tmp; then
-               echo "memory_limit = ${phplimit}" >> "$ini_file_tmp"
-               need_restart=1
-           fi
-           cp_mv "$ini_file_tmp" "$ini_file"
-           chmod 644 "$ini_file"
-
-           if [ -e "$ini_file_tmp" ]; then
-               rm -f "$ini_file_tmp"
-           fi
-       fi
-
-       # Validate php.ini values.
-       if [ -f "$ini_file" ]; then
-               php5_inivalues="$(phpinivalidate "$ini_file")"
-               if [ -n "$php5_inivalues" ]; then
-                       db_fset php5-cn/inivalues seen false
-                       db_title php5-cn - konfiguracija za $(echo ${SAPI} | sed 's/a/A/;s/cli/CLI/')
-                       db_subst php5-cn/inivalues php5_sapi $(echo ${SAPI} | sed 's/a/A/;s/cli/CLI/')
-                       db_subst php5-cn/inivalues ini_file "$ini_file"
-                       db_capb escape
-                       db_subst php5-cn/inivalues php5_inivalues "$(echo -n "$php5_inivalues" | debconf-escape -e)"
-                       db_input critical php5-cn/inivalues || true
-                       db_go || true
-               fi
-       fi
-done
+    if [ ! -d "$PHP5DIR/$SAPI" ]; then
+        continue
+    fi
 
 
+    ini_file="$PHP5DIR/$SAPI/php.ini"
+    db_get php5-cn/${SAPI} || true
+    if [ "$RET" = "true" ]; then
 
 
-# Compare active PHP5 extensions with PHP4 ones, if PHP4 configuration still exists.
-#
-if [ -d "${PHP4DIR}" ] && [ -f "${PHP4DIR}/apache2/php.ini" ]; then
+        cp_echo "CN: Checking and enabling some specific parameters in file $ini_file"
+
+        phplimit="$(phpmemlimit)M"
 
 
-        phpext_re='^[[:space:]]*extension[[:space:]]*=[[:space:]]*["]{0,1}(.*)\.so["]{0,1}'
+        if [ -f "$ini_file" ]; then
 
 
-        # Get all active PHP4 extensions.
-        php4_ext="$(find ${PHP4DIR} -type f -name *.ini | 
-                 egrep "\/(conf\.d|apache2|cli)\/" | 
-                 xargs sed -rn 's/'$phpext_re'/\1/Ip')" || true
+            cp_check_and_sed "^[[:space:]]*upload_max_filesize[[:space:]]*=" \
+                's/^[[:space:]]*upload_max_filesize[[:space:]]*=.*/upload_max_filesize = 256M/' \
+                "$ini_file" && need_restart=1 || true
 
 
-        # Get all active PHP5 extensions.
-        php5_ext=""
-        if [ -d "${PHP5DIR}" ]; then
-            php5_ext="$(find ${PHP5DIR} -type f -name *.ini | 
-                     egrep "\/(conf\.d|apache2|cli)\/" | 
-                     xargs sed -rn 's/'$phpext_re'/\1/Ip')" || true
+            cp_check_and_sed "^[[:space:]]*post_max_size[[:space:]]*=" \
+                "s/^[[:space:]]*post_max_size[[:space:]]*=.*/post_max_size = ${phplimit}/" \
+                "$ini_file" && need_restart=1 || true
+
+            cp_check_and_sed "^[[:space:]]*memory_limit[[:space:]]*=" \
+                "s/^[[:space:]]*memory_limit[[:space:]]*=.*/memory_limit = ${phplimit}/" \
+                "$ini_file" && need_restart=1 || true
         fi
 
         fi
 
-        # Compare PHP5 <-> PHP4 extensions.
-        php5_ext_mis=""
-        for ext in $php4_ext; do
-            if [ "$(echo $php5_ext | egrep $ext)" = "" ]; then
-                php5_ext_mis="\n${ext}${php5_ext_mis}"
-            fi
-        done
+        ini_file_tmp=`mktemp $ini_file.tmp.XXXXXX`
+        if [ -f "$ini_file" ]; then
+            cat $ini_file > $ini_file_tmp
+        fi
+
+        if ! egrep -q "^[[:space:]]*upload_max_filesize[[:space:]]*=" $ini_file_tmp; then
+            echo "upload_max_filesize = 256M" >> "$ini_file_tmp"
+            need_restart=1
+        fi
+        if ! egrep -q "^[[:space:]]*post_max_size[[:space:]]*=" $ini_file_tmp; then
+            echo "post_max_size = ${phplimit}" >> "$ini_file_tmp"
+            need_restart=1
+        fi
+        if ! egrep -q "^[[:space:]]*memory_limit[[:space:]]*=" $ini_file_tmp; then
+            echo "memory_limit = ${phplimit}" >> "$ini_file_tmp"
+            need_restart=1
+        fi
+        cp_mv "$ini_file_tmp" "$ini_file"
+        chmod 644 "$ini_file"
 
 
-        # Some PHP5 extensions are not active.
-        if [ -n "$php5_ext_mis" ]; then
-            db_fset php5-cn/extensions seen false
-            db_title php5-cn - konfiguracija
+        if [ -e "$ini_file_tmp" ]; then
+            rm -f "$ini_file_tmp"
+        fi
+    fi
+
+    # Validate php.ini values.
+    if [ -f "$ini_file" ]; then
+        php5_inivalues="$(phpinivalidate "$ini_file")"
+        if [ -n "$php5_inivalues" ]; then
+            db_fset php5-cn/inivalues seen false
+            db_title php5-cn - konfiguracija za $(echo ${SAPI} | sed 's/a/A/;s/cli/CLI/')
+            db_subst php5-cn/inivalues php5_sapi $(echo ${SAPI} | sed 's/a/A/;s/cli/CLI/')
+            db_subst php5-cn/inivalues ini_file "$ini_file"
             db_capb escape
             db_capb escape
-            db_subst php5-cn/extensions php5_extensions "${php5_ext_mis#*\n}"
-            db_input critical php5-cn/extensions || true
+            db_subst php5-cn/inivalues php5_inivalues "$(echo -n "$php5_inivalues" | debconf-escape -e)"
+            db_input critical php5-cn/inivalues || true
             db_go || true
         fi
             db_go || true
         fi
+    fi
+done
+
+
+# Compare active PHP5 extensions with PHP4 ones, if PHP4 configuration still exists.
+#
+if [ -d "${PHP4DIR}" ] && [ -f "${PHP4DIR}/apache2/php.ini" ]; then
+
+    phpext_re='^[[:space:]]*extension[[:space:]]*=[[:space:]]*["]{0,1}(.*)\.so["]{0,1}'
+
+    # Get all active PHP4 extensions.
+    php4_ext="$(find ${PHP4DIR} -type f -name *.ini | 
+         egrep "\/(conf\.d|apache2|cli)\/" | 
+         xargs sed -rn 's/'$phpext_re'/\1/Ip')" || true
+
+    # Get all active PHP5 extensions.
+    php5_ext=""
+    if [ -d "${PHP5DIR}" ]; then
+        php5_ext="$(find ${PHP5DIR} -type f -name *.ini | 
+             egrep "\/(conf\.d|apache2|cli)\/" | 
+             xargs sed -rn 's/'$phpext_re'/\1/Ip')" || true
+    fi
+
+    # Compare PHP5 <-> PHP4 extensions.
+    php5_ext_mis=""
+    for ext in $php4_ext; do
+        if [ "$(echo $php5_ext | egrep $ext)" = "" ]; then
+            php5_ext_mis="\n${ext}${php5_ext_mis}"
+        fi
+    done
+
+    # Some PHP5 extensions are not active.
+    if [ -n "$php5_ext_mis" ]; then
+        db_fset php5-cn/extensions seen false
+        db_title php5-cn - konfiguracija
+        db_capb escape
+        db_subst php5-cn/extensions php5_extensions "${php5_ext_mis#*\n}"
+        db_input critical php5-cn/extensions || true
+        db_go || true
+    fi
 fi
 
 
 fi
 
 
@@ -301,24 +301,15 @@ db_stop || true
 # Restart Apache2 web server if needed.
 #
 if [ $need_restart -eq 1 ]; then
 # Restart Apache2 web server if needed.
 #
 if [ $need_restart -eq 1 ]; then
-       
-       # Check Apache2 web server configuration.
-       if /usr/sbin/apache2ctl configtest 2>/dev/null; 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 || true
-                   else
-                       /etc/init.d/apache2 restart || true
-                   fi
-               fi
-       else
-       
-               # Something is broken.
-               cp_echo "CN: Your Apache2 configuration is broken."
-               cp_echo "CN: Please, check the service after the installation finishes!"
-       fi
+
+    # Check Apache2 web server configuration.
+    if apache2ctl configtest 2>/dev/null; then
+        invoke-rc.d apache2 force-reload || true
+    else
+        # Something is broken.
+        cp_echo "CN: Your Apache2 configuration is broken."
+        cp_echo "CN: Please, check the service after the installation finishes!"
+    fi
 fi
 
 
 fi
 
 
@@ -326,4 +317,6 @@ fi
 #
 cp_mail "$PKG"
 
 #
 cp_mail "$PKG"
 
+#DEBHELPER#
+
 exit 0
 exit 0
index 6da000b..b7ec504 100755 (executable)
@@ -2,9 +2,6 @@
 
 set -e
 
 
 set -e
 
-if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
-        . /usr/share/debconf/confmodule
-        db_purge
-fi
+#DEBHELPER#
 
 exit 0
 
 exit 0
index e7f422a..cbe925d 100755 (executable)
@@ -1,68 +1,3 @@
 #!/usr/bin/make -f
 #!/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 ff3419f..c628cb7 100644 (file)
@@ -1,6 +1,6 @@
 Template: php5-cn/apache2
 Type: boolean
 Template: php5-cn/apache2
 Type: boolean
-Description: Zelite li aktivirati preporucene PHP5 postavke za Apache2?
+_Description: Zelite li aktivirati preporucene PHP5 postavke za Apache2?
  Provjerom trenutne PHP5 konfiguracije za Apache2 (konfiguracijska 
  datoteka ${ini_file}), ustanovljeno je da su sljedece postavke aktivne:
  .
  Provjerom trenutne PHP5 konfiguracije za Apache2 (konfiguracijska 
  datoteka ${ini_file}), ustanovljeno je da su sljedece postavke aktivne:
  .
@@ -16,7 +16,7 @@ Description: Zelite li aktivirati preporucene PHP5 postavke za Apache2?
 
 Template: php5-cn/cli
 Type: boolean
 
 Template: php5-cn/cli
 Type: boolean
-Description: Zelite li aktivirati preporucene PHP5 postavke za CLI?
+_Description: Zelite li aktivirati preporucene PHP5 postavke za CLI?
  Provjerom trenutne PHP5 konfiguracije za CLI (PHP interpreter
  za komandnu liniju, konfiguracijska datoteka ${ini_file}), 
  ustanovljeno je da su sljedece postavke aktivne:
  Provjerom trenutne PHP5 konfiguracije za CLI (PHP interpreter
  za komandnu liniju, konfiguracijska datoteka ${ini_file}), 
  ustanovljeno je da su sljedece postavke aktivne:
@@ -33,7 +33,7 @@ Description: Zelite li aktivirati preporucene PHP5 postavke za CLI?
 
 Template: php5-cn/inivalues
 Type: note
 
 Template: php5-cn/inivalues
 Type: note
-Description: Postavke unutar PHP5 konfiguracije nisu ispravne.
+_Description: Postavke unutar PHP5 konfiguracije nisu ispravne
  Provjerom trenutne PHP5 konfiguracije za ${php5_sapi} (konfiguracijska
  datoteka ${ini_file}), ustanovljeno je da sljedece postavke nisu ispravne:
  .
  Provjerom trenutne PHP5 konfiguracije za ${php5_sapi} (konfiguracijska
  datoteka ${ini_file}), ustanovljeno je da sljedece postavke nisu ispravne:
  .
@@ -47,7 +47,7 @@ Description: Postavke unutar PHP5 konfiguracije nisu ispravne.
 
 Template: php5-cn/extensions
 Type: note
 
 Template: php5-cn/extensions
 Type: note
-Description: Neki dodaci (extensions) za PHP5 nisu ukljuceni.
+_Description: Neki dodaci (extensions) za PHP5 nisu ukljuceni
  Iako je PHP4 uklonjen sa sustava, ostala je njegova konfiguracija.  Usporedbom
  trenutnih PHP4 i PHP5 konfiguracijskih datoteka, ustanovljeno je da sljedeci
  PHP5 dodaci (extensions) nisu ukljuceni, iako su ukljuceni za PHP4:
  Iako je PHP4 uklonjen sa sustava, ostala je njegova konfiguracija.  Usporedbom
  trenutnih PHP4 i PHP5 konfiguracijskih datoteka, ustanovljeno je da sljedeci
  PHP5 dodaci (extensions) nisu ukljuceni, iako su ukljuceni za PHP4: