]> git.pld-linux.org Git - packages/php-pecl-fileinfo.git/blob - php-pecl-fileinfo.spec
- rel 2 (php 5.2.0)
[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.4
11 Release:        2
12 License:        PHP
13 Group:          Development/Languages/PHP
14 Source0:        http://pecl.php.net/get/%{_smodname}-%{version}.tgz
15 # Source0-md5:  2854e749db157365c769cb9496f5586f
16 URL:            http://pecl.php.net/package/Fileinfo/
17 BuildRequires:  libmagic-devel
18 BuildRequires:  php-devel >= 3:5.0.0
19 BuildRequires:  rpmbuild(macros) >= 1.322
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
47 %build
48 cd %{_smodname}-%{version}
49 phpize
50 %configure
51 %{__make}
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
56
57 install %{_smodname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
58 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
59 ; Enable %{_modname} extension module
60 extension=%{_modname}.so
61 EOF
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %post
67 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
68 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
69
70 %postun
71 if [ "$1" = 0 ]; then
72         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
73         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
74 fi
75
76 %files
77 %defattr(644,root,root,755)
78 %doc %{_smodname}-%{version}/{CREDITS,EXPERIMENTAL,fileinfo.php}
79 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
80 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.046342 seconds and 4 git commands to generate.