3 %bcond_without tests # build without tests
5 %define php_name php%{?php_suffix}
6 %define modname imagick
10 Summary: %{modname} - PHP wrapper to the Image Magick Library
11 Summary(pl.UTF-8): %{modname} - PHP-owy wrapper do biblioteki Image Magick
12 Name: %{php_name}-pecl-%{modname}
14 Release: 0.%{pre}.%{rel}
16 Group: Development/Languages/PHP
17 Source0: http://pecl.php.net/get/%{modname}-%{version}%{pre}.tgz
18 # Source0-md5: 32042fc3043f013047927de21ff15a47
19 Patch0: skip_version_check.patch
20 URL: http://pecl.php.net/package/imagick/
21 BuildRequires: %{php_name}-devel >= 4:5.3
22 BuildRequires: ImageMagick-devel >= 1:6.2.4.0
23 BuildRequires: pkgconfig
25 BuildRequires: rpmbuild(macros) >= 1.650
27 BuildRequires: %{php_name}-cli
28 BuildRequires: %{php_name}-pcre
29 BuildRequires: %{php_name}-spl
30 BuildRequires: ImageMagick-coder-jpeg
31 BuildRequires: ImageMagick-coder-png
32 BuildRequires: ImageMagick-coder-tiff
34 %{?requires_php_extension}
35 Requires(triggerpostun): sed >= 4.0
36 Requires: %{php_name}-spl
37 Suggests: ImageMagick-coder-jpeg
38 Suggests: ImageMagick-coder-png
39 Suggests: ImageMagick-coder-tiff
40 Provides: php(imagick) = %{version}
41 Obsoletes: php-pecl-imagick < 3.1.2-2
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 ImageMagick is a robust collection of tools and libraries to read,
46 write, and manipulate an image in many image formats (over 68 major
47 formats) including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD,
48 and GIF. With ImageMagick you can create images dynamically, making it
49 suitable for Web applications. You can also resize, rotate, sharpen,
50 color reduce, or add special effects to an image and save your
51 completed work in the same or differing image format.
53 In PECL status of this package is: %{status}.
55 %description -l pl.UTF-8
56 ImageMagick to duży zestaw narzędzi i bibliotek do odczytu, zapisu i
57 modyfikowania obrazków w wielu formatach (ponad 68 głównych), w tym
58 popularnych, takich jak TIFF, JPEG, PNG, PDF, PhotoCD i GIF. Za pomocą
59 ImageMagick można dynamicznie tworzyć obrazki, co jest przydatne w
60 aplikacjach WWW. Można je także przeskalowywać, obracać, wyostrzać,
61 zmniejszać ilość kolorów - w tym samym lub innym formacie.
63 To rozszerzenie ma w PECL status: %{status}.
67 mv %{modname}-%{version}%{pre}/* .
80 t=$nf; t=${t#\[}; t=${t%\]}
84 Test Imagick, annotateImage [tests/034_Imagick_annotateImage_basic.phpt]
85 Test ImagickDraw, composite [tests/177_ImagickDraw_composite_basic.phpt]
86 Test ImagickDraw, setFontSize [tests/206_ImagickDraw_setFontSize_basic.phpt]
87 Test ImagickDraw, setFontFamily [tests/207_ImagickDraw_setFontFamily_basic.phpt]
88 Test ImagickDraw, setFontStretch [tests/208_ImagickDraw_setFontStretch_basic.phpt]
89 Test ImagickDraw, setFontWeight [tests/209_ImagickDraw_setFontWeight_basic.phpt]
90 Test ImagickDraw, setFontStyle [tests/210_ImagickDraw_setFontStyle_basic.phpt]
91 Test ImagickDraw, setGravity [tests/212_ImagickDraw_setGravity_basic.phpt]
92 Test ImagickDraw, setTextAlignment [tests/222_ImagickDraw_setTextAlignment_basic.phpt]
93 Test ImagickDraw, setTextAntialias [tests/223_ImagickDraw_setTextAntialias_basic.phpt]
94 Test ImagickDraw, setTextUnderColor [tests/224_ImagickDraw_setTextUnderColor_basic.phpt]
95 Test ImagickDraw, setTextDecoration [tests/225_ImagickDraw_setTextDecoration_basic.phpt]
96 Test Tutorial, psychedelicFont [tests/241_Tutorial_psychedelicFont_basic.phpt]
97 Test Tutorial, svgExample [tests/243_Tutorial_svgExample_basic.phpt]
98 Test Tutorial, psychedelicFontGif [tests/244_Tutorial_psychedelicFontGif_basic.phpt]
99 Test Imagick, Imagick::exportImagePixels [tests/256_Imagick_exportImagePixels_basic.phpt]
100 Test ImagickDraw, getTextDirection [tests/264_ImagickDraw_getTextDirection_basic.phpt]
101 Test ImagickDraw, getFontResolution [tests/266_ImagickDraw_getFontResolution_basic.phpt]
104 Test Imagick, quantizeImage [tests/101_Imagick_quantizeImage_basic.phpt]
105 Test Imagick, uniqueImageColors [tests/163_Imagick_uniqueImageColors_basic.phpt]
106 Test Tutorial, deconstructGif [tests/237_Tutorial_deconstructGif_basic.phpt]
107 Test ImagickPixelIterator, setIteratorRow [tests/251_ImagickPixelIterator_setIteratorRow_basic.phpt]
113 php_cv_cc_dashr=false
116 CFLAGS_CLEAN="%{rpmcflags}"
120 -d extension_dir=modules \
121 -d extension=%{php_extensiondir}/pcre.so \
122 -d extension=%{php_extensiondir}/spl.so \
123 -d extension=%{modname}.so \
125 grep %{modname} modules.log
127 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
129 PHP_EXECUTABLE=%{__php} \
130 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="pcre spl" \
134 rm -rf $RPM_BUILD_ROOT
135 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}}
136 install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
137 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
138 ; Enable %{modname} extension module
139 extension=%{modname}.so
141 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
144 rm -rf $RPM_BUILD_ROOT
147 %php_webserver_restart
150 if [ "$1" = 0 ]; then
151 %php_webserver_restart
154 %triggerpostun -- %{name} < 0.9.11-2.1
155 %{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*%{modname}\.so/d' %{php_sysconfdir}/php.ini
158 %defattr(644,root,root,755)
160 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
161 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
162 %{_examplesdir}/%{name}-%{version}