]> git.pld-linux.org Git - packages/php-pecl-imagick.git/blame_incremental - php-pecl-imagick.spec
up to 3.4.3
[packages/php-pecl-imagick.git] / php-pecl-imagick.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5%define php_name php%{?php_suffix}
6%define modname imagick
7%define status stable
8Summary: %{modname} - PHP wrapper to the Image Magick Library
9Summary(pl.UTF-8): %{modname} - PHP-owy wrapper do biblioteki Image Magick
10Name: %{php_name}-pecl-%{modname}
11Version: 3.4.3
12Release: 1
13License: PHP 3.01
14Group: Development/Languages/PHP
15Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
16# Source0-md5: d0ee25c007cd2a28cefccc0b9ee63a28
17Patch0: skip_version_check.patch
18URL: http://pecl.php.net/package/imagick/
19BuildRequires: %{php_name}-devel >= 4:5.3
20BuildRequires: ImageMagick-devel >= 1:6.2.4.0
21BuildRequires: pkgconfig
22BuildRequires: re2c
23BuildRequires: rpmbuild(macros) >= 1.650
24%if %{with tests}
25BuildRequires: %{php_name}-cli
26BuildRequires: %{php_name}-pcre
27BuildRequires: %{php_name}-spl
28BuildRequires: ImageMagick-coder-jpeg
29BuildRequires: ImageMagick-coder-png
30BuildRequires: ImageMagick-coder-tiff
31%endif
32%{?requires_php_extension}
33Requires(triggerpostun): sed >= 4.0
34Requires: %{php_name}-spl
35Suggests: ImageMagick-coder-jpeg
36Suggests: ImageMagick-coder-png
37Suggests: ImageMagick-coder-tiff
38Provides: php(imagick) = %{version}
39Obsoletes: php-pecl-imagick < 3.1.2-2
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43ImageMagick is a robust collection of tools and libraries to read,
44write, and manipulate an image in many image formats (over 68 major
45formats) including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD,
46and GIF. With ImageMagick you can create images dynamically, making it
47suitable for Web applications. You can also resize, rotate, sharpen,
48color reduce, or add special effects to an image and save your
49completed work in the same or differing image format.
50
51In PECL status of this package is: %{status}.
52
53%description -l pl.UTF-8
54ImageMagick to duży zestaw narzędzi i bibliotek do odczytu, zapisu i
55modyfikowania obrazków w wielu formatach (ponad 68 głównych), w tym
56popularnych, takich jak TIFF, JPEG, PNG, PDF, PhotoCD i GIF. Za pomocą
57ImageMagick można dynamicznie tworzyć obrazki, co jest przydatne w
58aplikacjach WWW. Można je także przeskalowywać, obracać, wyostrzać,
59zmniejszać ilość kolorów - w tym samym lub innym formacie.
60
61To rozszerzenie ma w PECL status: %{status}.
62
63%prep
64%setup -qc
65mv %{modname}-%{version}/* .
66%patch0 -p1
67
68xfail() {
69 t=$1
70 cat >> $t <<-EOF
71
72 --XFAIL--
73 Skip
74 EOF
75}
76Test() {
77 nf=$(eval echo \$$#)
78 t=$nf; t=${t#\[}; t=${t%\]}
79 xfail $t
80}
81# skip failing tests
82Test Imagick, annotateImage [tests/034_Imagick_annotateImage_basic.phpt]
83Test ImagickDraw, composite [tests/177_ImagickDraw_composite_basic.phpt]
84Test ImagickDraw, setFontSize [tests/206_ImagickDraw_setFontSize_basic.phpt]
85Test ImagickDraw, setFontFamily [tests/207_ImagickDraw_setFontFamily_basic.phpt]
86Test ImagickDraw, setFontStretch [tests/208_ImagickDraw_setFontStretch_basic.phpt]
87Test ImagickDraw, setFontWeight [tests/209_ImagickDraw_setFontWeight_basic.phpt]
88Test ImagickDraw, setFontStyle [tests/210_ImagickDraw_setFontStyle_basic.phpt]
89Test ImagickDraw, setGravity [tests/212_ImagickDraw_setGravity_basic.phpt]
90Test ImagickDraw, setTextAlignment [tests/222_ImagickDraw_setTextAlignment_basic.phpt]
91Test ImagickDraw, setTextAntialias [tests/223_ImagickDraw_setTextAntialias_basic.phpt]
92Test ImagickDraw, setTextUnderColor [tests/224_ImagickDraw_setTextUnderColor_basic.phpt]
93Test ImagickDraw, setTextDecoration [tests/225_ImagickDraw_setTextDecoration_basic.phpt]
94Test Tutorial, psychedelicFont [tests/241_Tutorial_psychedelicFont_basic.phpt]
95Test Tutorial, svgExample [tests/243_Tutorial_svgExample_basic.phpt]
96Test Tutorial, psychedelicFontGif [tests/244_Tutorial_psychedelicFontGif_basic.phpt]
97Test Imagick, Imagick::exportImagePixels [tests/256_Imagick_exportImagePixels_basic.phpt]
98Test ImagickDraw, getTextDirection [tests/264_ImagickDraw_getTextDirection_basic.phpt]
99Test ImagickDraw, getFontResolution [tests/266_ImagickDraw_getFontResolution_basic.phpt]
100%ifarch x32
101# Fail on 7.0
102Test Imagick, quantizeImage [tests/101_Imagick_quantizeImage_basic.phpt]
103Test Imagick, uniqueImageColors [tests/163_Imagick_uniqueImageColors_basic.phpt]
104Test Tutorial, deconstructGif [tests/237_Tutorial_deconstructGif_basic.phpt]
105Test ImagickPixelIterator, setIteratorRow [tests/251_ImagickPixelIterator_setIteratorRow_basic.phpt]
106%endif
107
108%build
109phpize
110%configure \
111 php_cv_cc_dashr=false
112
113%{__make} \
114 CFLAGS_CLEAN="%{rpmcflags}"
115
116%if %{with tests}
117%{__php} -n -q \
118 -d extension_dir=modules \
119 -d extension=%{php_extensiondir}/pcre.so \
120 -d extension=%{php_extensiondir}/spl.so \
121 -d extension=%{modname}.so \
122 -m > modules.log
123grep %{modname} modules.log
124
125export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
126%{__make} test \
127 PHP_EXECUTABLE=%{__php} \
128 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="pcre spl" \
129%endif
130
131%install
132rm -rf $RPM_BUILD_ROOT
133install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}}
134install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
135cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
136; Enable %{modname} extension module
137extension=%{modname}.so
138EOF
139cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
140
141%clean
142rm -rf $RPM_BUILD_ROOT
143
144%post
145%php_webserver_restart
146
147%postun
148if [ "$1" = 0 ]; then
149 %php_webserver_restart
150fi
151
152%triggerpostun -- %{name} < 0.9.11-2.1
153%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*%{modname}\.so/d' %{php_sysconfdir}/php.ini
154
155%files
156%defattr(644,root,root,755)
157%doc CREDITS
158%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
159%attr(755,root,root) %{php_extensiondir}/%{modname}.so
160%{_examplesdir}/%{name}-%{version}
This page took 0.028914 seconds and 4 git commands to generate.