1 |
%define realname Imagick |
2 |
%define modname imagick |
3 |
%define dirname %{modname} |
4 |
%define soname %{modname}.so |
5 |
%define inifile 55_%{modname}.ini |
6 |
%define mod_src %{modname}.c |
7 |
|
8 |
%define build_test 1 |
9 |
|
10 |
Summary: Provides a wrapper to the ImageMagick library for PHP |
11 |
Name: php-%{modname} |
12 |
Epoch: 2 |
13 |
Version: 3.4.3 |
14 |
Release: %mkrel 2 |
15 |
Group: Development/PHP |
16 |
License: PHP License |
17 |
URL: http://pecl.php.net/package/imagick |
18 |
Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz |
19 |
BuildRequires: php-devel >= 3:5.2.0 |
20 |
BuildRequires: imagemagick-devel >= 6.3.8 |
21 |
Requires: imagemagick >= 6.3.8 |
22 |
Requires: php |
23 |
|
24 |
%description |
25 |
Imagick is a native php extension to create and modify images using the |
26 |
ImageMagick API. |
27 |
|
28 |
imagick is a native php-extension. See the examples in the |
29 |
%{_docdir}/%{name}/examples directory for some hints on |
30 |
how to use it. |
31 |
|
32 |
%prep |
33 |
|
34 |
%setup -q -n imagick-%{version} |
35 |
[ "../package.xml" != "/" ] && mv -f ../package.xml . |
36 |
|
37 |
# lib64 fixes |
38 |
perl -pi -e "s|/lib\b|/%{_lib}|g" config.m4 |
39 |
|
40 |
%build |
41 |
%serverbuild |
42 |
|
43 |
phpize |
44 |
%configure2_5x --with-libdir=%{_lib} \ |
45 |
--with-%{modname}=shared,%{_prefix} |
46 |
|
47 |
%make_build |
48 |
mv modules/*.so . |
49 |
|
50 |
%install |
51 |
install -d %{buildroot}%{_libdir}/php/extensions |
52 |
install -d %{buildroot}%{_sysconfdir}/php.d |
53 |
|
54 |
install -m0755 %{soname} %{buildroot}%{_libdir}/php/extensions/ |
55 |
|
56 |
cat > README.%{modname} <<EOF |
57 |
The %{name} package contains a dynamic shared object (DSO) for PHP. |
58 |
To activate it, make sure a file /etc/php.d/%{inifile} is present and |
59 |
contains the line 'extension = %{soname}'. |
60 |
EOF |
61 |
|
62 |
cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF |
63 |
extension = %{soname} |
64 |
|
65 |
[imagick] |
66 |
imagick.locale_fix = 0 |
67 |
EOF |
68 |
|
69 |
|
70 |
%files |
71 |
%doc examples ChangeLog CREDITS LICENSE |
72 |
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} |
73 |
%attr(0755,root,root) %{_libdir}/php/extensions/%{soname} |