1 %define _modname imagick
3 %define _sysconfdir /etc/php
4 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
5 Summary: PHP wrapper to the Image Magick Library
6 Summary(pl): PHP-owy wrapper do biblioteki Image Magick
7 Name: php-pecl-%{_modname}
11 Group: Development/Languages/PHP
12 Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5: c8f78b063eb3fbdef1c8501190983c89
14 URL: http://pecl.php.net/package/imagick/
15 BuildRequires: ImageMagick-devel >= 1:6.2.4.0
16 BuildRequires: php-devel >= 3:5.0.0
17 BuildRequires: rpmbuild(macros) >= 1.254
18 %{?requires_php_extension}
19 Requires: %{_sysconfdir}/conf.d
20 Obsoletes: php-imagick
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 ImageMagick is a robust collection of tools and libraries to read,
25 write, and manipulate an image in many image formats (over 68 major
26 formats) including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD,
27 and GIF. With ImageMagick you can create images dynamically, making it
28 suitable for Web applications. You can also resize, rotate, sharpen,
29 color reduce, or add special effects to an image and save your
30 completed work in the same or differing image format.
32 In PECL status of this package is: %{_status}.
35 ImageMagick to du¿y zestaw narzêdzi i bibliotek do odczytu, zapisu i
36 modyfikowania obrazków w wielu formatach (ponad 68 g³ównych), w tym
37 popularnych, takich jak TIFF, JPEG, PNG, PDF, PhotoCD i GIF. Za pomoc±
38 ImageMagick mo¿na dynamicznie tworzyæ obrazki, co jest przydatne w
39 aplikacjach WWW. Mo¿na je tak¿e przeskalowywaæ, obracaæ, wyostrzaæ,
40 zmniejszaæ ilo¶æ kolorów - w tym samym lub innym formacie.
42 To rozszerzenie ma w PECL status: %{_status}.
48 cd %{_modname}-%{version}
53 CFLAGS_CLEAN="%{rpmcflags}"
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
59 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
60 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
61 ; Enable %{_modname} extension module
62 extension=%{_modname}.so
66 rm -rf $RPM_BUILD_ROOT
69 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
70 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
74 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
75 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
78 %triggerpostun -- %{name} < 0.9.11-2.1
79 %{_sbindir}/php-module-install remove %{_modname} %{_sysconfdir}/php.ini
82 %defattr(644,root,root,755)
83 %doc %{_modname}-%{version}/examples/{*.php,*.jpg,*.gif}
84 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
85 %attr(755,root,root) %{extensionsdir}/%{_modname}.so