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