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