diff --git a/.cvsignore b/.cvsignore index e69de29..62e9623 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +imagick-2.2.1.tgz diff --git a/imagick.ini b/imagick.ini new file mode 100644 index 0000000..eac7fc3 --- /dev/null +++ b/imagick.ini @@ -0,0 +1,2 @@ +; Enable imagick extension module +extension=imagick.so diff --git a/import.log b/import.log new file mode 100644 index 0000000..3ed4056 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +php-pecl-imagick-2_2_1-3_fc9:F-10:php-pecl-imagick-2.2.1-3.fc9.src.rpm:1233611555 diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec new file mode 100644 index 0000000..6bfeccf --- /dev/null +++ b/php-pecl-imagick.spec @@ -0,0 +1,130 @@ +%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) +%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}} +%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}} + +%define peclName imagick + +Summary: Provides a wrapper to the ImageMagick library +Name: php-pecl-%peclName +Version: 2.2.1 +Release: 3%{?dist} +License: PHP +Group: Development/Libraries +Source0: http://pecl.php.net/get/%peclName-%{version}.tgz +Source1: %peclName.ini +BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) +URL: http://pecl.php.net/package/%peclName +BuildRequires: php-pear >= 1.4.7 +BuildRequires: php-devel >= 5.1.3, ImageMagick-devel >= 6.2.4 +Requires(post): %{__pecl} +Requires(postun): %{__pecl} +%if %{?php_zend_api}0 +Requires: php(zend-abi) = %{php_zend_api} +Requires: php(api) = %{php_core_api} +%else +Requires: php-api = %{php_apiver} +%endif +Provides: php-pecl(%peclName) = %{version} + +%description +%peclName is a native php extension to create and modify images using the +ImageMagick API. +This extension requires ImageMagick version 6.2.4+ and PHP 5.1.3+. + +IMPORTANT: Version 2.x API is not compatible with earlier versions. + +%prep +%setup -qc + +%build +cd %peclName-%{version} +phpize +%{configure} --with-%peclName +%{__make} + +%install +rm -rf %{buildroot} + +cd %peclName-%{version} + +%{__make} install \ + INSTALL_ROOT=%{buildroot} + +# Install XML package description +install -m 0755 -d %{buildroot}%{pecl_xmldir} +install -m 0664 ../package.xml %{buildroot}%{pecl_xmldir}/%peclName.xml +install -d %{buildroot}%{_sysconfdir}/php.d/ +install -m 0664 %{SOURCE1} %{buildroot}%{_sysconfdir}/php.d/%peclName.ini + +%clean +rm -rf %{buildroot} + +%post +%if 0%{?pecl_install:1} +%{pecl_install} %{pecl_xmldir}/%peclName.xml +%endif + +%postun +%if 0%{?pecl_uninstall:1} +if [ "$1" -eq "0" ]; then + %{pecl_uninstall} %peclName +fi +%endif + +%files +%defattr(-,root,root,-) +%doc %peclName-%{version}/examples %peclName-%{version}/{CREDITS,TODO,INSTALL} +%{_libdir}/php/modules/%peclName.so +%{pecl_xmldir}/%peclName.xml +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.d/%peclName.ini + +%changelog +* Sun Jan 11 2009 Pavel Alexeev - 2.2.1-3 +- All modifications in this release inspired by Fedora review by Remi Collet. +- Add versions to BR for php-devel and ImageMagick-devel +- Remove -n option from %%setup which was excessive with -c +- Module install/uninstall actions surround with %%if 0%{?pecl_(un)?install:1} ... %%endif +- Add Provides: php-pecl(%peclName) = %{version} + +* Sat Jan 3 2009 Pavel Alexeev - 2.2.1-2 +- License changed to PHP (thanks to Remi Collet) +- Add -c flag to %%setup (Remi Collet) + And accordingly it "cd %%peclName-%%{version}" in %%build and %%install steps. +- Add (from php-pear template) + Requires(post): %%{__pecl} + Requires(postun): %%{__pecl} +- Borrow from Remi Collet php-api/abi requirements. +- Use macroses: (Remi Collet) + %%pecl_install instead of direct "pear install --soft --nobuild --register-only" + %%pecl_uninstall instead of pear "uninstall --nodeps --ignore-errors --register-only" +- %%doc examples/{polygon.php,captcha.php,thumbnail.php,watermark.php} replaced by %%doc examples (Remi Collet) +- Change few patchs to macroses: (Remi Collet) + %%{_libdir}/php/modules - replaced by %%{php_extdir} + %%{xmldir} - by %%{pecl_xmldir} +- Remove defines of xmldir, peardir. +- Add 3 recommended macroses from doc http://fedoraproject.org/wiki/Packaging/PHP : php_apiver, __pecl, php_extdir + +* Sat Dec 20 2008 Pavel Alexeev - 2.2.1-1 +- Step to version 2.2.1 +- As prepare to push it into Fedora: + - Change release to 1%%{?dist} + - Set setup quiet + - Escape all %% in changelog section + - Delete dot from summary + - License change from real "PHP License" to BSD (by example with php-peck-phar and php-pecl-xdebug) +- %%defattr(-,root,root,-) changed to %%defattr(-,root,root,-) + +* Mon May 12 2008 Pavel Alexeev - 2.2.0b2-0.Hu.0 +- Step to version 2.2.0b2 +- %%define peclName imagick and replece to it all direct appearances. + +* Thu Mar 6 2008 Pavel Alexeev - 2.1.1RC1-0.Hu.0 +- Steep to version 2.1.1RC1 -0.Hu.0 +- Add Hu-part and %%{?dist} into Release +- Add BuildRequires: ImageMagick-devel + +* Fri Oct 12 2007 Pavel Alexeev - 2.0.0RC1 +- Global rename from php-pear-imagick to php-pecl-imagick. This is more correct. + +* Wed Aug 22 2007 Pavel Alexeev - 2.0.0RC1 +- Initial release. (Re)Written from generated (pecl make-rpm-spec) diff --git a/sources b/sources index e69de29..1fef7e6 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c205ff5e38ca88aad01e74ea8d0e3816 imagick-2.2.1.tgz