[SCM] mapserver branch, master, updated. upstream/6.4.0_rc1-146-g142405c

Bas Couwenberg sebastic at xs4all.nl
Thu Sep 19 18:38:13 UTC 2013


The following commit has been merged in the master branch:
commit dbce0992429345a57b64d5ab826ab72f0df1c2d3
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Sep 19 20:35:11 2013 +0200

    Use php5enmod and php5dismod instead of installing the ini directly.

diff --git a/debian/changelog b/debian/changelog
index 990ed1a..e9dc433 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ mapserver (6.4.0-2) UNRELEASED; urgency=low
 
   * Also include mapserver-config.h and mapserver-version.h in dev package.
     Required to build MapCache with MapServer support.
+  * Use php5enmod and php5dismod instead of installing the ini directly.
+    (closes: #667771)
 
  -- Bas Couwenberg <sebastic at xs4all.nl>  Thu, 19 Sep 2013 19:52:12 +0200
 
diff --git a/debian/mapscript.ini b/debian/mapscript.ini
new file mode 100644
index 0000000..30dc0b6
--- /dev/null
+++ b/debian/mapscript.ini
@@ -0,0 +1 @@
+extension=php_mapscript.so
diff --git a/debian/php5-mapscript.config b/debian/php5-mapscript.config
deleted file mode 100644
index fb41e9d..0000000
--- a/debian/php5-mapscript.config
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# Source debconf library.
-. /usr/share/debconf/confmodule
-
-db_title "PHP"
-
-phpver=php5
-
-for SAPI in apache apache2
-do
-	# Skip this loop if the config file isn't there (yet).
-	if [ -f "/etc/$phpver/$SAPI/php.ini" ]; then
-		db_register $phpver-mapscript/add_extension $phpver/extension_mapscript_$SAPI
-
-		# FIXME: this is the wrong answer if the SAPI package was
-		# installed after the module was.
-		if [ -n "$2" ] && dpkg --compare-versions "$2" ge 4:4.3.2+rc3-2
-		then
-			if [ -f "/etc/$phpver/$SAPI/conf.d/mapscript.ini" ]; then
-				db_set $phpver/extension_mapscript_$SAPI true
-			else
-				db_set $phpver/extension_mapscript_$SAPI false
-			fi
-		fi
-
-		db_subst $phpver/extension_mapscript_$SAPI extname Mapscript 
-		db_subst $phpver/extension_mapscript_$SAPI sapiconfig $SAPI
-		db_input low $phpver/extension_mapscript_$SAPI || true
-	fi
-done
-
-db_go
diff --git a/debian/php5-mapscript.postinst b/debian/php5-mapscript.postinst
index ed61a7a..d25d7de 100644
--- a/debian/php5-mapscript.postinst
+++ b/debian/php5-mapscript.postinst
@@ -7,20 +7,8 @@ set -e
 
 #DEBHELPER#
 
-if [ "$1" != "configure" ]; then
-	exit 0
+if [ "$1" = "configure" ]; then
+	php5enmod mapscript
 fi
 
-phpver=php5
-
-for SAPI in apache apache2
-do
-	if [ -f /etc/$phpver/$SAPI/php.ini ] && [ -e /etc/$phpver/$SAPI/conf.d ]; then
-		db_get $phpver/extension_mapscript_$SAPI
-		if [ "$RET" = "true" -a ! -f /etc/$phpver/$SAPI/conf.d/mapscript.ini ]; then
-			echo "extension=php_mapscript.so" > /etc/$phpver/$SAPI/conf.d/mapscript.ini
-		fi
-	fi
-done
-
 exit 0
diff --git a/debian/php5-mapscript.prerm b/debian/php5-mapscript.prerm
index 0ac0201..01192c9 100644
--- a/debian/php5-mapscript.prerm
+++ b/debian/php5-mapscript.prerm
@@ -4,32 +4,8 @@ set -e
 
 #DEBHELPER#
 
-if [ "$1" != "remove" ] && [ "$1" != "purge" ]; then
-	exit 0
+if [ "$1" = "remove" ]; then
+	php5dismod mapscript
 fi
 
-. /usr/share/debconf/confmodule
-
-phpver=php5
-
-for SAPI in `find /etc/$phpver/ -type d -maxdepth 1 -mindepth 1 | sed -e's#.*/##'`
-do
-	# Use the same question for all extensions, because it's only
-	# used once per package: right here.
-	if [ -f "/etc/$phpver/$SAPI/php.ini" -a  -f /etc/$phpver/$SAPI/conf.d/mapscript.ini ]; then
-		db_set $phpver-mapscript/remove_extension true
-		db_title "PHP"
-		db_subst $phpver-mapscript/remove_extension extname Mapscript
-		db_subst $phpver-mapscript/remove_extension sapiconfig $SAPI
-		db_input low $phpver-mapscript/remove_extension || true
-		db_go
-
-		db_get $phpver-mapscript/remove_extension
-		if [ "$RET" = "true" ]; then
-	        rm -f /etc/$phpver/$SAPI/conf.d/mapscript.ini
-		fi
-		db_fset $phpver-mapscript/remove_extension seen false
-	fi
-done
-
 exit 0
diff --git a/debian/php5-mapscript.templates b/debian/php5-mapscript.templates
deleted file mode 100644
index 9e4a80e..0000000
--- a/debian/php5-mapscript.templates
+++ /dev/null
@@ -1,15 +0,0 @@
-Template: php5-mapscript/add_extension
-Type: boolean
-Default: true
-_Description: Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?
- You are installing ${extname} support for php5 and it is not yet
- enabled in the configuration for the ${sapiconfig} SAPI. Enabling
- this extension will allow php5 scripts to use it.
-
-Template: php5-mapscript/remove_extension
-Type: boolean
-Default: true
-_Description: Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?
- You are removing ${extname} support for php5, but it is still enabled
- in the configuration for the ${sapiconfig} SAPI.  Leaving this in place
- will probably cause problems when trying to use PHP.
diff --git a/debian/rules b/debian/rules
index a6c28c6..495195b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -123,7 +123,9 @@ override_dh_auto_install:
 	-mkdir -p debian/tmp/usr/lib/cgi-bin
 	install -m755 debian/tmp/usr/bin/mapserv debian/tmp/usr/lib/cgi-bin/mapserv
 
+	# PHP mapscript
 	echo 'misc:Depends=phpapi-'$(PHP5API) >> debian/php5-mapscript.substvars
+	install -m755 debian/mapscript.ini /etc/php5/mods-available/
 
 	# libmapserver-dev headers
 	-mkdir -p debian/tmp/usr/include/mapserver/

-- 
Packaging for MapServer



More information about the Pkg-grass-devel mailing list