]> git.pld-linux.org Git - packages/php-pecl-imagick.git/blob - php-pecl-imagick.spec
f7460317e15bb86f70cbc18d030b2a6bee072181
[packages/php-pecl-imagick.git] / php-pecl-imagick.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define         php_name        php%{?php_suffix}
6 %define         modname         imagick
7 %define         status          stable
8 Summary:        %{modname} - PHP wrapper to the Image Magick Library
9 Summary(pl.UTF-8):      %{modname} - PHP-owy wrapper do biblioteki Image Magick
10 Name:           %{php_name}-pecl-%{modname}
11 Version:        3.4.2
12 Release:        3
13 License:        PHP 3.01
14 Group:          Development/Languages/PHP
15 Source0:        http://pecl.php.net/get/%{modname}-%{version}.tgz
16 # Source0-md5:  3f80e35c2434636cdb5df01b221b3ffa
17 Patch0:         skip_version_check.patch
18 URL:            http://pecl.php.net/package/imagick/
19 BuildRequires:  %{php_name}-devel >= 4:5.3
20 BuildRequires:  ImageMagick-devel >= 1:6.2.4.0
21 BuildRequires:  rpmbuild(macros) >= 1.650
22 %if %{with tests}
23 BuildRequires:  %{php_name}-cli
24 BuildRequires:  %{php_name}-pcre
25 BuildRequires:  %{php_name}-spl
26 BuildRequires:  ImageMagick-coder-jpeg
27 BuildRequires:  ImageMagick-coder-png
28 BuildRequires:  ImageMagick-coder-tiff
29 %endif
30 %{?requires_php_extension}
31 Requires(triggerpostun):        sed >= 4.0
32 Requires:       %{php_name}-spl
33 Suggests:       ImageMagick-coder-jpeg
34 Suggests:       ImageMagick-coder-png
35 Suggests:       ImageMagick-coder-tiff
36 Provides:       php(imagick) = %{version}
37 Obsoletes:      php-pecl-imagick < 3.1.2-2
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 ImageMagick is a robust collection of tools and libraries to read,
42 write, and manipulate an image in many image formats (over 68 major
43 formats) including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD,
44 and GIF. With ImageMagick you can create images dynamically, making it
45 suitable for Web applications. You can also resize, rotate, sharpen,
46 color reduce, or add special effects to an image and save your
47 completed work in the same or differing image format.
48
49 In PECL status of this package is: %{status}.
50
51 %description -l pl.UTF-8
52 ImageMagick to duży zestaw narzędzi i bibliotek do odczytu, zapisu i
53 modyfikowania obrazków w wielu formatach (ponad 68 głównych), w tym
54 popularnych, takich jak TIFF, JPEG, PNG, PDF, PhotoCD i GIF. Za pomocą
55 ImageMagick można dynamicznie tworzyć obrazki, co jest przydatne w
56 aplikacjach WWW. Można je także przeskalowywać, obracać, wyostrzać,
57 zmniejszać ilość kolorów - w tym samym lub innym formacie.
58
59 To rozszerzenie ma w PECL status: %{status}.
60
61 %prep
62 %setup -qc
63 mv %{modname}-%{version}/* .
64 %patch0 -p1
65
66 # skip failing tests
67 Test() {
68         nf=$(eval echo \$$#)
69         t=$nf; t=${t#\[}; t=${t%\]}
70         mv $t $t.skip
71 }
72 Test Imagick, annotateImage [tests/034_Imagick_annotateImage_basic.phpt]
73 Test ImagickDraw, composite [tests/177_ImagickDraw_composite_basic.phpt]
74 Test ImagickDraw, setFontSize [tests/206_ImagickDraw_setFontSize_basic.phpt]
75 Test ImagickDraw, setFontFamily [tests/207_ImagickDraw_setFontFamily_basic.phpt]
76 Test ImagickDraw, setFontStretch [tests/208_ImagickDraw_setFontStretch_basic.phpt]
77 Test ImagickDraw, setFontWeight [tests/209_ImagickDraw_setFontWeight_basic.phpt]
78 Test ImagickDraw, setFontStyle [tests/210_ImagickDraw_setFontStyle_basic.phpt]
79 Test ImagickDraw, setGravity [tests/212_ImagickDraw_setGravity_basic.phpt]
80 Test ImagickDraw, setTextAlignment [tests/222_ImagickDraw_setTextAlignment_basic.phpt]
81 Test ImagickDraw, setTextAntialias [tests/223_ImagickDraw_setTextAntialias_basic.phpt]
82 Test ImagickDraw, setTextUnderColor [tests/224_ImagickDraw_setTextUnderColor_basic.phpt]
83 Test ImagickDraw, setTextDecoration [tests/225_ImagickDraw_setTextDecoration_basic.phpt]
84 Test Tutorial, psychedelicFont [tests/241_Tutorial_psychedelicFont_basic.phpt]
85 Test Tutorial, svgExample [tests/243_Tutorial_svgExample_basic.phpt]
86 Test Tutorial, psychedelicFontGif [tests/244_Tutorial_psychedelicFontGif_basic.phpt]
87
88 %build
89 phpize
90 %configure \
91         php_cv_cc_dashr=false
92
93 %{__make} \
94         CFLAGS_CLEAN="%{rpmcflags}"
95
96 %if %{with tests}
97 %{__php} -n -q \
98         -d extension_dir=modules \
99         -d extension=%{php_extensiondir}/pcre.so \
100         -d extension=%{php_extensiondir}/spl.so \
101         -d extension=%{modname}.so \
102         -m > modules.log
103 grep %{modname} modules.log
104
105 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
106 %{__make} test \
107         PHP_EXECUTABLE=%{__php} \
108         PHP_TEST_SHARED_SYSTEM_EXTENSIONS="pcre spl" \
109 %endif
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}}
114 install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
115 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
116 ; Enable %{modname} extension module
117 extension=%{modname}.so
118 EOF
119 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %post
125 %php_webserver_restart
126
127 %postun
128 if [ "$1" = 0 ]; then
129         %php_webserver_restart
130 fi
131
132 %triggerpostun -- %{name} < 0.9.11-2.1
133 %{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*%{modname}\.so/d' %{php_sysconfdir}/php.ini
134
135 %files
136 %defattr(644,root,root,755)
137 %doc CREDITS
138 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
139 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
140 %{_examplesdir}/%{name}-%{version}
This page took 0.328555 seconds and 2 git commands to generate.