%define realname Imagick %define modname imagick %define soname %{modname}.so %define inifile 55_%{modname}.ini %define mod_src %{modname}.c %define build_test 1 Summary: Provides a wrapper to the ImageMagick library for PHP Name: php-%{modname} Epoch: 2 Version: 3.4.4 Release: %mkrel 10 Group: Development/PHP License: PHP License URL: http://pecl.php.net/package/imagick Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz BuildRequires: php-devel >= 3:7.0.0 BuildRequires: imagemagick-devel >= 6.3.8 Recommends: imagemagick >= 6.3.8 Requires: php >= 3:7.4.0 Requires: php-common = 3:7.4 %description Imagick is a native php extension to create and modify images using the ImageMagick API. imagick is a native php-extension. See the examples in the %{_docdir}/%{name}/examples directory for some hints on how to use it. %prep %setup -q -n imagick-%{version} [ "../package.xml" != "/" ] && mv -f ../package.xml . # lib64 fixes perl -pi -e "s|/lib\b|/%{_lib}|g" config.m4 %build %serverbuild phpize %configure --with-libdir=%{_lib} \ --with-%{modname}=shared,%{_prefix} %make_build mv modules/*.so . %install install -d %{buildroot}%{_libdir}/php/extensions install -d %{buildroot}%{_sysconfdir}/php.d install -m0755 %{soname} %{buildroot}%{_libdir}/php/extensions/ cat > README.%{modname} < %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF extension = %{soname} [imagick] imagick.locale_fix = 0 EOF %files %doc examples ChangeLog CREDITS LICENSE %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/%{soname}