]> git.pld-linux.org Git - packages/php-pecl-imagick.git/blob - php-pecl-imagick.spec
- rel 12 (php 5.2.0)
[packages/php-pecl-imagick.git] / php-pecl-imagick.spec
1 %define         _modname        imagick
2 %define         _status         beta
3 %define         _sysconfdir     /etc/php
4 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
5 Summary:        PHP wrapper to the Image Magick Library
6 Summary(pl):    PHP-owy wrapper do biblioteki Image Magick
7 Name:           php-pecl-%{_modname}
8 Version:        0.9.11
9 Release:        12
10 License:        PHP 2.02
11 Group:          Development/Languages/PHP
12 Source0:        http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5:  c8f78b063eb3fbdef1c8501190983c89
14 URL:            http://pecl.php.net/package/imagick/
15 BuildRequires:  ImageMagick-devel >= 1:6.2.4.0
16 BuildRequires:  php-devel >= 3:5.0.0
17 BuildRequires:  rpmbuild(macros) >= 1.322
18 %{?requires_php_extension}
19 Requires(triggerpostun):        sed >= 4.0
20 Requires:       %{_sysconfdir}/conf.d
21 Provides:       php(imagick)
22 Obsoletes:      php-imagick
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 ImageMagick is a robust collection of tools and libraries to read,
27 write, and manipulate an image in many image formats (over 68 major
28 formats) including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD,
29 and GIF. With ImageMagick you can create images dynamically, making it
30 suitable for Web applications. You can also resize, rotate, sharpen,
31 color reduce, or add special effects to an image and save your
32 completed work in the same or differing image format.
33
34 In PECL status of this package is: %{_status}.
35
36 %description -l pl
37 ImageMagick to du¿y zestaw narzêdzi i bibliotek do odczytu, zapisu i
38 modyfikowania obrazków w wielu formatach (ponad 68 g³ównych), w tym
39 popularnych, takich jak TIFF, JPEG, PNG, PDF, PhotoCD i GIF. Za pomoc±
40 ImageMagick mo¿na dynamicznie tworzyæ obrazki, co jest przydatne w
41 aplikacjach WWW. Mo¿na je tak¿e przeskalowywaæ, obracaæ, wyostrzaæ,
42 zmniejszaæ ilo¶æ kolorów - w tym samym lub innym formacie.
43
44 To rozszerzenie ma w PECL status: %{_status}.
45
46 %prep
47 %setup -q -c
48
49 %build
50 cd %{_modname}-%{version}
51 phpize
52 %configure
53
54 %{__make} \
55         CFLAGS_CLEAN="%{rpmcflags}"
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
60
61 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
62 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
63 ; Enable %{_modname} extension module
64 extension=%{_modname}.so
65 EOF
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
72 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
73
74 %postun
75 if [ "$1" = 0 ]; then
76         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
77         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
78 fi
79
80 %triggerpostun -- %{name} < 0.9.11-2.1
81 %{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*%{_modname}\.so/d' %{_sysconfdir}/php.ini
82
83 %files
84 %defattr(644,root,root,755)
85 %doc %{_modname}-%{version}/examples/{*.php,*.jpg,*.gif}
86 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
87 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.045761 seconds and 4 git commands to generate.