/[packages]/backports/8/php-imagick/current/SPECS/php-imagick.spec
ViewVC logotype

Contents of /backports/8/php-imagick/current/SPECS/php-imagick.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 185314 - (show annotations) (download)
Wed Dec 21 05:05:02 2011 UTC (12 years, 4 months ago) by spuhler
Original Path: cauldron/php-imagick/current/SPECS/php-imagick.spec
File size: 2093 byte(s)
rebuild against php-5.3.9
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.0.1
11 Release: %mkrel 7
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}.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: 1
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}
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 rm -rf %{buildroot}
51
52 install -d %{buildroot}%{_libdir}/php/extensions
53 install -d %{buildroot}%{_sysconfdir}/php.d
54
55 install -m0755 %{soname} %{buildroot}%{_libdir}/php/extensions/
56
57 cat > README.%{modname} <<EOF
58 The %{name} package contains a dynamic shared object (DSO) for PHP.
59 To activate it, make sure a file /etc/php.d/%{inifile} is present and
60 contains the line 'extension = %{soname}'.
61 EOF
62
63 cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF
64 extension = %{soname}
65
66 [imagick]
67 imagick.locale_fix = 0
68 EOF
69
70 %post
71 if [ -f /var/lock/subsys/httpd ]; then
72 %{_initrddir}/httpd restart >/dev/null || :
73 fi
74
75 %postun
76 if [ "$1" = "0" ]; then
77 if [ -f /var/lock/subsys/httpd ]; then
78 %{_initrddir}/httpd restart >/dev/null || :
79 fi
80 fi
81
82 %clean
83 rm -rf %{buildroot}
84
85 %files
86 %defattr(-,root,root)
87 %doc examples CREDITS INSTALL README*
88 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile}
89 %attr(0755,root,root) %{_libdir}/php/extensions/%{soname}

  ViewVC Help
Powered by ViewVC 1.1.30