%undefine with_filter
%endif
-%define rel 14
+%define rel 13
%define orgname php
%define ver_suffix 54
%define php_suffix %{!?with_default_php:%{ver_suffix}}
# install Embedded API
%if %{with embed}
+%{__make} -f Makefile.embed install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
# we could use install-headers from Makefile.embed, but that would reinstall all headers
-# install-sapi installs to wrong dir, so just do it all manually
install -d $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed
-install -p libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}
cp -p sapi/embed/php_embed.h $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed
%endif
# fix install paths, avoid evil rpaths
sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common.la
+%if %{with embed}
+# libphp5.la contains our buildroot in dependency_libs
+sed -i -e "/dependency_libs/ s,/[^ ]*/libs/libphp_common.la,%{_libdir}/libphp_common.la," $RPM_BUILD_ROOT%{_libdir}/libphp5.la
+%endif
# better solution?
sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/acinclude.m4
%if %{with embed}
%files embedded
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libphp5.so
+%attr(755,root,root) %{_libdir}/libphp5-%{version}.so
%endif
%files cli
%{_libdir}/%{name}/build
%{_mandir}/man1/php-config.1*
%{_mandir}/man1/phpize.1*
+%if %{with embed}
+# embedded
+%{_libdir}/libphp5.so
+%{_libdir}/libphp5.la
+%endif
%files bcmath
%defattr(644,root,root,755)