]> git.pld-linux.org Git - packages/php.git/commitdiff
browscap trigger: disable browscap if file it points to does not exist
authorElan Ruusamäe <glen@delfi.ee>
Thu, 19 Feb 2015 10:16:42 +0000 (12:16 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 19 Feb 2015 10:17:06 +0000 (12:17 +0200)
php.spec

index f4dbd3b7b6ac3ba18f7c0eb71c92ef925f33d6fd..63c4863e09f1671719352a6e0479ffec7e910e59 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -2744,6 +2744,10 @@ done
 %triggerpostun common -- %{name}-common < 4:5.5.20-2, php-common < 4:5.5.20-2
 # switch to browscap package if the ini file has original value
 %{__sed} -i -e 's#%{_sysconfdir}/browscap.ini#/usr/share/browscap/php_browscap.ini#' %{_sysconfdir}/php.ini
+# disable browscap, if optional package not present
+if [ ! -e /usr/share/browscap/php_browscap.ini ]; then
+       %{__sed} -i -e 's#^browscap = /usr/share/browscap/php_browscap.ini#;&#' %{_sysconfdir}/php.ini
+fi
 
 # common macros called at extension post/postun scriptlet
 %define        extension_scripts() \
This page took 0.044821 seconds and 4 git commands to generate.