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

index 16e7b61a824d6e47d28af9e6a3c603fb224e4207..1f7ca889aad798ff9b2f96f21faebec0589f15d9 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -2767,6 +2767,10 @@ done
 %triggerpostun common -- %{name}-common < 4:5.3.29-7, php-common < 4:5.3.29-7
 # 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.404507 seconds and 4 git commands to generate.