]> git.pld-linux.org Git - packages/php-pecl-fileinfo.git/blob - php-pecl-fileinfo.spec
- updated to 1.0.1
[packages/php-pecl-fileinfo.git] / php-pecl-fileinfo.spec
1 %define         _modname        fileinfo
2 %define         _smodname       Fileinfo
3 %define         _status         beta
4 %define         _sysconfdir     /etc/php
5 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
6
7 Summary:        %{_modname} - libmagic bindings
8 Summary(pl):    %{_modname} - dowi±zania biblioteki libmagic
9 Name:           php-pecl-%{_modname}
10 Version:        1.0.1
11 Release:        1
12 License:        PHP
13 Group:          Development/Languages/PHP
14 Source0:        http://pecl.php.net/get/%{_smodname}-%{version}.tgz
15 # Source0-md5:  34155e8ea7e5b46d7a155e73245f3796
16 Patch0:         %{name}-php51.patch
17 URL:            http://pecl.php.net/package/Fileinfo/
18 BuildRequires:  php-devel >= 3:5.0.0
19 BuildRequires:  rpmbuild(macros) >= 1.254
20 %{?requires_php_extension}
21 Requires:       %{_sysconfdir}/conf.d
22 Obsoletes:      php-pear-%{_modname}
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 This extension allows retrieval of information regarding vast majority
27 of file. This information may include dimensions, quality, length
28 etc...
29
30 Additionally it can also be used to retrieve the MIME type for a
31 particular file and for text files proper language encoding.
32
33 In PECL status of this extension is: %{_status}.
34
35 %description -l pl
36 To rozszerzenie pozwala na uzyskanie wielu informacji na temat plików.
37 Informacje te uwzglêdniaj± miêdzy innymi rozmiar, jako¶æ, d³ugo¶æ itp.
38
39 Dodatkowo mo¿e byæ u¿yte do uzyskania typu MIME danego pliku, a dla
40 plików tekstowych - u¿ytego kodowania.
41
42 To rozszerzenie ma w PECL status: %{_status}.
43
44 %prep
45 %setup -q -c
46 %patch0 -p1
47
48 %build
49 cd %{_smodname}-%{version}
50 phpize
51 %configure
52 %{__make}
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
57
58 install %{_smodname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
59 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
60 ; Enable %{_modname} extension module
61 extension=%{_modname}.so
62 EOF
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %post
68 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
69 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
70
71 %postun
72 if [ "$1" = 0 ]; then
73         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
74         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
75 fi
76
77 %files
78 %defattr(644,root,root,755)
79 %doc %{_smodname}-%{version}/{CREDITS,EXPERIMENTAL,fileinfo.php}
80 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
81 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.065708 seconds and 4 git commands to generate.