]> 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:39 +0000 (12:17 +0200)
php.spec

index 7fe36d14d837d99554cf01501432628e01ae8a11..441df914032e1e2c7672c7be39177a18df45fd52 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -2826,6 +2826,10 @@ done
 %triggerpostun common -- %{name}-common < 4:5.6.4-2, php-common < 4:5.6.4-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.058658 seconds and 4 git commands to generate.