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

index a82138abebbea86bceb4bb301d9b330d3b191ba7..766aa43c71c0865ea89019e7e0f12c1288a1b84e 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -2602,6 +2602,10 @@ fi
 %triggerpostun common -- %{name}-common < 4:5.4.36-2, php-common < 4:5.4.36-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.122449 seconds and 4 git commands to generate.