[Pkg-php-commits] [php/debian-sid] Add support for UCF Registry

Ondřej Surý ondrej at sury.org
Wed May 4 15:15:54 UTC 2011


---
 debian/libapache2-mod-php5.postinst       |    1 +
 debian/libapache2-mod-php5filter.postinst |    1 +
 debian/php5-cgi.postinst                  |    1 +
 debian/php5-cli.postinst                  |    1 +
 debian/php5-fpm.postinst                  |    1 +
 debian/php5-sapi.postrm                   |    3 +++
 debian/rules                              |   14 ++++++++++----
 7 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/debian/libapache2-mod-php5.postinst b/debian/libapache2-mod-php5.postinst
index b236de5..e12a918 100644
--- a/debian/libapache2-mod-php5.postinst
+++ b/debian/libapache2-mod-php5.postinst
@@ -24,6 +24,7 @@ fi
 phpini="/etc/php5/apache2/php.ini"
 
 ucf /usr/share/php5/php.ini-production $phpini
+ucfr libapache2-mod-php5 $phpini
 
 if [ -n "$2" ]; then
 	# recover the previous state
diff --git a/debian/libapache2-mod-php5filter.postinst b/debian/libapache2-mod-php5filter.postinst
index 234c557..8c861bd 100644
--- a/debian/libapache2-mod-php5filter.postinst
+++ b/debian/libapache2-mod-php5filter.postinst
@@ -24,6 +24,7 @@ fi
 phpini="/etc/php5/apache2filter/php.ini"
 
 ucf /usr/share/php5/php.ini-production $phpini
+ucfr libapache2-mod-php5filter $phpini
 
 if [ -n "$2" ]; then
 	# recover the previous state
diff --git a/debian/php5-cgi.postinst b/debian/php5-cgi.postinst
index f0d5fb6..a4369aa 100644
--- a/debian/php5-cgi.postinst
+++ b/debian/php5-cgi.postinst
@@ -11,6 +11,7 @@ fi
 phpini="/etc/php5/cgi/php.ini"
 
 ucf /usr/share/php5/php.ini-production $phpini
+ucfr php5-cgi $phpini
 
 update-alternatives \
         --install /usr/bin/php-cgi php-cgi /usr/bin/php5-cgi 50 \
diff --git a/debian/php5-cli.postinst b/debian/php5-cli.postinst
index 82ef956..3288946 100644
--- a/debian/php5-cli.postinst
+++ b/debian/php5-cli.postinst
@@ -11,6 +11,7 @@ fi
 phpini="/etc/php5/cli/php.ini"
 
 ucf /usr/share/php5/php.ini-production.cli $phpini
+ucfr php5-cli $phpini
 
 update-alternatives \
 	--install /usr/bin/php php /usr/bin/php5 50 \
diff --git a/debian/php5-fpm.postinst b/debian/php5-fpm.postinst
index 3c06910..22028f1 100644
--- a/debian/php5-fpm.postinst
+++ b/debian/php5-fpm.postinst
@@ -13,5 +13,6 @@ fi
 phpini="/etc/php5/fpm/php.ini"
 
 ucf /usr/share/php5/php.ini-production $phpini
+ucfr php5-fpm $phpini
 
 exit 0
diff --git a/debian/php5-sapi.postrm b/debian/php5-sapi.postrm
index 5fd7449..02c74f9 100644
--- a/debian/php5-sapi.postrm
+++ b/debian/php5-sapi.postrm
@@ -17,6 +17,9 @@ purge)
 	if which ucf >/dev/null; then
 	    ucf --purge $phpini
 	fi
+	if which ucfr >/dev/null; then
+	    ucfr --purge @package@ $phpini
+	fi
 	;;
 esac
 
diff --git a/debian/rules b/debian/rules
index 96f6cd8..fd0d82b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -641,13 +641,19 @@ binary-arch: build install
 
 	# likewise, for the different sapi implementations
 	for tmpl in postrm links; do \
-		for sapi in apache2 apache2filter cgi cli fpm; do \
-			sed -e "s/@sapi@/$$sapi/g" \
+		for sapi in cgi cli fpm; do \
+			sed -e "s/@sapi@/$$sapi/g;s/@package@/php5-$${sapi}/g" \
 		  	< debian/php5-sapi.$$tmpl \
 		  	> debian/php5-$${sapi}.$$tmpl; \
 		done; \
-		mv debian/php5-apache2.$$tmpl debian/libapache2-mod-php5.$$tmpl; \
-		mv debian/php5-apache2filter.$$tmpl debian/libapache2-mod-php5filter.$$tmpl; \
+	done
+	for tmpl in postrm links; do \
+		sed -e "s/@sapi@/apache2/g;s/@package@/libapache2-mod-php5/g" \
+		  < debian/php5-sapi.$$tmpl \
+		  > debian/libapache2-mod-php5.$$tmpl; \
+		sed -e "s/@sapi@/apache2filter/g;s/@package@/libapache2-mod-php5filter/g" \
+		  < debian/php5-sapi.$$tmpl \
+		  > debian/libapache2-mod-php5filter.$$tmpl; \
 	done
 
 	sed -i -e 's/exit 0/dpkg-maintscript-helper mv_conffile \/etc\/php5\/fpm\/main.conf \/etc\/php5\/fpm\/php-fpm.conf 5.3.5-1 -- \"\$\@\"\n\nexit 0/' debian/php5-fpm.postrm
-- 
1.7.1





More information about the Pkg-php-commits mailing list