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