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