]> git.pld-linux.org Git - packages/php-pecl-imagick.git/blob - php-pecl-imagick.spec
run tests
[packages/php-pecl-imagick.git] / php-pecl-imagick.spec
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
8 Summary:        %{modname} - PHP wrapper to the Image Magick Library
9 Summary(pl.UTF-8):      %{modname} - PHP-owy wrapper do biblioteki Image Magick
10 Name:           %{php_name}-pecl-%{modname}
11 Version:        3.4.2
12 Release:        3
13 License:        PHP 3.01
14 Group:          Development/Languages/PHP
15 Source0:        http://pecl.php.net/get/%{modname}-%{version}.tgz
16 # Source0-md5:  3f80e35c2434636cdb5df01b221b3ffa
17 Patch0:         skip_version_check.patch
18 URL:            http://pecl.php.net/package/imagick/
19 BuildRequires:  %{php_name}-devel >= 4:5.3
20 BuildRequires:  ImageMagick-devel >= 1:6.2.4.0
21 BuildRequires:  rpmbuild(macros) >= 1.650
22 %if %{with tests}
23 BuildRequires:  %{php_name}-cli
24 BuildRequires:  %{php_name}-spl
25 %endif
26 %{?requires_php_extension}
27 Requires(triggerpostun):        sed >= 4.0
28 Requires:       %{php_name}-spl
29 Suggests:       ImageMagick-coder-jpeg
30 Suggests:       ImageMagick-coder-png
31 Suggests:       ImageMagick-coder-tiff
32 Provides:       php(imagick) = %{version}
33 Obsoletes:      php-pecl-imagick < 3.1.2-2
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 ImageMagick is a robust collection of tools and libraries to read,
38 write, and manipulate an image in many image formats (over 68 major
39 formats) including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD,
40 and GIF. With ImageMagick you can create images dynamically, making it
41 suitable for Web applications. You can also resize, rotate, sharpen,
42 color reduce, or add special effects to an image and save your
43 completed work in the same or differing image format.
44
45 In PECL status of this package is: %{status}.
46
47 %description -l pl.UTF-8
48 ImageMagick to duży zestaw narzędzi i bibliotek do odczytu, zapisu i
49 modyfikowania obrazków w wielu formatach (ponad 68 głównych), w tym
50 popularnych, takich jak TIFF, JPEG, PNG, PDF, PhotoCD i GIF. Za pomocą
51 ImageMagick można dynamicznie tworzyć obrazki, co jest przydatne w
52 aplikacjach WWW. Można je także przeskalowywać, obracać, wyostrzać,
53 zmniejszać ilość kolorów - w tym samym lub innym formacie.
54
55 To rozszerzenie ma w PECL status: %{status}.
56
57 %prep
58 %setup -qc
59 mv %{modname}-%{version}/* .
60 %patch0 -p1
61
62 %build
63 phpize
64 %configure \
65         php_cv_cc_dashr=false
66
67 %{__make} \
68         CFLAGS_CLEAN="%{rpmcflags}"
69
70 %if %{with tests}
71 %{__php} -n -q \
72         -d extension_dir=modules \
73         -d extension=%{php_extensiondir}/spl.so \
74         -d extension=%{modname}.so \
75         -m > modules.log
76 grep %{modname} modules.log
77
78 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
79 %{__make} test \
80         PHP_EXECUTABLE=%{__php} \
81         PHP_TEST_SHARED_SYSTEM_EXTENSIONS="spl" \
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}}
87 install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
88 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
89 ; Enable %{modname} extension module
90 extension=%{modname}.so
91 EOF
92 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %post
98 %php_webserver_restart
99
100 %postun
101 if [ "$1" = 0 ]; then
102         %php_webserver_restart
103 fi
104
105 %triggerpostun -- %{name} < 0.9.11-2.1
106 %{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*%{modname}\.so/d' %{php_sysconfdir}/php.ini
107
108 %files
109 %defattr(644,root,root,755)
110 %doc CREDITS
111 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
112 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
113 %{_examplesdir}/%{name}-%{version}
This page took 0.093477 seconds and 3 git commands to generate.