+%triggerpostun common -- php-common < 4:5.3.28-7
+# migrate configs /etc/php/conf.d -> /etc/phpXY/conf.d/
+# do config migration in php-common trigger, as the trigger is ran after all packages are upgraded
+# this way we can stick to one trigger, instead of attaching one for each (sub)package!
+for f in /etc/php/*.ini.rpmsave /etc/php/*.d/*.ini.rpmsave; do
+ test -f "$f" || continue
+ bn=${f#/etc/php/}
+ dn=${bn%/*}
+ fn=${bn#*/}
+ test "$dn" = "$fn" && dn=
+ fn=${fn%.rpmsave}
+ nf=%{_sysconfdir}/$dn/$fn
+ test -f "$nf" || continue
+ cp -vf $nf{,.rpmnew}
+ mv -vf $f $nf
+ %{__sed} -i -e '
+ s#%{_libdir}/php#%{_libdir}/%{name}#
+ s#/etc/php#%{_sysconfdir}#
+ ' $nf
+done
+